SELECT e.event_key FROM `Events` e JOIN ( SELECT event_key, MIN( date ) AS next_event_date FROM `Events` WHERE `date` < CURDATE( ) GROUP BY event_key ) AS e2 ON e.event_key = e2.event_key AND e.date = e2.next_event_date WHERE e.`recurring` =0 AND e.live =1 AND e.private = 0 AND e.promote =1 AND e.date < CURDATE( ) AND e.metro_area = 1 ORDER BY `date` DESC, , `datetime_start` DESC
1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `datetime_start` DESC' at line 17