build sales based mix
This commit is contained in:
parent
d521a30752
commit
b7b3b05e2c
@ -50,8 +50,7 @@ GROUP BY
|
|||||||
part_descr
|
part_descr
|
||||||
,bill_cust_descr
|
,bill_cust_descr
|
||||||
,ship_cust_descr
|
,ship_cust_descr
|
||||||
,SUM(units) units
|
,SUM(value_usd)/(SELECT SUM(value_usd) FROM baseline) mix
|
||||||
,SUM(value_usd) value_usd
|
|
||||||
FROM
|
FROM
|
||||||
base
|
base
|
||||||
GROUP BY
|
GROUP BY
|
||||||
@ -59,7 +58,7 @@ GROUP BY
|
|||||||
,bill_cust_descr
|
,bill_cust_descr
|
||||||
,ship_cust_descr
|
,ship_cust_descr
|
||||||
ORDER BY
|
ORDER BY
|
||||||
value_usd desc
|
mix desc
|
||||||
)
|
)
|
||||||
,months AS (
|
,months AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user