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 with SUM(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 with count = 1.
Multiple rows with the same date, target and referrer can be aggregated with an additional column
count.count, migrate existing data)count(*)needs to be replaced withSUM(count).count, otherwise create it withcount = 1.