| name Q05 | |
| group tpch | |
| subgroup sf${BENCH_SIZE:-1} | |
| init sql_benchmarks/tpch/init/set_config.sql | |
| load sql_benchmarks/tpch/init/load_${TPCH_FILE_TYPE:-parquet}.sql | |
| assert I | |
| SELECT COUNT(*) > 0 from lineitem; | |
| ---- | |
| true | |
| run | |
| select n_name, | |
| sum(l_extendedprice * (1 - l_discount)) as revenue | |
| from customer, | |
| orders, | |
| lineitem, | |
| supplier, | |
| nation, | |
| region | |
| where c_custkey = o_custkey | |
| and l_orderkey = o_orderkey | |
| and l_suppkey = s_suppkey | |
| and c_nationkey = s_nationkey | |
| and s_nationkey = n_nationkey | |
| and n_regionkey = r_regionkey | |
| and r_name = 'ASIA' | |
| and o_orderdate >= date '1994-01-01' | |
| and o_orderdate < date '1994-01-01' + interval '1' year | |
| group by n_name | |
| order by revenue desc; | |
| result sql_benchmarks/tpch/results/sf${BENCH_SIZE:-1}/q05.csv | |
| cleanup sql_benchmarks/tpch/init/cleanup.sql |