ClickHouse/tests/queries/0_stateless/01142_with_ties_and_aliases.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
616 B
MySQL
Raw Normal View History

2022-02-02 16:49:44 +00:00
select * from (select number, intDiv(number,5) value from numbers(20) order by value limit 3 with ties) ORDER BY number, value;
2020-06-15 22:24:00 +00:00
drop table if exists wt;
create table wt (a Int, b Int) engine = Memory;
insert into wt select 0, number from numbers(5);
select 1 from wt order by a limit 3 with ties;
2022-02-06 13:31:59 +00:00
select b from (select b from wt order by a limit 3 with ties) order by b;
2022-02-02 19:50:33 +00:00
select * from (select * from (with a * 2 as c select a, b from wt order by c limit 3 with ties) order by a, b);
select * from (select * from (select a * 2 as c, b from wt order by c limit 3 with ties) order by c, b);
2020-06-15 22:24:00 +00:00
drop table if exists wt;