Hi
I just generated the sql query which yeilds the required result.
SELECT Name,
(SELECT COUNT(medal)
FROM [TantraCAD].[dbo].[Sample] as Sample_1 Where Medal = 'Gold' and Sample_1.Name = Simplu.Name) AS "Gold",
(SELECT COUNT(medal)
FROM [TantraCAD].[dbo].[Sample] as Sample_1 Where Medal = 'Silver' and Sample_1.Name = Simplu.Name) AS "Silver",
(SELECT COUNT(medal)
FROM [TantraCAD].[dbo].[Sample] as Sample_1 Where Medal = 'Bronze' and Sample_1.Name = Simplu.Name) AS "Bronze"
FROM [TantraCAD].[dbo].[Sample]
GROUP BY
Name
Where sample is the table name try this and let me know.
Happy coding...