Mysql – Select name, lastname, brand from table where brand is the most voted
I have this select SELECT firstname, lastname, email, brand FROM (SELECT brand, COUNT(brand) AS choiced FROM users GROUP BY brand ORDER BY `choiced` DESC LIMIT 1) AS winner ORDER BY RAND() LIMIT 1 Error #1054 column firstname in field set…