|
Download tasks/readable/010/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/010/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/010/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/010/task_readable.md
745 Bytes
| # Task: 010 | |
| **Database:** retails | |
| ## Question | |
| Find the regions associated with the highest-value order in the car industry. | |
| ## Gold Query | |
| ```sql | |
| WITH automobile_orders AS ( | |
| SELECT o.o_orderkey, o.o_totalprice, c.c_nationkey | |
| FROM orders o | |
| JOIN customer c ON o.o_custkey = c.c_custkey | |
| WHERE c.c_mktsegment = 'AUTOMOBILE' | |
| ), | |
| max_order AS ( | |
| SELECT MAX(o_totalprice) as max_price | |
| FROM automobile_orders | |
| ) | |
| SELECT DISTINCT r.r_regionkey, r.r_name | |
| FROM automobile_orders ao | |
| JOIN max_order mo ON ao.o_totalprice = mo.max_price | |
| JOIN nation n ON ao.c_nationkey = n.n_nationkey | |
| JOIN region r ON n.n_regionkey = r.r_regionkey; | |
| ``` | |
| **Execution Result:** | |
| | r_regionkey | r_name | | |
| |---------------|----------| | |
| | 3 | EUROPE | | |
| *1 rows* |