Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Postgresqlの1つのクエリに2つのCTEを含めることはできますか?
1 つのテーブルではなく 1 つのクエリを意味する場合は、可能です。例えば:
WITH cte1 AS ( ... ), cte2 AS ( ... ) SELECT * FROM cte1, cte2
はい、できました。次のようなネストされた CTE を持つことができます。
WITH F AS (WITH D AS (.....) SELECT .... FROM (...) ;