Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
aggregates
/
aggregation
/
sanity
/
q14.sql
blob: 22265439712303bb33c71af36a88b9ad573ca9b5 [
file
] [
log
] [
blame
]
-- count distinct on a non grouping column
-- sum in coalesce function
select
count
(
distinct
c1
),
coalesce
(
sum
(
a1
)
+100
,
sum
(
a1
+1
))
from
t1
group
by
b1
order
by
b1
;