SELECT Sector, -- ROUND(VALUE, NR DIGITS) ROUND(SUM(Price),2) AS TotalPrice, ROUND(AVG(Price),2) AS AvgPrice, MIN(Price) AS MinPrice, MAX(Price) AS MaxPrice, COUNT(name) AS NrOfRecords, COUNT(DISTINCT name) AS UnqNrOfRecords FROM SP500 GROUP BY Sector ORDER BY AvgPrice DESC ; SELECT Sector, -- ROUND(VALUE, NR DIGITS) ROUND(SUM(Price),2) AS TotalPrice, ROUND(AVG(Price),2) AS AvgPrice, MIN(Price) AS MinPrice, MAX(Price) AS MaxPrice, COUNT(name) AS NrOfRecords, COUNT(DISTINCT name) AS UnqNrOfRecords FROM SP500 -- WHERE comes AFTER FROM statement WHERE Sector = 'Health Care' GROUP BY Sector ORDER BY AvgPrice DESC