Refer the given table and answer the question that follow: TABLE : CLIENT Client no Client_Name Address C100 C101 C102 DELL SANDISK SAMSUNG | KOREA LENOVO Order_Date AMERICA 05-05-2018 KINGDOM 10-10-1998 12-08-2010 10-07-1998 C103 JAPAN TABLE: CLIENT_DETAILS Client_no Order_No Product Cost Quantity Status C100 C101 C102 C103 C104 a. Write an SQL query to display client_no, check the quantity, and display the types of Customer based on the condition given below [USE CASE EXPRESSION] 100.40 SMARTWATCH 300.50 4000 2000 R001 JIOCLASS 3000 PROGRESS R002 DELIVERED R001 SPYCAMERA 600.10 PROGRESS DELIVERED PROGRESS R003 IROBOT 4000 400 R002 RADAR 500.00 IF it is 4000, then retum "GOLD' IF it is 3000, then retum 'SILVER' IF it is 2000, them retum 'BRONZE' ELSE retum 'OTHERS' b. Write an SQL query to display client_no.client_name, product where the quantity is 2000 or 4000. [Use - LEFT OUTER JOIN] c. Write an SQL query to display the client_no, order_date who ordered before the client 'C102"; [Hint: Use Subquery].
Refer the given table and answer the question that follow: TABLE : CLIENT Client no Client_Name Address C100 C101 C102 DELL SANDISK SAMSUNG | KOREA LENOVO Order_Date AMERICA 05-05-2018 KINGDOM 10-10-1998 12-08-2010 10-07-1998 C103 JAPAN TABLE: CLIENT_DETAILS Client_no Order_No Product Cost Quantity Status C100 C101 C102 C103 C104 a. Write an SQL query to display client_no, check the quantity, and display the types of Customer based on the condition given below [USE CASE EXPRESSION] 100.40 SMARTWATCH 300.50 4000 2000 R001 JIOCLASS 3000 PROGRESS R002 DELIVERED R001 SPYCAMERA 600.10 PROGRESS DELIVERED PROGRESS R003 IROBOT 4000 400 R002 RADAR 500.00 IF it is 4000, then retum "GOLD' IF it is 3000, then retum 'SILVER' IF it is 2000, them retum 'BRONZE' ELSE retum 'OTHERS' b. Write an SQL query to display client_no.client_name, product where the quantity is 2000 or 4000. [Use - LEFT OUTER JOIN] c. Write an SQL query to display the client_no, order_date who ordered before the client 'C102"; [Hint: Use Subquery].
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Only answer for (a) and (b) and (c)
![Refer the given table and answer the question that follow:
TABLE : CLIENT
Client_no Client_Name | Address
DELL
Order_Date
AMERICA 05-05-2018
KINGDOM 10-10-1998
12-08-2010
10-07-1998
C100
C101
C102
C103
TABLE : CLIENT_DETAILS
Client_no
|C100
SANDISK
SAMSUNG KOREA
LENOVO
JAPAN
Order_No Product
Cost
Quantity Status
RO01
JIOCLASS
100.40
SMARTWATCH 300.50
3000
PROGRESS
DELIVERED
PROGRESS
DELIVERED
PROGRESS
a. Write an SQL query to display client_no, check the quantity, and display the types of
C101
C102
C103
C104
R002
4000
600.10 2000
4000
400
RO01
SPYCAMERA
R003
R002
IROBOT
RADAR
500.00
Customer based on the condition given below (USE CASE EXPRESSION]
IF it is 4000, then return 'GOLD'
IF it is 3000, then retum 'SILVER'
IF it is 2000, then retum 'BRONZE'
ELSE retum 'OTHERS'
b. Write an SQL query to display client_no,client_name, product where the quantity is 2000 or
4000. [Use - LEFT OUTER JOIN]
c. Write an SQL query to display the client_no, order_date who ordered before the client 'C102';
[Hint: Use Subquery].
d. Write an SQL query to display the client_no,order_no,status from client (matched rows), and
client_details (matched rows), arrange of cost using nulls first. [Use INNER JOIN].
Act
Go](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1b6bce81-726a-4730-bd6e-2268d714ea11%2Fa619cce2-e6df-418b-9609-8713cc6ba169%2F8edsc9n_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Refer the given table and answer the question that follow:
TABLE : CLIENT
Client_no Client_Name | Address
DELL
Order_Date
AMERICA 05-05-2018
KINGDOM 10-10-1998
12-08-2010
10-07-1998
C100
C101
C102
C103
TABLE : CLIENT_DETAILS
Client_no
|C100
SANDISK
SAMSUNG KOREA
LENOVO
JAPAN
Order_No Product
Cost
Quantity Status
RO01
JIOCLASS
100.40
SMARTWATCH 300.50
3000
PROGRESS
DELIVERED
PROGRESS
DELIVERED
PROGRESS
a. Write an SQL query to display client_no, check the quantity, and display the types of
C101
C102
C103
C104
R002
4000
600.10 2000
4000
400
RO01
SPYCAMERA
R003
R002
IROBOT
RADAR
500.00
Customer based on the condition given below (USE CASE EXPRESSION]
IF it is 4000, then return 'GOLD'
IF it is 3000, then retum 'SILVER'
IF it is 2000, then retum 'BRONZE'
ELSE retum 'OTHERS'
b. Write an SQL query to display client_no,client_name, product where the quantity is 2000 or
4000. [Use - LEFT OUTER JOIN]
c. Write an SQL query to display the client_no, order_date who ordered before the client 'C102';
[Hint: Use Subquery].
d. Write an SQL query to display the client_no,order_no,status from client (matched rows), and
client_details (matched rows), arrange of cost using nulls first. [Use INNER JOIN].
Act
Go
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education