Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as SQL by kuchin.russia ( 11 years ago )
select g.id,
       g.name,
       g.type,
       g.court,
       g.begins,
       g.ends,
       g.cost,
       g.max_people,
       count(c.client_id) as has_people,
       g.added,
       g.modified
  from games g, clients c
 where g.id = c.game_id
   and g.cost <= c.paid
   and g.begins > now()
 group by c.game_id

 

Revise this Paste

Your Name: Code Language: