IN keeps rows whose column value is a member of a small pinned list.

highlighted = computed this step

Input table

Start with the Orders table and read each status value.

Orders\text{Orders}
Ordersorder_idstatusamounto1paid120o2pending40o3paid70o4review95

Where query

Keep rows whose status is in the allowed list: paid or review.

WHERE status IN paid, review\text{WHERE status IN paid, review}
WHERE status IN paid or reviewwhere inarity 3 rows 3Ordersarity 3 rows 4

Predicate truth

Paid and review rows evaluate to TRUE; pending evaluates to FALSE.

membership truth check\text{membership truth check}
Three-valued truthrowtruth1TRUE2FALSE3TRUE4TRUE

Filtered output

The filtered output keeps paid and review rows in their original row order.

paid or review orders\text{paid or review orders}
Filtered outputorder_idstatusamounto1paid120o3paid70o4review95