Question
Using the table below make the next QUERIES 1. List the order numbers for all orders sold by agent A01 to customer C001 in January.?
Using the table below make the next QUERIES
1. List the order numbers for all orders sold by agent A01 to customer C001 in January.?
2. List the order number, month, order quantity, and invoice amount for all orders in excess of $500 placed by customer C001. Sort your output in alphabetic order by month.?
3. List the average order quantity and average invoice amount for all orders that exist in the CAPO database. Use AvgQty and AvgAmt as aliases in the query result set.?
4. List the total invoice amount for all orders placed by agent A05. Use TotalAmt as the alias in the query result set.?
CUSTOMERS A able containing inforon about customers 1t 1scnt quanticy rce Unique identifier for a custometfrownoce c005' has ceased to exist cid pO1 comb Da11400 0 p2brsh Newark 203000 5 p03 | razor | Duluth 150600 1.00 p04pn Dulu125300 1.00 pOS penl Dallas 221400 1.00 pO6 folder Dallas 123100 2.00 p07 caseNewark 100500100 cname Name of a customer city City where the customer headquarters) is located discnt Each customer has a negotiated discount oa prices 0Tip Top Duluch 10.00 c002 Basis Dallas 12.00 c003 AlliedDalla 8.0O A table containing information abour agent employees00ACME Doluch 100 06 ACMEKyo 00 AGENTS aid Unique identifier foc an agentrow aname Last name of agent city Ciy where agent is based percent Percentage commission each agent receives on each AGENTS s3 PRODUCTS A table containing information about produets for sale01SmithNew York ROERS pid pname Descriptive name of product city City where this product is warehoused quantity Quantity on hand for sale, in standard units price Wholesale price of each unit product Unique identifier for a product/row 402 JonesNeark 03 BrownTokyo 04 Gray N York c14 1011 n 001 0 p1 1000450.00 00101p01 10000.00 1019 feb 0 02 2 400180.00 1017feb3600540.00 Oasi Duluth 206 Smith Dallas Note that the same column name, city, appears in all three tables defined so far. This is not a coincidence 1023 00104 S00 450.00 1022 mar 001 05 400 720.00 1025001OS p7 800720.00 ORDERS A table containing information about orders Unique identifier for this order ordno o month h Month the orde was placed; assurne that orders starned in January of this year This customer.. c002 cid aid purchased through chis agent. pid qty dollars ...at this dollar cost 1026 may 002 a05p800 704.00 101s | ian | c003 | .03 | POS | 1200 | 1104.00 1014 03 po1200 1104.00 1021 feb 004 06p 1000 460.00 1016 ?an c006 s01 pol 1000 | 500.00 1020 leb 0003p7 600.00 1024 ma 0apo400.00 this specifie product... in this total quaniyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started