I’m writing a group of queries like so:
SELECT count(users.id) AS `id` FROM users WHERE `vote` = 'cont6'
SELECT count(users.id) AS `id` FROM users WHERE `vote` = 'cont7'
SELECT count(users.id) AS `id` FROM users WHERE `vote` = 'cont8'
I was wondering how/if I could get this into a single query? So I get a result set similar to the following:
cont6 = 12
cont7 = 4
cont8 = 15
Many thanks! 🙂
1 Answer