我有一个在Oracle中使用显式JOIN的查询,但我想将其转换为基本的select where
。
查询是:
Select
bla bla bla
from
aMeterilisedView c1
join
aMeterilisedView c2 on c2.id > c1.id and c2.idclient = c1.idclient
join
(select c1.id, AVG(c) as moy
from aMeterilisedView c1
group by c1.id) m1 on c1.id = m1.id
join
(select c1.id, AVG(c) as moy
from aMeterilisedView c1
group by c1.id) m2 on c2.id = m2.id
但出于学习目的,我想使用与
类似的东西Select bla bla bla
from aMeterilisedView c1
where ....
Union (select etc...
这个想法是我不想使用“加入”甚至认为它好多了,但我想了解旧的基本步骤选择哪个过程。