Author Topic: How to list all clubbers and the books that are assigned to them  (Read 4962 times)

Rick Leffler

  • Guest
Try the following:

select Person.Filing_Name, Person.Status, Person.Birth_Date, Person.Grade, Role.Club_Name, Book.Book_Name, Book.Completed, Book.Percent_Complete, Book.Completed_Date from Person, Role, Book 
where Person.Person_ID = Book.Person_ID and Person.Person_ID = Role.Person_ID and Role.IsPrimary=True and Role.Club_Year='2010-2011' and Person.Member_Type='Clubber' order by Person.Filing_Name

Note:  This was constructed using version 4.3.3.6.   Also note that the club year of "2010-2011" is hard-coded to select the clubber's Club_Name in 2010-2011, therefore if you want to use this statement in 2011-2012 you will need to edit this Role.Club_Year text string.

Tip Use the SQL Workbench results grid to group, filter, sort and print.