Skip to content

Instantly share code, notes, and snippets.

@ctfaddict
Created April 24, 2014 06:02
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/a7db386b073c2f71a0a2 to your computer and use it in GitHub Desktop.
Save ctfaddict/a7db386b073c2f71a0a2 to your computer and use it in GitHub Desktop.
scorebot_production=# select t.name, a.round_id, s.name, a.status from availabilities a, instances i, services s, teams t
where (a.round_id=253 or a.round_id=254) and a.instance_id=i.id and i.team_id = t.id
and t.name like 'men%' and i.service_id = s.id
order by a.round_id asc;
name | round_id | name | status
-------------------+----------+----------+--------
men in black hats | 253 | atmail | 0
men in black hats | 253 | bookworm | 0
men in black hats | 253 | lonetuna | 0
men in black hats | 253 | reeses | 0
men in black hats | 253 | trouver | 0
men in black hats | 253 | avoir | 0
men in black hats | 254 | trouver | 0
men in black hats | 254 | atmail | 0
men in black hats | 254 | reeses | 0
men in black hats | 254 | bookworm | 0
men in black hats | 254 | avoir | 14
men in black hats | 254 | lonetuna | 0
(12 rows)
scorebot_production=# select t.name, a.round_id, s.name, a.status from availabilities a, instances i, services s, teams t
where (a.round_id=253 or a.round_id=254) and a.instance_id=i.id and i.team_id = t.id and t.name like '%phish'
and i.service_id = s.id and s.name like 'av%'
order by a.round_id asc;
name | round_id | name | status
------------+----------+-------+--------
shellphish | 253 | avoir | 0
shellphish | 254 | avoir | 0
(2 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment