Ok, I have something i just can't get my head round, spent ages trying to get it to work last night but to no avail, so here goes!
I have a query, I wish to get the query to display the customer firstname and surname and the number of videos they have hired, the tables look like this (i have only included the fields i think we need):
Customer---
firstname | surname | memberid
rental---
memberid | rentalnumber
so i was thinking count the number of times the customers memberid appears in *** table and bobs your uncle, well i got it to display the member id along side how many times it occurs:
select memberid, count(memberid)
from rentalhead1
group by memberid
but when ever i try and link/relate it to the customer table, it does not work as i can not use the surname/firstname columsn where a group by is in there!
any help would be great,
cheers