Which query in this relational database (represented by relational diagram) will provide you with the list of 3 customers from Germany who bought most iPhones 11 phones? Select one: a. SELECT TOP(3) c.CustomerID, c.CompanyName, Count(od.Quantity) FROM Products p LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID LEFT JOIN Orders o ON od.OrderID = o.OrderID LEFT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY c.CustomerID, c.CompanyName ORDER BY Count(od.Quantity) DESC b. SELECT TOP(3) c.CompanyName, SUM(od.Quantity) FROM Products p INNER JOIN [Order Details] od ON p.ProductID = od.ProductID INNER JOIN Orders o ON od.OrderID = o.OrderID INNER JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY c.CustomerID, c.CompanyName ORDER BY SUM(od.Quantity) DESC c. SELECT TOP(3) c.CompanyName, p.ProductID, Sum(od.Quantity) FROM Products p LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID LEFT JOIN Orders o ON od.OrderID = o.OrderID LEFT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY p.ProductID, p.ProductName ORDER BY Sum(od.Quantity) DESC d. SELECT TOP(3) c.CustomerID, c.CompanyName, Count(p.ProductID) FROM Products p RIGHT JOIN [Order Details] od ON p.ProductID = od.ProductID RIGHT JOIN Orders o ON od.OrderID = o.OrderID RIGHT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE p.ProductName = 'iPhone 11' AND c.Country = 'Germany' GROUP BY c.CustomerID, c.CompanyName, p.ProductID ORDER BY Count(p.ProductID) DESC
Which query in this relational database (represented by relational diagram) will provide you with the list of 3 customers from Germany who bought most iPhones 11 phones? Select one: a. SELECT TOP(3) c.CustomerID, c.CompanyName, Count(od.Quantity) FROM Products p LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID LEFT JOIN Orders o ON od.OrderID = o.OrderID LEFT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY c.CustomerID, c.CompanyName ORDER BY Count(od.Quantity) DESC b. SELECT TOP(3) c.CompanyName, SUM(od.Quantity) FROM Products p INNER JOIN [Order Details] od ON p.ProductID = od.ProductID INNER JOIN Orders o ON od.OrderID = o.OrderID INNER JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY c.CustomerID, c.CompanyName ORDER BY SUM(od.Quantity) DESC c. SELECT TOP(3) c.CompanyName, p.ProductID, Sum(od.Quantity) FROM Products p LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID LEFT JOIN Orders o ON od.OrderID = o.OrderID LEFT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11' GROUP BY p.ProductID, p.ProductName ORDER BY Sum(od.Quantity) DESC d. SELECT TOP(3) c.CustomerID, c.CompanyName, Count(p.ProductID) FROM Products p RIGHT JOIN [Order Details] od ON p.ProductID = od.ProductID RIGHT JOIN Orders o ON od.OrderID = o.OrderID RIGHT JOIN Customers c ON o.CustomerID = c.CustomerID WHERE p.ProductName = 'iPhone 11' AND c.Country = 'Germany' GROUP BY c.CustomerID, c.CompanyName, p.ProductID ORDER BY Count(p.ProductID) DESC
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Which query in this relational
Select one:
a.
SELECT TOP(3) c.CustomerID, c.CompanyName, Count(od.Quantity)
FROM Products p
LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID
LEFT JOIN Orders o ON od.OrderID = o.OrderID
LEFT JOIN Customers c ON o.CustomerID = c.CustomerID
WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11'
GROUP BY c.CustomerID, c.CompanyName
ORDER BY Count(od.Quantity) DESC
b.
SELECT TOP(3) c.CompanyName, SUM(od.Quantity)
FROM Products p
INNER JOIN [Order Details] od ON p.ProductID = od.ProductID
INNER JOIN Orders o ON od.OrderID = o.OrderID
INNER JOIN Customers c ON o.CustomerID = c.CustomerID
WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11'
GROUP BY c.CustomerID, c.CompanyName
ORDER BY SUM(od.Quantity) DESC
c.
SELECT TOP(3) c.CompanyName, p.ProductID, Sum(od.Quantity)
FROM Products p
LEFT JOIN [Order Details] od ON p.ProductID = od.ProductID
LEFT JOIN Orders o ON od.OrderID = o.OrderID
LEFT JOIN Customers c ON o.CustomerID = c.CustomerID
WHERE c.Country = 'Germany' AND p.ProductName = 'iPhone 11'
GROUP BY p.ProductID, p.ProductName
ORDER BY Sum(od.Quantity) DESC
d.
SELECT TOP(3) c.CustomerID, c.CompanyName, Count(p.ProductID)
FROM Products p
RIGHT JOIN [Order Details] od ON p.ProductID = od.ProductID
RIGHT JOIN Orders o ON od.OrderID = o.OrderID
RIGHT JOIN Customers c ON o.CustomerID = c.CustomerID
WHERE p.ProductName = 'iPhone 11' AND c.Country = 'Germany'
GROUP BY c.CustomerID, c.CompanyName, p.ProductID
ORDER BY Count(p.ProductID) DESC
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY