EXPLAIN SELECT MAX(cnt) FROM (SELECT count(*) as cnt FROM LINEITEM group by L_SUPPKEY); ┌─explain───────────────────────────────────────────────┐ │ Expression (Projection) │ │ Expression (Before ORDER BY and SELECT) │ │ Aggregating │ │ Expression (Before GROUP BY) │ │ Expression (Projection) │ │ Expression (Before ORDER BY and SELECT) │ │ Aggregating │ │ Expression (Before GROUP BY) │ │ ReadFromStorage (Read from MergeTree) │ └───────────────────────────────────────────────────────┘