-
Need help
Hello
I've got a problem with a SQL-question:
I have two tables, one Person with personalnumber and name, the other Subscription with personalnumber and Newpaper.
I have done the SQL-question select Person.Name, Subscription.Newspaper from Person join Subscription on Person.personalnumber = Subscription.personalnumber;
this question joins the two tables so I get a new table with the Names from Person and Newspaper from Subscription, now I want a table whitch has the column Name and column Count, the Names in one row and the amount of subscriptions each person have
exampel
Name Count
Peter 2
Anna 3
John 0
Nathalie 2
-
Hint: Use GROUP BY and COUNT
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|