WHERE keeps TRUE rows and drops FALSE or UNKNOWN rows.

highlighted = computed this step

WHERE keeps only TRUE

A WHERE clause keeps rows whose predicate is TRUE. Rows whose predicate is FALSE or UNKNOWN are both dropped. Note: UNKNOWN is visible in the truth annotation.

where true only\text{where true only}

Filtering grades

The grade threshold is 85 and the recomputed kept row count is 2. Note: the missing-grade row is dropped because its predicate is UNKNOWN, not TRUE.

threshold=85,rows=2\text{threshold}=85,\quad \text{rows}=2

SQL bag/multiset + three-valued NULL logic, deterministic but surprising; tiny finite tables; no engine/perf claims. Set algebra is Book 1.

WHERE keeps only TRUE where grade gt 85 arity 3 rows 2 Grades arity 3 rows 5
where sid course grade s1 DB 90 s1 DB 90
WHERE truth annotations Truth arity 2 rows 5
Truth case truth 1 TRUE 2 TRUE 3 UNKNOWN 4 FALSE 5 FALSE

Summary

WHERE keeps TRUE and drops both FALSE and UNKNOWN. Note: bag multiplicity and NULL behavior are here; set algebra was Book One.

where summary\text{where summary}