I have a query where I am only selecting the TOP 10 rows, but I have a SUM function in there that is still taking the sum of all the rows (disregarding the TOP 10). How do I get
Use the TOP feature with a nested query
SELECT SUM(innerTable.Purchase_Total_Amount) FROM (SELECT TOP 10 Purchase_Total_Amount FROM Table) as innerTable