A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-17.sql
1CREATETABLEt(idINTEGER);
2INSERTINTOtVALUES(1),(2),(3);
3SELECTCOUNT(*)FROMtWHEREidNOTIN(1,NULL)
NULLs
Answer & explanation
Console output
0
Why
NOT IN (1, NULL) is equivalent to (id<>1 AND id<>NULL). Because id<>NULL is always NULL (unknown), the AND can never be TRUE, so NOT IN with a NULL in the list returns no rows — a classic SQL footgun. Result: 0.