Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
aggregates
/
aggregation
/
group_by_case
/
case_in_sum_c_smalldecimal.sql
blob: 8a941195496615c32cab7db28e64c2b12fc34797 [
file
] [
log
] [
blame
]
select
count
(
distinct
a1
)
from
(
select
SUM
(
case
when
c_smalldecimal
is
null
then
0
else
1
end
)
from
alltypes_with_nulls
group
by
c_date
order
by
SUM
(
case
when
c_smalldecimal
is
null
then
0
else
1
end
))
as
dt
(
a1
);