0
我怎麼能修改下面工會SELECT語句中的任意連接select語句的方法,其從表1和表2總結的價格,我想還有,怎樣才能修改此select語句
select CODE, SUM(PRICE) as PRICE
from (SELECT CODE, SUM(PRICE) as PRICE
FROM TABLE1
where ID='IBK' and cast(TMSTAMP_UPDATE as DATE)='2014-03-31'
GROUP BY CODE
union
SELECT CODE, SUM(PRICE) as PRICE
FROM TABLE2
where ID='IBK' and cast(TMSTAMP_UPDATE as DATE)='2014-03-31'
GROUP BY CODE) GROUP BY CODE;
謝謝提前
我不明白你的問題在所有。你可以嘗試改寫它嗎? –
你能否解釋一下爲什麼一個連接會成爲一個問題,還有一個商業目的是從一個連接改變它 – skv