|
Download tasks/readable/009/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 788 Bytes
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/009/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/009/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/009/task_readable.md
788 Bytes
Task: 009
Database: retails
Question
List the customer who made the highest number of purchases using rail shipping.
Gold Query
WITH customer_rail_lineitems AS (
SELECT c.c_custkey,
c.c_name,
COUNT(*) AS rail_ship_count
FROM customer c
JOIN orders o ON c.c_custkey = o.o_custkey
JOIN lineitem l ON o.o_orderkey = l.l_orderkey
WHERE l.l_shipmode = 'RAIL'
GROUP BY c.c_custkey, c.c_name
)
SELECT c.c_custkey, c.c_name, c.rail_ship_count
FROM customer_rail_lineitems c
WHERE c.rail_ship_count = (
SELECT MAX(rail_ship_count) FROM customer_rail_lineitems
);
Execution Result:
| c_custkey | c_name | rail_ship_count |
|---|---|---|
| 63035 | Customer#000063035 | 28 |
1 rows