I am executing this query
SELECT voterfile_county.Name,voterfile_precienct.PREC_ID, voterfile_precienct.Name
,COUNT((SELECT voterfile_voter.ID FROM voterfile_voter JOIN voterfile_household
WHERE voterfile_voter.House_ID = voterfile_household.ID
and voterfile_household.Precnum = voterfile_precienct.PREC_ID)) as Voters
FROM voterfile_precienct JOIN voterfile_county
WHERE voterfile_precienct.County_ID = voterfile_County.ID;
i am trying to make it return something like this
County_Name Prec_ID Prec_Name Voters(Count of # of voters in that precienct)
however i am getting the error no 1242 Subquery returns more than one row.
i have tried placing the count statement in the subquery but i get a invalid syntax error.