datafusion-sqlparse/tests/queries/tpch/17.sql
Daniël Heres 5cab18963e
Add TPCH reggression tests (#221)
* Add TPC-H reggression tests
2020-07-14 21:48:07 +02:00

20 lines
318 B
SQL

-- using default substitutions
select
sum(l_extendedprice) / 7.0 as avg_yearly
from
lineitem,
part
where
p_partkey = l_partkey
and p_brand = 'Brand#23'
and p_container = 'MED BOX'
and l_quantity < (
select
0.2 * avg(l_quantity)
from
lineitem
where
l_partkey = p_partkey
);