- How do I preview the first rows of a CSV file with SQL?
- How do I count the number of rows in a CSV file?
- How do I sum a numeric column across all rows?
- How do I filter rows with a numeric condition in SQL?
- How do I search for a text pattern in a column with SQL LIKE?
- How do I filter rows between two dates in SQL?
- How do I list the unique values in a column with SQL?
- How do I count unique values in a column with SQL?
- How do I sort by more than one column in SQL?
- How do I get the top N rows by value with SQL?
- How do I total a column for each category with SQL GROUP BY?
- How do I count rows per country with SQL GROUP BY?
- How do I calculate an average per group in SQL?
- How do I find the minimum and maximum unit price per category in SQL?
- How do I filter grouped results in SQL with HAVING?
- How do I bucket rows into categories with SQL CASE WHEN?
- How do I rank rows within each group using a SQL window function?
- How do I number each customer’s orders in date order with SQL?
- How do I compute a running total over time with SQL?
SQL recipes for CSV and JSON data
Each recipe answers one common question with a query you can run on a demo dataset in one click — then on your own file.