ClickHouse/dbms/tests/queries/0_stateless/00330_view_subqueries.sql

12 lines
295 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS test.v1;
DROP TABLE IF EXISTS test.v2;
CREATE VIEW test.v1 AS SELECT 1 FROM (SELECT 1);
SELECT * FROM test.v1;
CREATE VIEW test.v2 AS SELECT number * number FROM (SELECT number FROM system.numbers LIMIT 10);
SELECT * FROM test.v2;
DROP TABLE test.v1;
DROP TABLE test.v2;