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.

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
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage