1. Write an SQL query to find the CUSTOMERNAME who order the COMPUTERS. 2. Write an SQL query to change the LOCATION of CUSTOMER as “BARKA" and who's quantity is LESS than 1000. 3. Write an SQL query to display all information from items table and display orders delivered in the month of June.

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
1. Write an SQL query to find the CUSTOMERNAME who order the COMPUTERS.
2. Write an SQL query to change the LOCATION of CUSTOMER as “BARKA" and who's quantity is LESS
than 1000.
3. Write an SQL query to display all information from items table and display orders delivered in the month of
June.
4. Write an SQL query to determine the Maximum price, Minimum price and count the items. Rename the output
as Max price Min price. Neitems respectively.
5. Write an SQL query to display the month (in alphabets) and date when the orders are delivered to the
CUSTOMERS.
6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is greater than 30000.
7. Write an SQL query to display and find the total amount using the columns PRICE and QUANTITY and create
an alias as "Total Amount" for this calculation. (Total Amount = Price * Quantity). (Use Item and
Customer Details).
8. Write an SQL Query to determine the months between CURRENTDATE and DELIVERY_DATE.
9. Write an SQL query to find the number of weeks between DELIVERY_DATE and CURRENTDATE and
whose MANUFACTURER NAME having the character with 'E'. (Use Item and CustomerDetails).
10. Write an SQL query to extract the first three characters of CUSTOMERNAME and the last three characters of
MANUFACTURER NAMES. (Use Item and Customer Details)
Transcribed Image Text:1. Write an SQL query to find the CUSTOMERNAME who order the COMPUTERS. 2. Write an SQL query to change the LOCATION of CUSTOMER as “BARKA" and who's quantity is LESS than 1000. 3. Write an SQL query to display all information from items table and display orders delivered in the month of June. 4. Write an SQL query to determine the Maximum price, Minimum price and count the items. Rename the output as Max price Min price. Neitems respectively. 5. Write an SQL query to display the month (in alphabets) and date when the orders are delivered to the CUSTOMERS. 6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is greater than 30000. 7. Write an SQL query to display and find the total amount using the columns PRICE and QUANTITY and create an alias as "Total Amount" for this calculation. (Total Amount = Price * Quantity). (Use Item and Customer Details). 8. Write an SQL Query to determine the months between CURRENTDATE and DELIVERY_DATE. 9. Write an SQL query to find the number of weeks between DELIVERY_DATE and CURRENTDATE and whose MANUFACTURER NAME having the character with 'E'. (Use Item and CustomerDetails). 10. Write an SQL query to extract the first three characters of CUSTOMERNAME and the last three characters of MANUFACTURER NAMES. (Use Item and Customer Details)
Table Name : Item
Column name
Datatype
Varchar2
Varchar2
Varchar2
Number
Size
Constraint
ID
Primary key
ITEM NAME
MANUFACTURER
PRICE
|DELIVERY DATE
8
30
8.
Not Null
Date
Table Name : Customer Details
Column name
Constraint
Datatype
Varchar2
Size
ID
Foreign Key
Varchar2
Varchar2
CUSTOMERNAME
30
LOCATION
30
CUSTOMERID
Varchar2
8
QUANTITY
Number
8
Data for Item table
ID
ITEMNAME MANUFACTURER | PRICE DELIVERY DATE
09001
COMPUTER
DELL
35000
12-June-2004
09002 | KEYBOARD INTEX
10000
25-June-2004
09003 COMPUTER | SAMSUNG
09004 COMPUTER | LENOVO
32000
18-Feb-2004
37000 03-April-2004
57000 20-May-2004
09005 | LAPTOP
DELL
Data for Customer Details table
CUSTOMERID
QUANTITY
525
ID
CUSTOMERNAME CITY
09001 | KALIFA
09002 ABDUL AZIZ
09003 ABDUL
09004 | МОНАМED
09005 AHAMED
NIZWA
CO001
BARKA
8400
5250
525
CO002
SOHAR
C0003
NIZWA
BARKA
CO001
CO004
3150
Transcribed Image Text:Table Name : Item Column name Datatype Varchar2 Varchar2 Varchar2 Number Size Constraint ID Primary key ITEM NAME MANUFACTURER PRICE |DELIVERY DATE 8 30 8. Not Null Date Table Name : Customer Details Column name Constraint Datatype Varchar2 Size ID Foreign Key Varchar2 Varchar2 CUSTOMERNAME 30 LOCATION 30 CUSTOMERID Varchar2 8 QUANTITY Number 8 Data for Item table ID ITEMNAME MANUFACTURER | PRICE DELIVERY DATE 09001 COMPUTER DELL 35000 12-June-2004 09002 | KEYBOARD INTEX 10000 25-June-2004 09003 COMPUTER | SAMSUNG 09004 COMPUTER | LENOVO 32000 18-Feb-2004 37000 03-April-2004 57000 20-May-2004 09005 | LAPTOP DELL Data for Customer Details table CUSTOMERID QUANTITY 525 ID CUSTOMERNAME CITY 09001 | KALIFA 09002 ABDUL AZIZ 09003 ABDUL 09004 | МОНАМED 09005 AHAMED NIZWA CO001 BARKA 8400 5250 525 CO002 SOHAR C0003 NIZWA BARKA CO001 CO004 3150
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
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.
Similar questions
  • SEE MORE QUESTIONS
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