Question: SQL Qn 4 . Write the following SQL statements using CLIENT and ORDER tables: CLIENT ClientId LastName FirstName Suburb Phone City 1 Jason Rita Bella

SQL
Qn 4. Write the following SQL statements using CLIENT and ORDER tables:
CLIENT
ClientId LastName FirstName Suburb Phone City
1 Jason Rita Bella Boulevard 3432422 Sydney
2 Smith Jackson High Park 5535333 Sydney
3 Wagner James Richmond 4425253 Perth
4 Blake Susan Rockdale 5141412 Brisbane
5 Jones Tania Como 5474574 Melbourne
6 Lynn Karina Dural 1231241 Sydney
7 Walters Max High Park 4574774 Perth
8 Poplar Liam Crasspark 1312425 Brisbane
9 Robb Noah Elwood 6746236 Melbourne
10 Henlon James Hawthrone 1235636 Darwin
ORDER
OrderNo OrderDesc ClientId OrderDate ShippedDate Country Total Amount
17895 Large Item 312/10/1816/10/18 Australia 200.50
21678 Small Item 205/01/1909/01/19 Italy 300.00
22456 Item ABC 410/03/1912/03/19 France 400.75
24562 Medium Item 226/12/1927/12/19 Australia 150.00
347643 Tier Design 518/07/2020/07/20 Japan 370.60
36533 Round Box 822/09/2027/09/20 Australia 190.85
36536 Brand-005322/09/2024/09/20 China 216.75
37454 Express Delivery 111/11/2014/11/20 Denmark 625.00
Questions:
a. Display client details in descending order of the clients first name and then by the last name in ascending order.
b. Find details of all clients whose last name begins with S. Display results in descending order of city.
c. Display the number of clients living in Sydney.
d. Display order ID, client details (name, ID of clients), and country for the orders placed in 2020. Display results in descending order of OrderID.

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 Databases Questions!