You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
361 B

--begin q06
-- $ID$
-- TPC-H/TPC-R Forecasting Revenue Change Query (Q6)
-- Functional Query Definition
-- Approved February 1998
:x
:o
select
sum(l_extendedprice * l_discount) as revenue
from
tpch.lineitem
where
l_shipdate >= date ':1'
and l_shipdate < ADD_YEARS(date ':1', 1)
and l_discount between :2 - 0.01 and :2 + 0.01
and l_quantity < :3;
--end q06