I have an Access database that has the following tables:
tblEvent tblReviewer EventID(PK) ReviewerID (PK) EventTitle EventID (FK) EventDate ReviewerName Attended PrepTime
One Event can have multiple Reviewers. The "Attended" field is a Y/N checkbox and "PrepTime" is the number of hours the reviewer spent preparing for the Event.
It would look something like this:
EventID EventTitle EventDate 1 Event One 1/10/2013 ReviewerID ReviewName Attended PrepTime 01 Jane Doe Y 2 02 John Doe N 03 Another Name Y 6 04 My Name Y 4 EventID EventTitle EventDate 2 Event Two 1/24/2013 ReviewerID ReviewName Attended PrepTime 05 Your Name Y 15 06 Any Name Y 1
I need to write a SQL query that lists each Event ID and Title, how many reviewers attended the event, and the total prep hours spent by all reviews for that event.
Using the example above:
EventID EventTitle Attended PrepTime 1 Event One 3 12 2 Event Two 2 16
Can someone help please? Thanks!!!