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);