Files
impala/testdata/workloads/tpch/queries/tpch-q11.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

26 lines
634 B
Plaintext

====
---- QUERY: TPCH-Q11_QUERY_1
# Q11 - Important Stock Identification
# TODO: Need to add part 2 of this query. It required some more advanced modifications.
insert overwrite table q11_part_tmp
select ps_partkey, sum(ps_supplycost * ps_availqty) as part_value
from nation n
join supplier s
on s.s_nationkey = n.n_nationkey and n.n_name = 'GERMANY'
join partsupp ps
on ps.ps_suppkey = s.s_suppkey
group by ps_partkey
---- SETUP
RESET q11_sum_tmp
---- RESULTS
: 29818
====
---- QUERY: TPCH-Q11_QUERY_2
insert overwrite table q11_sum_tmp
select sum(part_value)
from q11_part_tmp
---- SETUP
RESET q11_part_tmp
---- RESULTS
: 1
====