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.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter7: Database Administration
Section: Chapter Questions
Problem 6TD: Perform the following tasks: a. Create an index named ITEM_INDEX1 on the ITEM_NUM column in the...
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage