Support distinct aggregates in GROUP BY

This commit is contained in:
Jussi Saurio 2025-05-17 15:00:31 +03:00
parent a659c39f97
commit 51c75c6014
5 changed files with 70 additions and 8 deletions

View file

@ -197,4 +197,13 @@ do_execsql_test group_by_no_sorting_required {
select age, count(1) from users group by age limit 3;
} {1|112
2|113
3|97}
3|97}
do_execsql_test distinct_agg_functions {
select first_name, sum(distinct age), count(distinct age), avg(distinct age)
from users
group by 1
limit 3;
} {Aaron|1769|33|53.6060606060606
Abigail|833|15|55.5333333333333
Adam|1517|30|50.5666666666667}