arcs / tasks /readable /024 /task_readable.md
yanlinf's picture
Release ARCS dataset
1fb4e2d verified
|
Raw History Blame Contribute Delete
1.6 kB

Task: 024

Database: retails

Question

Show large orders placed in February 1996.

Gold Query

WITH feb_orders AS (
SELECT o_orderkey, o_orderdate, o_totalprice
FROM orders
WHERE o_orderdate >= '1996-02-01'
AND o_orderdate < '1996-03-01'
)
SELECT o_orderkey, o_orderdate, o_totalprice
FROM feb_orders
WHERE o_totalprice > :large_threshold
ORDER BY o_totalprice DESC;

Execution Result:

o_orderkey o_orderdate o_totalprice
504642 1996-02-28 496726.35
3899781 1996-02-08 484817.17
3093796 1996-02-02 470846.96
2223461 1996-02-16 468971.22
64900 1996-02-27 457183.27
1236391 1996-02-25 451781.19
670467 1996-02-01 449855.78
1797286 1996-02-20 449853.91
3892065 1996-02-15 441455.53
304644 1996-02-25 441095.36
... ... ...
5062949 1996-02-29 1248.42
2182470 1996-02-15 1220.41
3787174 1996-02-06 1170.04
5337766 1996-02-20 1119.48
3732967 1996-02-17 1116.31
3599271 1996-02-26 1077.86
3753634 1996-02-24 1064.13
3080519 1996-02-07 977.02
1130592 1996-02-25 969.48
4659585 1996-02-04 930.11

... truncated (18264 rows total)