Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

suggest a range of work sample exercises and design them

Answered: 1 week ago