我使用WITH查询做了一个选择:
WITH test AS (select id, sum(value) as value from test group by id)
SELECT name, t.value from names JOIN test t ON (t.id = names.id)
但我需要使用2个WITH查询,有什么方法可以实现吗?
答案 0 :(得分:0)
WITH
name1 AS (SELECT ...),
name2 AS (SELECT ...)
SELECT ...