should be it
This commit is contained in:
24
external/duckdb/benchmark/tpch_plan_cost/queries/q05.sql
vendored
Normal file
24
external/duckdb/benchmark/tpch_plan_cost/queries/q05.sql
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
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 >= CAST('1994-01-01' AS date)
|
||||
AND o_orderdate < CAST('1995-01-01' AS date)
|
||||
GROUP BY
|
||||
n_name
|
||||
ORDER BY
|
||||
revenue DESC;
|
||||
Reference in New Issue
Block a user