Table1:
SessionID int
Hours int
....
SessionID Hours
111 3
222 2
333 3
444 2
Table2:
SessionID int
RegistrationID int
....
RegistrationID SessionID
888 111
888 444
777 111
666 222
666 333
I want to sum the hours for each person spent in sessions.
Results I'd like to see:
RegistrationID hours
888 5
777 3
666 4
What is not working:
Select hours, registrationID
from
table1, table2
where
table1.SessionID = table2.sessionID
Group by registrationID, hours
This adds up ALL the hours and then groups them by person.
Any help?
John Mosey "Humping your theoretical mom since 1993"
Complaints can be sent to ab***@mosey.com
The sun rises in the east, dumbass