aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/optimizers/yql-17413-topsort.sql
blob: 646b84b1dd4db166f662096e966f163aa7b53339 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
-- ignore runonopt plan diff
USE plato;

$filtered = select * from Input where value != "xxx";

select distinct(subkey) as subkey
from (select * from $filtered order by key desc limit 3)
order by subkey;

select sum(cast(subkey as int32)) as c from $filtered;