I am trying to access the details from two joined tables in SQL of 5 categories, for one of which I need to run the COUNT function. I am able to access the details, until I run the count function, after which I am limited to a single result. I have also tried using COUNT(*) as... - but this hasn't worked. The code is as follows:
SELECT name, location, grade_1996, COUNT(voter_id)
FROM votes
JOIN congress_members
ON congress_members.id=politician_id
WHERE grade_current < 9;
Please help, thank you.