在Talend與法定的繼承權的行數我有3個表如何指望甲骨文
supplier(id_supp, name, adress, ...)
Customer(id_cust, name, adress, ...)
Order(id_order, ref_cust, ref_supp, date_order...)
我想要通過Supplier
計算的訂單數,LAST_WEEK工作,與Talend
select
supp.name,
(
select
count(*)
from
order
where
date_order between sysdate-7 and sysdate
nd ref_supp=id_supp
) as week_1,
(
select
count(*)
from
order
where
date_order between sysdate-14 and sysdate-7
nd ref_supp=id_supp
) as week_2
from supplier supp
爲我這樣做是什麼resaon,是我的查詢走上了多少時間
因此,您的查詢工作,你只是想知道爲什麼它效率低下? –
我不知道如何使它與Talend:/ –