lava-oushudb-dt-sql-parser/test/parser/flink/syntax/fixtures/selectSetOperations.sql
Hayden bb0fad1dbe
refactor: standard naming (#278)
* refactor: rename flinksql to flink

* refactor: rename pgsql to postgresql

* refactor: rename trinosql to trino

* refactor: replace all default exports with named export

* refactor: rename basicParser to basicSQL

* refactor: rename basic-parser-types to types

* refactor: replace arrow func with plain func
2024-03-27 10:33:25 +08:00

28 lines
528 B
SQL

-- UNION
(SELECT s FROM t1) UNION (SELECT s FROM t2);
(SELECT s FROM t1) UNION ALL (SELECT s FROM t2);
-- INTERSECT
(SELECT s FROM t1) INTERSECT (SELECT s FROM t2);
(SELECT s FROM t1) INTERSECT ALL (SELECT s FROM t2);
-- EXPECT
(SELECT s FROM t1) EXCEPT (SELECT s FROM t2);
(SELECT s FROM t1) EXCEPT ALL (SELECT s FROM t2);
-- IN
SELECT user, amount
FROM Orders
WHERE product IN (
SELECT product FROM NewProducts
)
-- EXISTS
SELECT user, amount
FROM Orders
WHERE product EXISTS (
SELECT product FROM NewProducts
)