Analyze live data
Run this example in a connected SQL client. It uses a small set of application events.
Create sample data
Section titled “Create sample data”CREATE TABLE task_events ( id BIGINT PRIMARY KEY, team TEXT, duration_ms BIGINT);INSERT INTO task_events VALUES (1, 'support', 100), (2, 'support', 300), (3, 'platform', 200);Summarize by team
Section titled “Summarize by team”SELECT team, COUNT(*) AS runs, AVG(duration_ms) AS mean_msFROM task_eventsGROUP BY teamORDER BY team;The platform team has one run; support has two. Both have a mean duration of 200 milliseconds.
Filter before grouping
Section titled “Filter before grouping”SELECT team, COUNT(*) AS slow_runsFROM task_eventsWHERE duration_ms > 150GROUP BY teamORDER BY team;Each team has one matching run. Real workloads need representative data and query measurements. Small examples demonstrate behavior, not benchmark performance.