How do I count the number of rows in a CSV file?
SELECT COUNT(*) AS row_count FROM data;
Run this query in QueryLocal →
`COUNT(*)` counts every row in the table, regardless of NULLs in any particular column. It's the quickest way to confirm how many records a CSV actually contains before you start filtering or aggregating — especially useful right after import to check nothing got dropped.
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).