Files
impala/testdata/workloads/tpch/queries/tpch-q17.test
ishaan 2b5df0c6ff [CDH5] Convert tpch schemas to decimal and change the queries where possible.
I used the following document for reference: http://www.tpc.org/tpch/spec/tpch2.1.0.pdf

Change-Id: Ic84db0628323c90e89552707f214bbb9fa2f2ae0
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3132
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins
2014-07-08 14:51:43 -07:00

19 lines
472 B
Plaintext

====
---- QUERY: TPCH-Q17
select sum(l_extendedprice) / 7.0 as avg_yearly
from lineitem l
join part p
on (p.p_partkey = l.l_partkey)
join ( select l_partkey as t_partkey,
0.2 * avg(l_quantity) as t_avg_quantity
from lineitem group by l_partkey ) as lt
on (lt.t_partkey = p.p_partkey)
where
p.p_brand = 'Brand#23' and
p.p_container = 'MED BOX' and
l.l_quantity < lt.t_avg_quantity
---- RESULTS
348406.05
---- TYPES
decimal
====