ui/src/assets/data_explorer/node_info/aggregation.md
Purpose: Compute summary statistics like COUNT, SUM, MIN, MAX, AVG, MEDIAN, or PERCENTILE. Optionally group rows by one or more columns.
How to use:
Select GROUP BY columns: Choose columns to group by (optional)
Add aggregation functions: Create computed columns with aggregations
Data transformation:
Example 1 - No grouping: Calculate total duration and average duration across all slices:
SUM(dur) AS total_duration, AVG(dur) AS avg_durationExample 2 - With grouping: Find average duration per slice name:
nameAVG(dur) AS avg_durationExample 3 - Multiple groups: Count slices per process and thread:
process_name, thread_nameCOUNT(*) AS slice_countAvailable operations:
COUNT(*): Count all rows (no column needed)COUNT(col): Count non-NULL values in columnSUM(col): Sum of all valuesMIN(col), MAX(col): Minimum/maximum valueMEAN(col): Average (arithmetic mean)MEDIAN(col): Median (50th percentile)PERCENTILE(col, p): Custom percentile (e.g., 95th percentile)DURATION_WEIGHTED_MEAN(col): Mean weighted by durationSQL equivalent: SELECT group_cols, AGG(col) AS result FROM input GROUP BY group_cols