Hi,
I'm having trouble putting this query together. I have the following two tables.
VOLUNTEER
userName (FK)
hoursWorked
USERS
userName (PK)
firstName
lastName
I would like to run a query so I get:
firstName, lastName, totalHours
totalHours would be the sum off all volunteer hours logged for each person.
So I know that the Sum() function has to be used and that a GROUP BY on userName has to be done. My problem is getting the firstName, lastName into the mix.
Any help would be great!
Thanks.
I'm having trouble putting this query together. I have the following two tables.
VOLUNTEER
userName (FK)
hoursWorked
USERS
userName (PK)
firstName
lastName
I would like to run a query so I get:
firstName, lastName, totalHours
totalHours would be the sum off all volunteer hours logged for each person.
So I know that the Sum() function has to be used and that a GROUP BY on userName has to be done. My problem is getting the firstName, lastName into the mix.
Any help would be great!
Thanks.