mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-09 22:42:57 +00:00
17 lines
358 B
SQL
17 lines
358 B
SQL
-- $ID$
|
|
-- TPC-H/TPC-R Forecasting Revenue Change Query (Q6)
|
|
-- Functional Query Definition
|
|
-- Approved February 1998
|
|
|
|
|
|
select
|
|
sum(l_extendedprice * l_discount) as revenue
|
|
from
|
|
lineitem
|
|
where
|
|
l_shipdate >= date '1996-01-01'
|
|
and l_shipdate < date '1996-01-01' + interval '1' year
|
|
and l_discount between 0.02 - 0.01 and 0.02 + 0.01
|
|
and l_quantity < 24
|
|
;
|