Reputation: 42
Select UUID, COUNT(FosterID)
FROM tblUsers
Left JOIN tblAnimals On (UUID=FosterID)
Group By UUID
I want to get all users and the number of animals they are fostering those who are not have 0
Upvotes: 0
Views: 43
Reputation: 572
Try a full qualified name like
Select tblUsers.UUID, COUNT(tblAnimals.FosterID)
FROM tblUsers
Left JOIN tblAnimals On (tblUsers.UUID=tblAnimals.FosterID)
Group By tblUsers.UUID
Upvotes: 1