sql subquery


i have sql information looks this



events
id name capacity
1 cooking 10
2 swimming 20
3 archery 15

registrants
id name
1 jimmy
2 billy
3 sally

registrant_event
registrant_id event_id
1 3
2 3
3 2


i name fields 'events' good an additional domain array now purebred event. box archery have 2 registrants, swimming have 1, cooking have 0.



i suspect achieved unparalleled query nonetheless i'm certain repremand syntax. how query combined data?



update: interjection good answers, rock!



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members