Scatter plot
The scatter plot widget plots each row as a point positioned by two numeric measures — one on the X axis, one on the Y axis. It is the tool for spotting correlation, clusters, and outliers across your users, sessions, or events.
Use it for:
- Sessions per user vs total playtime
- Level reached vs money spent
- Any two per-entity metrics you suspect are related
Query requirements
Section titled “Query requirements”Return rows with at least two numeric columns:
- The first numeric column is the X axis.
- The second numeric column is the Y axis.
- An optional non-numeric column is used as the point label (shown in the tooltip).
- An optional third numeric column drives the bubble size.
Each row becomes one plotted point, so aggregate per entity (e.g. GROUP BY identity).
SELECT identity, uniqExact(session_id) AS sessions, dateDiff('minute', min(timestamp), max(timestamp)) AS playtimeFROM {table}WHERE name = 'app_started'GROUP BY identityLIMIT 1000Result shape:
| identity | sessions | playtime |
|---|---|---|
| a1b2… | 12 | 340 |
| c3d4… | 3 | 45 |
Here sessions is the X axis, playtime is the Y axis, and identity labels each point.
Bubble size
Section titled “Bubble size”Add a third numeric column to scale each point by a third dimension:
Full SQL:
SELECT identity, uniqExact(session_id) AS sessions, count() AS events, countIf(name = 'purchase') AS purchasesFROM {table}GROUP BY identityLIMIT 1000sessions → X, events → Y, purchases → bubble size.
Common examples
Section titled “Common examples”Engagement vs spend per user
Full SQL:
SELECT identity, count() AS events, sumIf(toFloat64(value.amount), name = 'purchase') AS spendFROM {table}GROUP BY identityLIMIT 1000