Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Yak Posting Veteran
Aged Yak Warrior
select 'All Fruits',sum(total) as total
Flowing Fount of Yak Knowledge
1) SELECT Fruits, COUNT(*) total
GROUP BY Fruits
SELECT 'All_Fruit', COUNT(*)
2) SELECT Fruits, COUNT(*) total
GROUP BY Fruits WITH ROLLUP
quote:Originally posted by Muj9Hi thank you all for your help.i used SELECT Fruits, COUNT(*) total FROM TableName GROUP BY Fruits WITH ROLLUPbrilliant.Thank you