SQLAI.ai

Syntax error in SQL statement "SELECT name FROM dish WHERE name = 'Prawn Salad' ORDER BY name GROUP[*] BY name HAVING count(*) = 1;"; SQL statement: SELECT name FROM dish WHERE name = 'Prawn Salad' ORDER BY name GROUP BY name HAVING count(*) = 1; [42000-176]

            
SELECT name FROM dish WHERE name = 'Prawn Salad' GROUP BY name HAVING count(*) = 1;

Fixes:

  • Removed the ORDER BY clause before the GROUP BY clause.
  • Removed the square brackets around the * in the GROUP BY clause.
  • Public
  • ·
  • Mon, 22 Jan 2024 09:24:21 GMT