Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, you will learn how to write SQL codes to retrieve data from database. Before you start to write codes, always spend your

image text in transcribed

In this assignment, you will learn how to write SQL codes to retrieve data from database. Before you start to write codes, always spend your time to understand the design of the database (i.e., associative tables, unary relationship etc.). In addition, you will need to explore the database to see how the data is stored inside each table (e.g., how discontinued attribute in Products table store? How unary relationship in Employees table is designed?)

1. Simple SQL retrieve data problem: Show employees first name, last name, and address (1 point)

2. Complex SQL retrieve data problem: Show employees first name, last name, and territory that he/she serves (1 point)

3. Left/Right Joining SQL problem: Show order date and customers first name regardless they purchased order or not (1 point)

4. Unary Relationship SQL problem: Show managers first name and last name (1 point)

5. Show order date and its suppliers name (1 point)

6. For each order, show products name and total price after discount (1 point)

7. Show employees first name, last name and his/her managers first name, last name (1 point)

8. Show CEOs first name and the date he/she was hired (1 point)

9. Show order date, customers first name regardless they purchased order or not, and employees first name regardless they sold the order to the customer or not. (1 point)

10. Name your own query question and answer it (1 point)

Products Orders ha OD Employees Columme Customers Column Customer Conde ch Supplert Category ID Quartierin warda Employee Onders Yes Yes Terowy ve;& ## wa Yes 100 Lindelli Yes Portale varchar(1) Yes Powde County nah narchy Suppliers Comme Cordered to be Photo Comme char49 No Photo Path Customer Customer Demo ColumnName Corders. Nuliable 9 CD Carolype. No Onder Details Employee Territories Corey Phone Customer Demographies Columnae Corden.... Customer car No 9 TD Territories Categories Column Home Cardened Type Mulable CD Categoryne nar15 ha 9 TD Shippers Column Condensed Yes Region Calma Condens. N. ant Magent marche In this assignment, you will learn how to write SQL codes to retrieve data from database. Before you start to write codes, always spend your time to understand the design of the database (i.e., associative tables, unary relationship etc.). In addition, you will need to explore the database to see how the data is stored inside each table (e.g., how discontinued attribute in Products table store? How unary relationship in Employees table is designed?)

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

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions