Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which of the following statements returns orders smaller than the largest order

ID: 3576221 • Letter: W

Question

Which of the following statements returns orders smaller than the largest order for Customer 1199? SELECT CustomerName, OrderNumber, OrderTotal FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE OrderTotal > ANY (SELECT OrderTotal FROM Orders WHERE CustomerID = 1199) SELECT CustomerName, OrderNumber, OrderTotal FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE OrderTotal > NONE (SELECT OrderTotal FROM Orders WHERE CustomerID = 1199) SELECT CustomerName, OrderNumber, OrderTotal FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE OrderTotal

Explanation / Answer

[c]

SELECT CustomerName, OrderNumber, OrderTotal
FROM Customer JOIN Orders ON Customers.CustomerID = Orders.CustomerID
-- till this selects by joining
WHERE OrderTotal < ANY -- OrderTotal must be less than any of below y i.e, anything less than 40
       (SELECT OrderTotal
       FROM Orders
       WHERE CustomerID = 1199) -- This selects the OrderTotal for example y - [20 30 40]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote