statify
statify copied to clipboard
Data aggregation
Multiple rows with the same date, target and referrer can be aggregated with an additional column count
.
- Database migration (add column
count
, migrate existing data) - In the queries
count(*)
needs to be replaced withSUM(count)
. - When adding a new row, check whether a row with that date, target and referrer exists already. If it exists, increase
count
, otherwise create it withcount = 1
.