6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is not equal 35000 and 37000 . 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.

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
icon
Concept explainers
Question
100%
Table Name
Item
Column name
Constraint
Primary key
Datatype
Varchar2
Varchar2
Varchar2
Size
6
ID
ITEM N AME
MANUFACTUR ER
30
PRICE
Number
Not Null
DELIVERY DATE
Date
Varchar2
STATUS
10
Table Name
Customer_ Details
Column name
ID
CUSTOMERNAME
Datatype
Varchar2
Constraint
Foreign Key
Size
Varchar2
Varchar2
30
30
LOCATION
CUSTOMERID
Varchar2
Number
QUAΝΤΙΤΥ
Data for Item table
ID
ΙTEΜ ΑΜΕ
MANUFACTURER
PRICE
DELIΙVERYΥ DAΤΕ
STATUS
COMPUTER
KEYBO ARD
COMP UTER
COMPUTER
09001
DELL
35000
12-June-2020
PENDING
09002
INTEX
10000
25-June-2020
PENDING
COMPL ETED
COMPL ETED
COMPL ETED
09003
SAMSUNG
32000
18-Feb-2020
09004
LENOVO
37000
о3-Аргil-2020
0900s
LAPTOP
DELL
57000
20-May-2020
Data for Customer_ Details table
ID
CUSTOMERNAME
CITY
CUSTOMERID
C0001
C0002
QUANΤITY
525
09001
KALIFA
NIZWA
09002
BARKA
8400
09003
09004
SOHAR
C0003
C0001
5250
525
NIZWA
09005
BARKA
C0004
3150
6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is not equal
35000 and 37000 .
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 'O'. (Use
Item and Customer_Details).
10. Write an SQL query to extract the first three characters of CUSTOMERNAME and the last three
characters of STATUS (Use Left outer join)
%3D
Transcribed Image Text:Table Name Item Column name Constraint Primary key Datatype Varchar2 Varchar2 Varchar2 Size 6 ID ITEM N AME MANUFACTUR ER 30 PRICE Number Not Null DELIVERY DATE Date Varchar2 STATUS 10 Table Name Customer_ Details Column name ID CUSTOMERNAME Datatype Varchar2 Constraint Foreign Key Size Varchar2 Varchar2 30 30 LOCATION CUSTOMERID Varchar2 Number QUAΝΤΙΤΥ Data for Item table ID ΙTEΜ ΑΜΕ MANUFACTURER PRICE DELIΙVERYΥ DAΤΕ STATUS COMPUTER KEYBO ARD COMP UTER COMPUTER 09001 DELL 35000 12-June-2020 PENDING 09002 INTEX 10000 25-June-2020 PENDING COMPL ETED COMPL ETED COMPL ETED 09003 SAMSUNG 32000 18-Feb-2020 09004 LENOVO 37000 о3-Аргil-2020 0900s LAPTOP DELL 57000 20-May-2020 Data for Customer_ Details table ID CUSTOMERNAME CITY CUSTOMERID C0001 C0002 QUANΤITY 525 09001 KALIFA NIZWA 09002 BARKA 8400 09003 09004 SOHAR C0003 C0001 5250 525 NIZWA 09005 BARKA C0004 3150 6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is not equal 35000 and 37000 . 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 'O'. (Use Item and Customer_Details). 10. Write an SQL query to extract the first three characters of CUSTOMERNAME and the last three characters of STATUS (Use Left outer join) %3D
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Query Syntax
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