Fix pivots that specify an aggregation `:order-by` (#28545)
Fixes #22872 In #21839, all order-bys were removed from pivot queries because columns in `ORDER BY` had to appear in `GROUP BY` clauses. Unfortunately that removed legal order by columns (e.g. count) from being applied. This now keeps aggregation columns in field defs to restore the sorting behaviour.
Please register or sign in to comment