I have two tables. A members table and suburbs table. The members table has a column called city_suburbs and the suburbs table has a column called name. My query ouputs the correct information however it outputs the suburb id and not the suburb name. What am I doing wrong.
Here is my current code
SELECT p.id,p.city_suburb, COUNT(*) As "members per suburb" FROM members as p
LEFT JOIN suburbs as b
ON p.city_suburb = b.name
GROUP BY city_suburb
New contributor
Meagan May is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1