SUMMARIZE is a fast first-pass profiling command for understanding a dataset before building analytical queries. It reports per-column types, counts, ranges, distributions, approximate distinct counts, and missing-value percentages. section 1.7.3 section 4.2
Use SUMMARIZE to inspect:
- Tables, query results, CSV files, and Parquet files, without necessarily ingesting the source first. section 4.2
- Column types, count, minimum, maximum, average, standard deviation, approximate unique values, quartiles, and null percentage. section 1.7.3
- Potential quality problems, such as negative distances or implausible ranges, before filtering or deeper analysis. section 10.4.5
Profile a filtered query
SUMMARIZE (SELECT read_on, power FROM readings WHERE system_id = 1200); reports timestamp coverage and power distribution for one system. In line mode, each column’s statistics are easy to inspect. For large remote datasets, summarizing only trip_distance or filtering through a view can reduce the data read, although computing statistics may still require scanning actual values. section 4.2 section 10.4.5
┌─────────────┬───────────────┬─────────────────────┬───┬─────────┬───────┐ │ column_name │ column_type │ max │ … │ q75 │ count │ │ varchar │ varchar │ varchar │ │ varchar │ int64 │ ├─────────────┼───────────────┼─────────────────────┼───┼─────────┼───────┤ │ system_id │ INTEGER │ 1200 │ … │ 1200 │ 151879│ │ read_on │ TIMESTAMP │ 2020-06-26 11:00:00 │ … │ │ 151879│ │ power │ DECIMAL(10,3) │ 133900.000 │ … │ 5125 │ 151879│ └─────────────┴───────────────┴─────────────────────┴───┴─────────┴───────┘
A compact result table makes column types, ranges, quartiles, and counts visible at a glance. section 4.2
