aap bjp congress sum
1 2 5 8
i want to display sum of votescount. like above table output.
below is my sql query
plz suggest me how to get sum of echo votescount.
SELECT RES.PARTYNAME,COUNT( RES.CONSTITUENCY ) AS VOTESCOUNT FROM voter_count RES JOIN (SELECT CONSTITUENCY, MAX(VOTES) AS VOTES FROM voter_count
GROUP BY CONSTITUENCY)MAXS USING ( VOTES, CONSTITUENCY ) GROUP BY PARTYNAME LIMIT 0 , 1000