Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following questions based on the CLIENT and ORDER tables: CLIENT ClientId LastName FirstName Suburb Phone City Jason Rita Bella Boulevard 3432422 Sydney 12

image text in transcribed
Answer the following questions based on the CLIENT and ORDER tables: CLIENT ClientId LastName FirstName Suburb Phone City Jason Rita Bella Boulevard 3432422 Sydney 12 Smith Jackson High Park 5535333 Sydney B Wagner James Richmond 4425233 Perth + Blake Susan Rockdale $141412 Brisbane 15 Jones Tania Como 15474574 Melboume Lynn Karina Dural 123124 Sydney 17 Walters Max High Park 4574774 Perth 18 Poplar Liam Crasspark 1312425 Brisbane Noah Elwood 16746236 Melbourne 10 Henlon James Hawthrone 1235636 Darwin ORDER Order No Order Dese Client Order Date Shipped Date Country Total Amount 17895 3 12/10/18 (16/10/18 Australia 200.50 21678 Small Item 2 J05/01/1909/01/19 300.00 22456 Item ABC 14 10/03/19 12/03/19 France 100.75 124562 Medium Item 2 26/12/19 27/12/19 Australia 150.00 134764 13 Tier Designs l18/07/20 20/07/20 Japan 370.60 36533 Round Box 18 22/09/20 27/09/20 Australia 190.85 36536 Brand-005 22/09/20 24/09/20 China 216.75 37454 Express 11 11/11/20 14/11/20 Denmark 625.00 Delivery Robb Large Item Italy Questions: 1. Write CREATE and INSERT statements for the above tables and identify constraints. Make sure that primary key, foreign key, not null and other constraints are included in the table creation scripts. (3 marks) 2. Write SQL statements to fulfill the following requirements and provide the screenshot of the output: (7 marks) a. Display client details in descending order of the client first name. (1 mark) b. Find details of all clients whose last name begins with Ja'. Display results in descending order of country. (2 marks) c. Display number of clients living in Sydney. (2 marks) 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. (2 marks)

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago