WHERE keeps rows whose predicate is TRUE.

highlighted = computed this step

TRUE rows are kept

WHERE output rows are exactly the rows whose predicate result is TRUE.

keep TRUE\text{keep TRUE}

Read kept rows

The filter keeps 2 rows.

kept rows=2\text{kept rows}=2

WHERE-filter examples are tiny finite-table transforms with SQL-style TRUE/FALSE/UNKNOWN logic; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

TRUE rows are kept: base rowsitemqtystatuspen3opennotebook0openmug2closedstickerNULLopen predicate evaluationsourcevaluestruthkept0[pen, 3, open]TRUEyes1[notebook, 0, open]FALSEno2[mug, 2, closed]TRUEyes3[sticker, NULL, open]UNKNOWNno WHERE output rowsitemqtystatuspen3openmug2closed WHERE factsfactvalueinputRowCount4trueRows2falseRows1unknownRows1keptRows2droppedRows2rowOrdersource_orderunknownKeptno

Output is smaller

The output table lists only the rows marked kept=yes.

WHERE output\text{WHERE output}

Summary

TRUE is the only truth value that passes the WHERE gate.

TRUE only\text{TRUE only}