| ==== |
| ---- QUERY: TPCH-Q5 |
| # Q5 - Local Supplier Volume Query |
| select |
| n_name, |
| round(sum(l_extendedprice * (1 - l_discount)), 2) 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 >= '1994-01-01' |
| and o_orderdate < '1995-01-01' |
| group by |
| n_name |
| order by |
| revenue desc |
| ---- RESULTS |
| 'INDONESIA',55502041.17 |
| 'VIETNAM',55295087.00 |
| 'CHINA',53724494.26 |
| 'INDIA',52035512.00 |
| 'JAPAN',45410175.70 |
| ---- TYPES |
| string, double |
| ==== |