I have been thinking about how to do this queery all day and just can't think of how it should be structured....
I have a table, lets call it table A. Which has a list of users with a unique id. So:
ID_____________________NAME
1**********************Bob
2**********************Joe
I have a second table, Lets call table B which contains things that the users have done with record of the user's ID in it.
Record_________________Action_______________User
1**********************Eat******************2
2**********************Sleep****************1
3**********************Sleep****************2
4**********************Shite*****************2
What i need to do is find out how many actions where taken by each user. So say I want to display the result (us MS Access) as:
User__________________Actions
Bob*******************1
Joe*******************3
I've done this sort of queery before (about 2 years ago), and all the google searches I do on inner joins and outer joins aren't jogging my memory on how i did the queery..
Any thoughts?
I have a table, lets call it table A. Which has a list of users with a unique id. So:
ID_____________________NAME
1**********************Bob
2**********************Joe
I have a second table, Lets call table B which contains things that the users have done with record of the user's ID in it.
Record_________________Action_______________User
1**********************Eat******************2
2**********************Sleep****************1
3**********************Sleep****************2
4**********************Shite*****************2
What i need to do is find out how many actions where taken by each user. So say I want to display the result (us MS Access) as:
User__________________Actions
Bob*******************1
Joe*******************3
I've done this sort of queery before (about 2 years ago), and all the google searches I do on inner joins and outer joins aren't jogging my memory on how i did the queery..
Any thoughts?