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

What does the query return?

-- t.x: 5, NULL, 7
SELECT COUNT(*) FROM t
WHERE x <> 5;
  1. 1
  2. 2
  3. 3
  4. 0
NULL <> 5 is unknown, not true, so only the row with 7 passes the filter.
Play SQL & Databases ▸