|
|
@@ -44,7 +44,7 @@ coalesce(ws_wc,0)+coalesce(cs_wc,0) other_chan_wholesale_cost,
|
|
|
coalesce(ws_sp,0)+coalesce(cs_sp,0) other_chan_sales_price
|
|
|
from ss
|
|
|
left join ws on (ws_sold_year=ss_sold_year and ws_item_sk=ss_item_sk and ws_customer_sk=ss_customer_sk)
|
|
|
-left join cs on (cs_sold_year=ss_sold_year and cs_item_sk=cs_item_sk and cs_customer_sk=ss_customer_sk)
|
|
|
+left join cs on (cs_sold_year=ss_sold_year and cs_item_sk=ss_item_sk and cs_customer_sk=ss_customer_sk)
|
|
|
where coalesce(ws_qty,0)>0 and coalesce(cs_qty, 0)>0 and ss_sold_year=2000
|
|
|
order by
|
|
|
ss_sold_year, ss_item_sk, ss_customer_sk,
|