Question: Question. Given the structure of inventory database, answer the following: salesman Y SALESMAN_ID NAME CITY COMMISSION NUMERIC (5) VARCHAR 30 ) VARCHAR ( 15 )

 Question. Given the structure of inventory database, answer the following: salesmanY SALESMAN_ID NAME CITY COMMISSION NUMERIC (5) VARCHAR 30 ) VARCHAR (

Question. Given the structure of inventory database, answer the following: salesman Y SALESMAN_ID NAME CITY COMMISSION NUMERIC (5) VARCHAR 30 ) VARCHAR ( 15 ) DECIMAL(5.2) customer Y CUSTOMER D NUMERIC (5) CUST_NAME VARCHAR ( 30 ) CITY VARCHAR (15) GRADE NUMERIC (3) SALESMAN NUMERIC (5) orders FORD NO NUMERIC (5) PURCH AMT DECIMAL (8.2) ORD_DATE DATE CUSTOMER D NUMERIC (5) SALESMAN ID NUMERIC (5) 1. Write a SQL statement to create the table orders. 2- Write a SQL statement to display the name of customers and the name of salesmen they dealt with. 3- Write a query which will retrieve all the cities of all customers, without duplicates. 4- Write a SQL statement to display ID and names of customers, who belongs to the city of "Rome". 5- Write a SQL statement to find all the information of salesman who get the commission within a range of 0.1 and 0.3 and belongs to the city of "Rome". 6- Write a SQL statement to find the names and IDs of salesmen whose name containing exactly 5 characters with the second character is 'Z' or whose names are ending with the letter 'n'. 7- Write a SQL statement to list the purchase amount (PURCH_AMT) such that the lowest purchase amount will come first. 8- Write a query that lists the names of all customers who have grade of 3 or belong to city of "Paris" (use set operations- i.e. UNION, INTERSECT, or EXCEPT). 9. Write a query to add into the Salesman table the values: salesman id = 5004, name=Paul Sam, city= Vienna, and commission = 0.16. 10-Write a query to delete from the customer table all the tuples that have no value for city 11-Write a query to update the purchase amount of the order number 70002 to 70.5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!