Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
aggregates
/
aggregation
/
sanity
/
q15.sql
blob: 3af6a5b59bbd865a414577916c860134cf690e60 [
file
] [
log
] [
blame
]
-- group by 2 columns, count distinct is not on a grouping column
select
b1
,
count
(
distinct
a1
)
as
count_distinct_a1
,
sum
(
a1
)
as
sum_a1
,
count
(
b1
)
as
count_b1
,
count
(
c1
)
as
count_c1
,
count
(*)
as
count_star
from
t1
group
by
b1
,
c1
order
by
b1
;