Which of the following queries selects the name of the supplier, corresponding order number, and total ordered
Question:
Which of the following queries selects the name of the supplier, corresponding order number, and total ordered quantity of the order that has the maximum total quantity ordered.
Transcribed Image Text:
a. SELECT R1.SUPNAME, POL1.PONR, SUM(POL1.QUANTITY) FROM SUPPLIER R1, PURCHASE_ORDER PO1, PO_LINE POL1 WHERE R1.SUPNR = PO1.SUPNR AND PO1.PONR= POL1.PONR GROUP BY POL1.PONR HAVING SUM(POL1.QUANTITY) >= ANY (SELECT SUM(POL2.QUANTITY) FROM SUPPLIER R2, PURCHASE_ORDER PO2, PO_LINE POL2 WHERE R2.SUPNR = PO2.SUPNR AND PO2.PONR= POL2.PONR GROUP BY POL2.PONR) b. SELECT R1.SUPNAME, POL1.PONR, SUM(POL1.QUANTITY) FROM SUPPLIER R1, PURCHASE_ORDER PO1, PO_LINE POL1 WHERE R1.SUPNR = PO1.SUPNR AND PO1.PONR= POL1.PONR GROUP BY POL1.PONR HAVING SUM(POL1.QUANTITY) <= ALL (SELECT SUM(POL2.QUANTITY) FROM SUPPLIER R2, PURCHASE_ORDER PO2, PO_LINE POL2 C. WHERE R2.SUPNR = PO2.SUPNR AND PO2.PONR= POL2.PONR d. GROUP BY POL2.PONR) SELECT R1.SUPNAME, POL1.PONR, SUM(POL1.QUANTITY) FROM SUPPLIER R1, PURCHASE_ORDER PO1, PO_LINE POL1 WHERE R1.SUPNR = PO1.SUPNR AND PO1.PONR= POL1.PONR GROUP BY POL1.PONR HAVING SUM(POL1.QUANTITY) >= ALL (SELECT SUM(POL2.QUANTITY) FROM SUPPLIER R2, PURCHASE_ORDER PO2, PO_LINE POL2 WHERE R2.SUPNR = PO2.SUPNR AND PO2.PONR= POL2.PONR GROUP BY POL2.PONR) SELECT R1.SUPNAME, POL1.PONR, SUM(POL1.QUANTITY) FROM SUPPLIER R1, PURCHASE_ORDER PO1, PO_LINE POL1 WHERE R1.SUPNR = PO1.SUPNR AND PO1.PONR= POL1.PONR GROUP BY POL1.PONR HAVING SUM(POL1.QUANTITY) <= ANY (SELECT SUM(POL2.QUANTITY) FROM SUPPLIER R2, PURCHASE_ORDER PO2, PO_LINE POL2 WHERE R2.SUPNR = PO2.SUPNR AND PO2.PONR= POL2.PONR GROUP BY POL2.PONR)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 83% (6 reviews)
Answered By
Omar ELmoursi
I'm Omar, I have Bachelor degree in Business and Finance, My unique approach is to help students with questions and assignments, I can teach Business, Math, Accounting, Managerial Accounting, Economy, Human resources management, organizational behavior, project management, I have experience dealing with different types of students and teach them how to deal with different types of exercises.
5.00+
4+ Reviews
10+ Question Solved
Related Book For
Principles Of Database Management The Practical Guide To Storing Managing And Analyzing Big And Small Data
ISBN: 9781107186125
1st Edition
Authors: Wilfried Lemahieu, Seppe Vanden Broucke, Bart Baesens
Question Posted:
Students also viewed these Computer science questions
-
To perform these assignments, refer to the tables in the JustLee Books database. Generate and test two SQL queries for each of the following tasks: a) the SQL statement needed to perform the stated...
-
We want to retrieve the available quantity of each ordered product of supplier Ad Fundum. Which of the following queries is correct? a. SELECT PRODNR, AVAILABLE_QUANTITY FROM PRODUCT WHERE PRODNR IN...
-
The RDC corporation is a manufacturer and seller of electronic testing equipment and sells direct to business and on the internet. Their supply chain, at a high level, is depicted below. Recently...
-
Cubitene is a diterpene present in the defense secretion of a species of African termite. What unusual feature characterizes the joining of isoprene units in cubitene?
-
Pat Corporation is the primary beneficiary in a VIE, even though Pat owns only 10 percent of the outstanding voting shares. In the year following the initial consolidation, the VIE earns net income...
-
Using the trial balance prepared for Binbutti Engineering in Part 4 of Problem 2-10A, prepare an income statement and statement of changes in equity for the three months ended July 31, 2020, and a...
-
Suppose dMi = dBi for i = 1,2, where Bi is a Brownian motion and i satisfies (12.5), so Mi is a finite-variance martingale. (a) Show that the conditional variance formula (12.28) is equivalent to M2...
-
Mason Olson is chairman of the board of Healthy Fast Foods, Inc. Suppose Olson has just founded Healthy Fast Foods, and assume that he treats his home and other personal assets as part of Healthy...
-
Define the following terms in two or three lines. a. Bill of Lading b. International Factoring c. Disclosed Factoring d. Mail Transfer e. Collection
-
Write a correlated SQL query to retrieve the number and status of all suppliers, except for the three suppliers with the lowest supplier status.
-
Consider the following query: Which of the following statements is not correct? a. The query retrieves the product number, product name, and available quantity of each product thanks to the left...
-
Loumis Home Care Products Inc. expects to maintain the same inventories at the end of 2008 as at the beginning of the year. The total of all production costs for the year is therefore assumed to be...
-
Section Three Answer the questions below 1.While pulling out of her driveway, Bethany becomes distracted by a bee and strikes Melanie, who is riding past on a bicycle. Bethany suffers serious injury...
-
A __________ is a schedule periodic check of a specific process behavior. Question 1Answer A. Widget B. Dashboard C. Monitor D. Process ID
-
1. Was VAAF contractually obligated to pay Chad for refraining from smoking? 2. Was there consideration to support its promise to pay $500? 3. Are there other facts you need to know to make that...
-
Presented here are the comparative balance sheets of Hames Incorporated at December 31, 2023 and 2022. Sales for the year ended December 31, 2023, totaled $1,700,000.%0D%0A%0D%0AHAMES...
-
McDonald's conducts operations worldwide and is managed in two primary geographic segments: US, and International Operated Markets, which is comprised of Australia, Canada, France, Germany, Italy,...
-
Write the integral that would define the mgf of the pdf Is the integral finite? (Do you expect it to be?) f(z)
-
On 1 July 2018, Parent Ltd acquired all the shares of Son Ltd, on a cum-div. basis, for $2,057,000. At this date, the equity of Son Ltd consisted of: $ 1,000,000 Share capital 500 000 shares...
-
Describe how packet loss can occur at output ports. Can this loss he pre vented by increasing the switch fabric speed?
-
Consider the topology shown in Figure 4.20. Denote the three subnets with hosts (starting clockwise at 12:00) as Networks A, D, and C. Denote the subnets without hosts as Networks D, E, and F. a....
-
Three types of switching fabrics are discussed in Section 4.2. List and briefly describe each type. Which if any, can send multiple packets across the fabric in parallel?
-
Hite corporation intends to issue $160,000 of 5% convertible bonds with a conversion price of $40 per share. The company has 40,000 shares of common stock outstanding and expects to earn $600,000...
-
Your portfolio has a beta of 1.17, a standard deviation of 14.3 percent, and an expected return of 12.5 percent. The market return is 11.3 percent and the risk-free rate is 3.1 percent. What is the...
-
Slow Roll Drum Co. is evaluating the extension of credit to a new group of customers. Although these customers will provide $198,000 in additional credit sales, 13 percent are likely to be...
Study smarter with the SolutionInn App