ClickHouse/tests/queries/0_stateless/01732_explain_syntax_union_query.sql

87 lines
1016 B
MySQL
Raw Normal View History

2021-02-26 12:04:11 +00:00
EXPLAIN SYNTAX
SELECT 1
UNION ALL
(
SELECT 1
UNION ALL
(
SELECT 1
UNION ALL
SELECT 1
)
UNION ALL
SELECT 1
);
SELECT ' ';
EXPLAIN SYNTAX
SELECT 1
UNION ALL
(
SELECT 1
UNION DISTINCT
(
SELECT 1
UNION ALL
SELECT 1
)
UNION ALL
SELECT 1
);
SELECT ' ';
EXPLAIN SYNTAX
SELECT x
FROM
(
SELECT 1 AS x
UNION ALL
(
SELECT 1
UNION DISTINCT
(
SELECT 1
UNION ALL
SELECT 1
)
UNION ALL
SELECT 1
)
);
SELECT ' ';
EXPLAIN SYNTAX
SELECT x
FROM
(
SELECT 1 AS x
UNION ALL
(
SELECT 1
UNION ALL
SELECT 1
)
);
SELECT ' ';
EXPLAIN SYNTAX
SELECT 1
UNION ALL
SELECT 1
UNION DISTINCT
SELECT 1;
SELECT ' ';
EXPLAIN SYNTAX
(((((((((((((((SELECT 1)))))))))))))));
SELECT ' ';
EXPLAIN SYNTAX
(((((((((((((((SELECT 1 UNION DISTINCT SELECT 1))) UNION DISTINCT SELECT 1)))) UNION ALL SELECT 1))))))));