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