should be it
This commit is contained in:
23
external/duckdb/benchmark/tpch_plan_cost/queries/q03.sql
vendored
Normal file
23
external/duckdb/benchmark/tpch_plan_cost/queries/q03.sql
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
SELECT
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) AS revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
FROM
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
WHERE
|
||||
c_mktsegment = 'BUILDING'
|
||||
AND c_custkey = o_custkey
|
||||
AND l_orderkey = o_orderkey
|
||||
AND o_orderdate < CAST('1995-03-15' AS date)
|
||||
AND l_shipdate > CAST('1995-03-15' AS date)
|
||||
GROUP BY
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
ORDER BY
|
||||
revenue DESC,
|
||||
o_orderdate
|
||||
LIMIT 10;
|
||||
Reference in New Issue
Block a user