bb0fad1dbe
* 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
28 lines
528 B
SQL
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
|
|
) |