Listing the first and last name and the count of properties they own.
Need to also include staff members who do not own any properties but count would be 0.
Here I have the staff members and properties linked with staffNo.
This query displays only the staffs who own a property and how many they own but is not displaying the staffs who do not own any properties
SELECT S.branchNo
, fName
, lName
, S.staffNo
, COUNT(*) AS "count"
FROM Staff S
, PropertyForRent P
WHERE S.staffNo = P.staffNo
GROUP
BY S.branchNo
, S.staffNo
ORDER
BY S.staffNo;