tpch/queries/q6.sql (9 lines of code) (raw):
-- SQLBench-H query 6 derived from TPC-H query 6 under the terms of the TPC Fair Use Policy.
-- TPC-H queries are Copyright 1993-2022 Transaction Processing Performance Council.
select
sum(l_extendedprice * l_discount) as revenue
from
lineitem
where
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1994-01-01' + interval '1' year
and l_discount between 0.04 - 0.01 and 0.04 + 0.01
and l_quantity < 24;