Hi Amit,
In 9.2 we introduced Column Summaries. That does exactly this. You should take a look at this feature.
Hope this helps.
-SteveZ