Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Table Name: Sales Order Column name Datatype Size Constraint Ordero Varchar26 Primary key Clientno Varchar26 Orderdate Date 30 Not Null Address Varchar2 30 Salesmanno Varchar26

image text in transcribed
Table Name: Sales Order Column name Datatype Size Constraint Ordero Varchar26 Primary key Clientno Varchar26 Orderdate Date 30 Not Null Address Varchar2 30 Salesmanno Varchar26 Delivery type Char 1 BHIYn Char 1 Table Name : Sales Order Details Column name Datatype Size Constraint Orderna Varchar26 Foreign Key Clientno Varchar26 Qty Ordered Number 8 Oty Display Number 8 Productrate Number 10,2 Data for sales order Order no Client no Orderdate Address Salesmanno Delivery Type BillyN 0900100001 12-June-2004 NIZWA S0001 09002 C0OO2 25-June-2004 BARKA SO0O2 09003 C0003 18-Feb-2004 SOHAR S0003 09004 C0001 03-April-2004 NIZWA S0001 09005 00004 20-May-2004 MOBALA S0002 F p F F P ZZZ Data for Sales Order detail table Orderno Cliento Qty Ordered Qty Display Productrate 09001 C00014 525 09002 C002 2 1 8400 09003 C00032 1 5250 09004 C0001 10 0 525 09005 C00043 3 3130 11. Write an SQL query to find the clientno who have product rate greater than 3000. (Hint: Use Sales order details table). 12. Write an SQL query to change the Address of client as IBRI" and who's Delivery Type is P. (Hint: Use Sales order table) 13. Write an SQL query to display all information from Sales order table for orders placed in the month of June (Hint: Use Sales order table) 14. Write an SQL query to determine the maximum and minimum product rate. Rename the output as Max_sales and Min sales respectively. (Hint: Use Sales order detail table). 15. Write an SQL query to display the month (in alphabets) and date when the orders are placed by the clients. (Hint: Use Orderdate) (Hint: Use Sales order table). 16. Write an SQL query to display the Orderno, clientno, Salesmanno, Bill status Billyn) and qtyDisplay is less than 2. (Hint: Use Sales order table and Sales order detail table) 17. Write an SQL query to find the Salesmanno, Orderdate, qty ordered and whose Bill status is "Y". (Hint: Use Sales order table and Sales order detail table) 18. Write an SQL query to determine the Clientno, Salesmanno,Delytype. Billyn and whose product rate between 1000 and 5000. (Hint: Use Sales order table and Sales order detail table) 19. Write an SQL Query to determine the months between orderdate and currentdate 20. Write an SQL query to find the number of weeks between onderdate and currentdate and whose delivery type is "F". (Hint: Use Sales order detail table)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago