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.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6db8ece1-e3ff-400c-9794-1c151a9010e9%2Facb9afc3-6ca5-42fd-b8b7-cb8c54eefb55%2F5mjs84f_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
![Systems Architecture](https://www.bartleby.com/isbn_cover_images/9781305080195/9781305080195_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Principles of Information Systems (MindTap Course…](https://www.bartleby.com/isbn_cover_images/9781285867168/9781285867168_smallCoverImage.gif)