我有多个具有相同列的子查询(year
,week
,value
)。我的目标是与所有年份一起制作一张桌子
我的查询有效,但我有很多重复的代码,查询需要比预期更多的时间。我正确地做UNION ALL
吗?
with year15 as(),
year16 as(),
year17 as()
select year, week, value
from year15
UNION ALL
select year, week, value
from year16
UNION ALL
select year, week, value
from year17