← Back to archive

Stdle #32 · grouping · 2026-07-08

What does this SQL snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

CREATE TABLE t(v INTEGER);
INSERT INTO t VALUES (3),(1),(2),(1),(NULL);
SELECT COUNT(DISTINCT v) FROM t
Grouping
4 attempts left

Answer & explanation