2017-07-21 02:47:45 +02:00
|
|
|
-- TPC_H Query 14 - Promotion Effect
|
|
|
|
SELECT 100.00* SUM(CASE WHEN P_TYPE LIKE 'PROMO%%' THEN L_EXTENDEDPRICE*(1-L_DISCOUNT)
|
|
|
|
ELSE 0 END) / SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS PROMO_REVENUE
|
2018-10-10 16:33:53 +02:00
|
|
|
FROM LINEITEM, PART
|
2017-07-21 02:47:45 +02:00
|
|
|
WHERE L_PARTKEY = P_PARTKEY AND L_SHIPDATE >= '1995-09-01' AND L_SHIPDATE < dateadd(mm, 1, '1995-09-01');
|