Skip to content

Commit

Permalink
Add sites with most trackers report
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwords committed Oct 1, 2024
1 parent 185ae91 commit abc2d86
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sql/sites-top.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

sqlite3 badger.sqlite3 -batch "SELECT s.fqdn AS site,
COUNT(DISTINCT t.base) AS num_trackers
FROM site s
JOIN tracking tr ON tr.site_id = s.id
JOIN tracker t ON t.id = tr.tracker_id
JOIN scan ON scan.id = tr.scan_id
WHERE scan.start_time > DATETIME('now', '-30 day')
GROUP BY s.id
ORDER BY num_trackers DESC
LIMIT 30" | column -s '|' -t

0 comments on commit abc2d86

Please sign in to comment.