Skip to content

Instantly share code, notes, and snippets.

@ctfaddict
Created April 24, 2014 05:43
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/6ec10dede1eba014172f to your computer and use it in GitHub Desktop.
Save ctfaddict/6ec10dede1eba014172f to your computer and use it in GitHub Desktop.
scorebot_production=# select s.name, count(*), count(*) * 19 as flags_lost
from availabilities a, instances i, services s
where a.instance_id = i.id and i.service_id = s.id and a.status != 0
group by s.name
order by s.name asc;
name | count | flags_lost
----------+-------+------------
atmail | 607 | 11533
avoir | 216 | 4104
bookworm | 177 | 3363
lonetuna | 1564 | 29716
reeses | 328 | 6232
trouver | 215 | 4085
(6 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment