Sign in
apache
/
drill-test-framework
/
HEAD
/
.
/
framework
/
resources
/
Functional
/
aggregates
/
aggregation
/
sanity
/
q2.sql
blob: 16e2be691c23f16f47a9df693b8ca57ccef3ad3d [
file
]
-- group by single column, count distinct on aggregation column
select
a1
,
count
(
distinct
a1
)
from
t1
group
by
a1
order
by
a1
,
count
(
distinct
a1
)
desc
;