SELECT unitidentifier, unitdiscordid, count(unitdiscordid)
FROM warnings
GROUP BY unitdiscordid
ORDER BY count(unitdiscordid) DESC
LIMIT 1
This is the query I'm running and I get the following error:
#1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'libertyr_cad.warnings.unitidentifier' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I tried altering the query but still no luck, I know there is a fix by editing the sql_mode
but I would prefer if possible to find a fix without doing that.