-> ad.id appid,
-> ad.name name,
-> count(rd.id) refs
-> FROM applicantDetails ad
-> LEFT OUTER JOIN referenceDetails rd ON (rd.applicantid = ad.id)
-> WHERE count(rd.id) < 2
-> GROUP BY ad.id, ad.name;
and I get this err message, it's quite annoying as I've managed to do this many times before in MSSQL.
ERROR 1111 (HY000): Invalid use of group function
Does anybody know what could be causing this, I'm using the latest version of MYSQL.