Question: Write a query to display all the orders from the orders table issued by the salesman 'Ahmad'. 2) Write a query to display all

Write a query to display all the orders from the orders table issued by the salesman 'Ahmad'. 2) Write a query to display all the orders for the salesman who belongs to the city Hebron. 3) Write a query Consider the following tables and answer the questions below. Note: The data inside the tables are just

Write a query to display all the orders from the orders table issued by the salesman 'Ahmad'. 2) Write a query to display all the orders for the salesman who belongs to the city Hebron. 3) Write a query to find all the orders issued against the salesman who works for customer whose id is 3007. 4) Write a query to display all the orders which values are greater than the average order value for 10th October 2012. 5) Write a query to find all orders attributed to a salesman in Jerusalem. 6) Write a query to display the commission of all the salesmen servicing customers in Jerusalem. Consider the following tables and answer the questions below. Note: The data inside the tables are just samples and there are more data in the tables not shown. salesman_id 5001 5002 5005 ord_no 70001 70009 70002 customer_id 3002 3005 3001 3004 name Ali Samer Samia purch_amt 150.5 270.65 65.26 cust_name Ali Fadi Salman Maha city Jerusalem Hebron Ramallah commission 0.15 0.13 0.11 ord_date customer_id salesman_id 10/5/2012 3005 5002 9/10/2012 3001 5005 10/5/2012 3002 5001 city Ramallah Hebron Nablus Ramallah grade 100 200 150 300 salesman_id 5001 5002 5005 5006

Step by Step Solution

3.40 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Display all orders issued by the salesman Ahmad sql SELECT FROM orders WHERE salesmanid IN SELECT salesmanid FROM salesman WHERE name Ahmad Explanat... View full answer

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!