ClickHouse/tests/queries/0_stateless/00271_agg_state_and_totals.sql

2 lines
191 B
MySQL
Raw Normal View History

SELECT k, finalizeAggregation(quantilesTimingState(0.5)(x)) FROM (SELECT intDiv(number, 30000 AS d) AS k, number % d AS x FROM system.numbers LIMIT 100000) GROUP BY k WITH TOTALS ORDER BY k;