opyeb QueryDeck

QueryDeck guides

Fifteen guides from first query to daily use, each runnable against this lab's sample data: the idea, the actual query, and what to check in the result.

01Turn a CSV into a SQLite table inside your browserHow a CSV becomes an in-memory SQLite table without uploading it, and what to check in headers, type inference and missing values.02SELECT and WHERE: building a precise first questionChoosing columns with SELECT and filtering rows with WHERE, including operator precedence and LIKE, IN and BETWEEN.03GROUP BY and aggregates: totals that hold upHow COUNT, SUM, AVG, MIN and MAX behave with GROUP BY and HAVING, including the difference between COUNT(*) and COUNT(col).04JOIN: why rows multiply when tables meetINNER versus LEFT JOIN, join keys, and why a total doubles after a join, explained with orders and regions.05ORDER BY and LIMIT: sorting and pagingMultiple sort keys, where NULLs land, LIMIT and OFFSET pagination, and why an unordered result is not a result.06The NULL trap: how blank cells move totals and meansComparing NULL, COUNT(*) versus COUNT(col), the denominator of AVG, and using COALESCE and NULLIF to handle missing values.07Finding outliers with IQR: quartiles and fencesHow Q1, Q3 and the 1.5×IQR fence flag outliers, with worked numbers and the cases where IQR struggles.08Z-scores for outliers: what three standard deviations meanComputing Z-scores from mean and standard deviation, sample versus population spread, and how Z-scores compare with IQR fences.09Pivot tables: rows, columns and one measureHow a pivot table is built from row, column and value fields, how its totals must be computed, and when a pivot is the wrong shape.10Choosing the right chart: bar, line, scatter, histogramMatching a chart to the question — category, time, relationship or distribution — and the mistakes that mislead readers.11A CSV cleaning checklist: eight checks before you loadEncoding, delimiter, quotes, line breaks, duplicate headers, mixed types, date formats and units — the checks that prevent bad tables.12SQLite date functions: handling TEXT dates properlyMonthly grouping, period filters and elapsed days with strftime, date and julianday, plus the format and timezone traps.13Window functions: ranks, running totals and moving averagesROW_NUMBER, RANK, SUM OVER and PARTITION BY for per-group ranks and running totals, and how they differ from GROUP BY.14Local analysis and the no-upload principleWhat changes when a file is analysed in the browser instead of uploaded, where the limits are, and how to check that a tool really keeps data local.15Moving from spreadsheet thinking to SQLOne row per record, one column per field, one kind of observation per table — how to restructure a spreadsheet for SQL.
← Back to the lab