I have a table like as follows:
SoftwareName Count Country Project 15 Canada Visio 12 Canada Project 10 USA Visi
i think you can use this Link :
Sum of unique records - better performance than a cursor
and i think using PIVOT Function have a best performance rater SUM() function.!