我有以下 SQL:
SELECT tab4.IRSpot as IRSpot, tab4.IRVol AS MaxPlauShift, tab4.VegElement AS MaxPlauLoss FROM
(SELECT tab1.IRSpot, MIN(tab1.VegaElement*Probability) AS PlausibleLoss FROM
(SELECT IRSpot, IRVol, VegaElement
FROM SEL_VegaElementMatrix()) tab1
JOIN
(SELECT IRSpot, IRVol, Probability
FROM Table_Name_2) tab2
ON tab1.IRSpot = tab2.IRSpot AND tab1.IRVol = tab2.IRVol
GROUP BY tab1.IRSpot) tab3
JOIN
(SELECT IRSpot, IRVol, VegaElement
FROM SEL_VegaElementMatrix()) tab4
ON tab3.PlausibleLoss = tab4.VegaElement AND tab3.IRSpot = tab4.IRSpot
tab3 返回一行 {2,0},而 tab4 返回许多行,其中八行包含相同的值 {2,0}。
我期待我的加入返回八行结果,因为我正在执行 JOIN 但我只返回一个结果行?