You are viewing a single comment's thread. Return to all comments →
Looks correct, but I don't think it compiles. When I run your query in MySQL I get
ERROR 1055 (42000) at line 4: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'run_4m7xguxkire.WANDS.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
and in SQL server I get
An expression of non-boolean type specified in a context where a condition is expected, near 'ORDER'.