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....
-
The consolidated balance sheet of Pam Corporation and its 80 percent subsidiary, Sun Corporation, contains the following items on December 31, 2020 (in thousands): Cash...
-
In 1970, a lottery was used to determine who would be drafted into the U.S. Army. The 366 dates in the year were placed in individual capsules, they were mixed, then capsules were selected to...
-
Prepare the stockholders equity section of Fina Corporations balance sheet from the following accounts and balances on December 31, 20xx: Common Stock, $10 par value, 30,000 shares Balance...
-
Wilbury Company manufactures a nutrient, Everlife, through two manufacturing processes: Blending and Packaging. All materials are entered at the beginning of each process. On August 1, 2012,...
-
Switch To Light Mode Fin 3 0 3 0 Assignment 1 Prof. Yi ( 1 ) Prepare the income statements and balance sheets for years 2 0 2 2 and 2 0 2 3 for Smithsonian Company using the following information....
-
At December 31, 20X0, Oettinger Corporation, a premium kitchen cabinetmaker for the home remodeling industry, reported the following accounts receivable information on its year-end balance sheet:...
-
player/index/unched:10)-(63-417-4061-6604 Homework Chapter 18 Assignment Question 4 of 7 -/14.28 EE On March 1, 2020. Sweet Company sold goods to Goosen Inc. for $594,000 in exchange for a 5-year,...
-
what ways do evolving regulatory landscapes and industry standards necessitate continuous evaluation and refinement of internal policies and procedures to maintain adherence and compliance ?
-
Financial statement analysis evaluates a companys performance or value through a companys balance sheet,income statement or statement of cash flows.Explain in detail why such analysis is important...
-
What are the technonlogical and organisational changes to management accounting in current business and economic climate?
-
Suppose a firm expects that spending $20M on R&D will result in a new product that can be sold next year. Selling that product will increase revenue by $30Mand it will cost $29M. A) Whatis the...
-
A homeowner took out a 30-year fixed-rate mortgage of $220,000. The mortgage was taken out 10 years ago at a rate of 7.20 percent. If the homeowner refinances, the charges will be $3,500. What is the...
-
You have arrived at Steinert its to see the music concert held every spring and unfortunatay Only seats were available in the last row. There are 23 rows. The stage which seats all per fofing's Is...
-
Which of the followingcarbocations is the least stable? CH3CH2 . CH3CHCH3 CH3 I . CH3C0 T CH3 IV. V. CH3 CH3CCH2 CH3
-
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?
-
Talias Tutus bought a new sewing machine for $40,000 that will be depreciated using the MACRS depreciation schedule for a 5-year recovery period. a. Find the depreciation charge each year. b. If the...
-
Sec uses 60 000 tons of salt over a 50-week working year. It costs 100 to order salt and delivery follows two weeks later. Storage costs for the salt are expected to be 0.10 per ton per year. The...
-
Calculate the following values assuming a discount rate of 12 per cent: (a) 500 compounded for five years; (b) the present value of 500 to be received in five years time; (c) the present value of 500...
Study smarter with the SolutionInn App