Home Forums SQL Server 2008 SQL Server 2008 - General Query failed (aggregate function or the GROUP BY clause) RE: Query failed (aggregate function or the GROUP BY clause)
farooq.hbs
SSCrazy
Points: 2083
More actions
November 15, 2012 at 3:34 am
#1559263
SELECT name as Name, SUM(population) as Popualtion
FROM bbc
WHERE population >1000
GROUP BY name
If you aggregate the specific column then other remaining column in the select list should be group by...