
Ultimate access to all questions.
You are working as a Fabric Analytics Engineer and are tasked with optimizing a SQL query for a large dataset in a Fabric warehouse. The dataset contains detailed customer information, including names, email addresses, and purchase history. Your goal is to identify the top 10 customers based on their total purchase amounts, including their names and email addresses, to target them for a high-value marketing campaign. The solution must be efficient, scalable, and comply with data privacy regulations. Which of the following SQL queries best meets these requirements? (Choose one option)
A
SELECT TOP 10 CustomerName, EmailAddress, SUM(PurchaseAmount) AS TotalPurchase FROM CustomerData GROUP BY CustomerName, EmailAddress ORDER BY TotalPurchase DESC;
B
SELECT CustomerName, EmailAddress, MAX(PurchaseAmount) AS TotalPurchase FROM CustomerData GROUP BY CustomerName, EmailAddress ORDER BY TotalPurchase DESC LIMIT 10;
C
SELECT CustomerName, EmailAddress, AVG(PurchaseAmount) AS TotalPurchase FROM CustomerData GROUP BY CustomerName, EmailAddress ORDER BY TotalPurchase DESC FETCH FIRST 10 ROWS ONLY;
D
SELECT CustomerName, EmailAddress, SUM(PurchaseAmount) AS TotalPurchase FROM CustomerData GROUP BY CustomerName, EmailAddress ORDER BY TotalPurchase DESC LIMIT 10;