d. Write an SQL query to display the client_no.order_no,status from client (matched rows), and client_details (matched rows), arange of cost using nulls first. [Use INNER JOIN].

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
icon
Related questions
Question
Answer only for (d)
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
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
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Harmonic number
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
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education