arcs / tasks /readable /016 /task_readable.md
yanlinf's picture
Release ARCS dataset
1fb4e2d verified
|
Raw History Blame Contribute Delete
569 Bytes

Task: 016

Database: retails

Question

Show the number of suppliers and customers from America.

Gold Query

SELECT
(SELECT COUNT(*) FROM supplier
WHERE s_nationkey IN (SELECT n_nationkey FROM nation WHERE n_name = 'UNITED STATES')
) AS supplier_count,
(SELECT COUNT(*) FROM customer
WHERE c_nationkey IN (SELECT n_nationkey FROM nation WHERE n_name = 'UNITED STATES')
) AS customer_count;

Execution Result:

supplier_count customer_count
391 6100

1 rows