Question: 1 . Find the supplier - customer pair ( s ) with the most expensive ( o _ totalprice ) order ( s ) completed

1. Find the supplier-customer pair(s) with the most expensive (o_totalprice) order(s) completed (i.e., value of o_orderstatus is F). Print the supplier name, the customer name, and the total price.
2. Find how many distinct customers have at least one order supplied exclusively by suppliers from AFRICA.
3. Find the distinct parts (p_name) ordered by customers from ASIA that are supplied by exactly 3 suppliers from AFRICA.
4. Find the nation(s) with the least developed industry, i.e., selling items totaling the smallest amount of money (l_extendedprice) in 1994(l_shipdate).
5. Find the number of customers who had at most three orders in November 1995(o_orderdate).
6. Find how many suppliers from PERU supply more than 40 different parts.
7. Find the total quantity (l quantity) of line items shipped per month (l_shipdate) in 1997. Hint: check function strftime to extract the month/year from a date.
8. Find how many suppliers have less than 50 distinct orders from customers in EGYPT and JORDAN together.
9. Find how many suppliers supply the least expensive part (p_retailprice).
10. Find the nation(s) having customers that spend the largest amount of money (o_totalprice).
11. Find the region where customers spend the largest amount of money (l extendedprice) buying items from suppliers in the same region.
12. Find how many parts are supplied by exactly one supplier from UNITED STATES.
13. Find the nation(s) with the largest number of customers.
14. Compute, for every country, the value of economic exchange, i.e., the difference between the number of items from suppliers in that country sold to customers in other countries and the number of items bought by local customers from foreign suppliers in 1997(l_shipdate).
15. Compute the change in the economic exchange for every country between 1996 and 1998. There should be two columns in the output for every country: 1997 and 1998. Hint: use CASE to select the values in the result.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!