aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg-tpch/q06.sql
blob: 4f6c0b039b5e55eec867013a7977d12c3dd3e97a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--!syntax_pg
--TPC-H Q6


select
sum(l_extendedprice*l_discount) as revenue
from 
plato."lineitem"
where 
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1994-01-01' + interval '1' year
and l_discount between (0.06 - 0.01)::numeric and (0.06 + 0.01)::numeric
and l_quantity < 24::numeric;