>_QueryLocalCSV & JSON tools that run in your browser

How do I filter rows with a numeric condition in SQL?

SELECT * FROM data
WHERE quantity >= 3
ORDER BY quantity DESC;

Run this query on the demo dataset →

WHERE filters rows before any grouping or ordering happens — only rows where the condition evaluates to true make it into the result. quantity >= 3 keeps bulk orders and drops everything else, which is the SQL equivalent of a spreadsheet AutoFilter but expressed as a single, repeatable line of code.

A table named data with columns: order_id (integer), customer (text), country (text), category (text), quantity (integer), unit_price (real), order_date (text, YYYY-MM-DD).

Want to run it on your own file? Open it with Filter a CSV: your file becomes the table data, and you can paste this query with your own column names.

Related recipes