मेरा मानना है कि निम्नलिखित को काम करना चाहिए:
SELECT id_b, MAX(votes), rating
FROM (SELECT id_benefit, count( * ) AS votes, rating
FROM `vote_benefits
GROUP BY id_benefit, rating)
GROUP BY id_b
मेरा मानना है कि निम्नलिखित को काम करना चाहिए:
SELECT id_b, MAX(votes), rating
FROM (SELECT id_benefit, count( * ) AS votes, rating
FROM `vote_benefits
GROUP BY id_benefit, rating)
GROUP BY id_b