Fixed: SQL query so also MySQL is happy.