$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #243

Which fix removes the bug?

SELECT name FROM users
WHERE age > 18 AND < 30; -- syntax error
  1. Wrap it: age > (18 AND < 30)
  2. Swap the AND for an OR
  3. Repeat the column: AND age < 30
  4. Write it as age > 18 < 30
Each side of AND must be a complete condition, so the column has to be named again (or use age BETWEEN 19 AND 29).
Play Problem Solving ▸