Hello I need some help getting my mysql correct.
I need to select one row which will have the maximum ‘var’ column value.
This is what I have right now but it doesn’t give the maximum
SELECT a.* FROM `table` AS a GROUP BY a.var HAVING a.var = MAX(a.var) AND `code` = '1' AND `type` = '0';
You can use
ORDER BYwithLIMIT 1: