Skip to content

Instantly share code, notes, and snippets.

@ctfaddict
Created April 24, 2014 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctfaddict/de5d832bfaa06dc67e67 to your computer and use it in GitHub Desktop.
Save ctfaddict/de5d832bfaa06dc67e67 to your computer and use it in GitHub Desktop.
scorebot_production=# select s.name as svc, count(*) as steals
from redemptions r, instances i, services s, tokens t
where r.token_id = t.id and t.instance_id = i.id and s.id = i.service_id
and r.team_id != i.team_id
group by s.name
order by count(*) desc;
svc | steals
----------+--------
atmail | 11662
bookworm | 2677
avoir | 1546
reeses | 983
trouver | 803
lonetuna | 796
(6 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment