Fixed the SQL (working now).