Analytics tweaks

This commit is contained in:
Jocelyn Badgley (Twipped)
2021-05-07 11:10:29 -07:00
parent 3689c12667
commit 39a1aa2f6f
4 changed files with 58 additions and 3 deletions

View File

@@ -14,7 +14,17 @@ HAVING total > 5;
SELECT referrer_host, count(DISTINCT IFNULL(tid, ip)) as tids, referrer
FROM records
GROUP BY referrer_host;
WHERE date(dts) > date('now', '-1 month')
AND referrer_host != 'genderdysphoria.fyi'
GROUP BY referrer_host
ORDER BY tids DESC;
SELECT referrer_host, count(DISTINCT IFNULL(tid, ip)) as tids, referrer
FROM records
WHERE date(dts) > date('now', '-1 day')
AND INSTR(referrer_host, 'tiktok')
GROUP BY referrer_host
ORDER BY tids DESC;
SELECT COUNT(IFNULL(tid,ip)) as total, referrer
FROM records