Community Contributions > SQL Workbench
Determining particpant awards
(1/1)
Eric Berry:
Can someone give me a SQL command where I can find the active clubbers who are not receiving a book award at the end of the year sorted by club and last name?
We want to give them participation certificates.
Eric Berry:
select p.filing_name, r.club_name from person p, role r where r.role_name='Clubber' and p.status='Active' and p.person_id=r.person_id and p.filing_name not in (select p.filing_name from Person p, Award a where a.person_id=p.person_id and a.award_source='Book' and a.Club_year='2011-2012' and a.award_name<>'Sparks Membership Card') order by r.club_name, p.filing_name
Navigation
[0] Message Index
Go to full version