Filtering & predicates
Exercise · SQL & Querying

Predict, then run it

Predict the output

rep(id, status) = (1,done),(2,refunded),(3,NULL). Every repair that isn't a refund, keeping the unstatused one:

SELECT id FROM rep WHERE status IS DISTINCT FROM 'refunded' ORDER BY id;

Predict the exact output.