SQL Exercise 1:
Name___________________Student No._______________________
Go to the following link and type SQL statements to finish the following questions.
https://www.w3schools.com/SQL/trysql.asp?filename=trysql_op_in
1) List full details of all customer whose country is UK.
2) List all products’ ID with their supplier ID and category ID.
3) List all shipper IDs in all orders.
4) List all shipper IDs in all orders, with duplicates eliminated.
5) Display the total quantity of product 51 in all orders.
6) List IDs and names for all customers whose first name in their contact name is ‘Elizabeth’.
7) List all suppliers in UK or USA.
8) List the IDs of all orders whose quantity is no less than 40.
9) List all products, arranged in descending order of price.
10) Produce a list of orders in order of quantity. If quantity is same for some orders, then sort by product ID.
11) Find how many products whose ID is 51 are ordered totally.
12) Find how many orders that ordered product 71.
13) Find the average price of the products in category 2.
14) Find how many products whose prices is between 10 and 30, and the sum of their prices.
15) Find the number of orders placed in August 1996.
16) List the details of the most expensive product in category 2.
17) Find the highest price, the lowest price, and the average price of products in category 3.
18) Find the number of USA suppliers.
19) Find how many orders are shipped by shipper 2 in 1997.
20) Find the details of the order that has the minimum quantity.

——

SQL Exercise No. 1: Name_____________________

To answer the following questions, go to the following link and type SQL statements.

https://www.w3schools.com/SQL/trysql.asp?filename=trysql op in

1) Compile a list of all customers whose home country is the United Kingdom.

2) List the IDs of all products, along with their supplier IDs and category IDs.

3) Get custom essay samples and course-specific study resources via course hero homework for you service – Include all shipper IDs in every order.

4) Get custom essay samples and course-specific study resources via course hero homework for you service – Include all shipper IDs in all orders, removing duplicates.

5) In all orders, show the total quantity of product 51.

6) Make a list of all customers whose first name in their contact name is ‘Elizabeth.’

7) Make a list of all suppliers in the United Kingdom or the United States.

8) List the IDs of all orders with a quantity of at least 40.

9) Arrange all products in descending price order.

10) Create a

Published by
Write Papers
View all posts