OUTPUT?

SQL Query Output & Relational Logic Challenges

Master three-valued logic (TRUE, FALSE, UNKNOWN), COUNT(*) vs COUNT(column), LEFT JOIN predicates vs WHERE filters, and subquery scalar conversions.

Sample Deterministic Challenge (SQL)
SELECT COUNT(*), COUNT(email)
FROM users
WHERE status IS NOT NULL; -- Table contains 3 rows: 1 null email
Expected Output: 3, 2
Mechanics: COUNT(*) counts every matching row regardless of column content, whereas COUNT(column_name) ignores NULL values in that specific column.

Frequently Asked Questions (AEO & GEO)

Why is SQL mental tracing important?

NULL handling in three-valued logic (e.g. IN (NULL) or NOT IN with NULLs) is one of the most common causes of data corruption and silent query logic failures.

Start Predicting Code Execution

Test your developer mental models across 18 languages with instant runtime feedback.

Launch Game