Before dashboards or models, you explore. EDA in SQL means profiling the data where it lives — sizes, distributions, gaps, and oddities — before a single row is exported.
Key Points
- Size check: SELECT COUNT(*), MIN(date), MAX(date) FROM t;
- NULL profile: SUM(col IS NULL) per column reveals data gaps
- Distributions: GROUP BY category ORDER BY COUNT(*) DESC
- Outlier scan: MIN, MAX, AVG side by side flags absurd values
- Duplicate check: GROUP BY natural key HAVING COUNT(*) > 1
- Sanity-check totals against a known report before trusting the table
.png)