我有以下四个具有以下结构的表
表 A
ColA1 ColA2 ColA3 ColA4 ColA5
-----------------------------------------
AA 100 CC DD EE
表 B
ColB1 ColB2 ColB3 ColB4 ColB5
-------------------------------------------
AA 100 40452 A9 CDE
当它们two tables
像下面这样加入时:
Select colA1,ColA2, ColA3, ColA4, ColB3,ColB4, ColB5
from table A
Left outer join
(select ColB3, ColB4, ColB5
from table B
where colB3 = (select max(colB3) from table B
)
on (colA1 = colB1 and ColA2 = col B2);
现在我必须加入下table C
一个table B
表C结构是
ColD1 ColD2 ColD3
--------------------------------
Desc1 A9 Executive
Desc1 A7 Engineer
我有共同的专栏,比如ColD2 and colB4
得到Col D3
我如何加入existing query + join between
表b和表c?