$ ./guess_the_languageSQL & Databases
SQL & Databases · easy · #2

How many rows match the pattern?

-- names: 'Jn', 'Jane', 'Jonah', 'Jean', 'Jan'
SELECT COUNT(*) FROM people
WHERE name LIKE 'J_n%';
  1. 3
  2. 1
  3. 4
  4. 2
_ matches exactly one character and % any run, so Jane, Jonah and Jan match; Jn and Jean do not.
Play SQL & Databases ▸