mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Support distinct aggregates in GROUP BY
This commit is contained in:
parent
a659c39f97
commit
51c75c6014
5 changed files with 70 additions and 8 deletions
|
@ -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}
|
Loading…
Add table
Add a link
Reference in a new issue