I have a problem with counting the people in each city. I will give a discription of my tables first and than explain what I want.
City
ID
City
LocationID
People
ID
Name
BirthPlace
DeadPlace
...
What I want is a list of all the cities in LocationID = 1 and a count of all the people that where born there.
Example:
Bazel 12
Belsele 47
Beveren 170
Burcht 1
Daknam 0
De Klinge 9
Doel 1
Eksaarde 6
Elversele 3
Haasdonk 46
Kallo 1
Kemzeke 5
Kieldrecht 5
Kruibeke 13
Lokeren 10
Meerdonk 2
Melsele 13
Moerbeke 12
Nieuwkerken 35
Rupelmonde 2
Sinaai 49
Sint-Gillis 23
Sint-Niklaas 106
Sint-Pauwels 33
Steendorp 3
Stekene 45
Temse 16
Tielrode 3
Vrasene 5
Waasmunster 21
Zwijndrecht 10
My problem is that there are always a few cities missing and I can't seem to get my SQL correct.
Thanks
City
ID
City
LocationID
People
ID
Name
BirthPlace
DeadPlace
...
What I want is a list of all the cities in LocationID = 1 and a count of all the people that where born there.
Example:
Bazel 12
Belsele 47
Beveren 170
Burcht 1
Daknam 0
De Klinge 9
Doel 1
Eksaarde 6
Elversele 3
Haasdonk 46
Kallo 1
Kemzeke 5
Kieldrecht 5
Kruibeke 13
Lokeren 10
Meerdonk 2
Melsele 13
Moerbeke 12
Nieuwkerken 35
Rupelmonde 2
Sinaai 49
Sint-Gillis 23
Sint-Niklaas 106
Sint-Pauwels 33
Steendorp 3
Stekene 45
Temse 16
Tielrode 3
Vrasene 5
Waasmunster 21
Zwijndrecht 10
My problem is that there are always a few cities missing and I can't seem to get my SQL correct.
Thanks