Write a query to display all the orders from the orders table issued by the salesman...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date:
Students also viewed these databases questions
-
8-1 This planar water jet is deflected by a fixed vane. What are the x and y components of force per unit width needed to hold the vane stationary? Neglect gravity. Oil (S=0.90) V2 30
-
ConAir (CA) commercial airlines company requires you experience in database design and have approached you to assist in the design of their new airline database system. They urgently need to have...
-
3. A T. Rex, triceratops, and velociraptor stand in a triangle in a bit of a show down. The T. Rex is 12 m from the triceratops. The raptor is 20 m from triceratops. The triceratops has calculated...
-
Builder Products, Incorporated, uses the weighted-average method in its process costing system. It manufactures a caulking compound that goes through three processing stages prior to completion....
-
A company is making an investment of $2,500,000 that will yield the following cash flows: Year 1 .........................$ 250,000 Year 2 .........................$ 440,000 Year 3...
-
SuperPart, an auto parts distributor, has a large warehouse in the Chicago region and is deciding on a policy for the use of TL or LTL transportation for inbound shipping. LTL shipping costs $1 per...
-
1.10 Aidan, the MNE. At what point in the globalization process did Aidan become a multinational enter- prise (MNE)?
-
Dollar-Value LIFO Presented below is information related to Martin Company. Compute the ending inventory for Martin Company for 2007 through 2012 using the dollar-value LIFO method. Ending Inventory...
-
Prepare a Cash Budget for the months of January to March 2017 Sales information for November and December of 2016 and Sales forcast for January to March of 2017 are November (2016) 170,000 December...
-
Bell Corporation purchases all of the outstanding stock of Stockdon Corporation for $220,000 in cash on January 1, 2017. On the purchase date, Stockdon Corporation has the following condensed balance...
-
please give me the data for The performance of Village Ventures & The amount of equity that Solon would be giving up by leaving the firm. Village Venture Case fufth edition josh lerner
-
There're a total of 4 questions. Table 9.1 :https://ezt.prod.mheducation.com/Media/Connect_Production/bne/slater_14e/table_9_1.htm 6 10 points eBook det Hint Word Problem 9-21 (Static) [LU 9-2 (1)]...
-
Sales Cost of goods sold Gross margin Selling and administrative expenses Net operating loss $ 1,641,100 1,235,068 406,032 630,000 $ (223,968) Hi-Tek produced and sold 60,100 units of B300 at a price...
-
Suppose I have some function, kwyjibo: private int kwyjibo(int v) { int w = v % 2; if (w = 3) { return 8; } else { return w / 2; } } If I print out the result of calling kwyjibo, passing it some...
-
In a country where beer gardens are a popular part of everyday life, rising beer prices and bottle shortages could threaten normal buyer behavior. Consider the spillover effects of higher beer prices...
-
Reflect on the competition between Germany's breweries. Will smaller breweries be able to survive the current situation, or do you think they will be forced to sell out to larger breweries? If they...
-
Choose the alternatives with the same meaning. If I receive a promotion, I will go on Holiday with my Family.
-
What are some of the possible sources of information about a company that could be used for determining the companys competitive stance?
-
1. As payments are received, one mailroom employee is assigned the responsibility of prelisting receipts and preparing the deposit slip prior to forwarding the receipts, deposit slip, and remittance...
-
A new audit client of yours processes its sales and cash receipts documents in the following manner: a. Cash receipts. The mail is opened each morning by a mail clerk in the sales department. The...
-
Identify the basic operations of relational algebra. What are they used for?
-
Find the number of different prime factors of 180 .
-
Using prime factorization, determine the greatest common divisor of 36 and 128.
-
Find the prime factorization of 85.
Study smarter with the SolutionInn App