Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
aggregates
/
aggregation
/
sanity
/
q6.sql
blob: 1384d3a5d6a6e5f6f6d14fd6f69865c2d7eef604 [
file
] [
log
] [
blame
]
-- subquery in from clause, group by aggregate function
select
count
(
distinct
a1
),
sum
(
a1
)
from
(
select
a1
,
b1
,
c1
from
t1
)
as
sq
group
by
b1
order
by
b1
,
sum
(
a1
);