ผู้ถือทอง C# จากอินเดีย ไม่จำเป็นต้องใช้โต๊ะทั้งหมด
C# Gold bearers from India.It is not neccessary to use all the tables.
 CloseReasonTypes:  Id [ number]  Name [ text]  Description [ text] 
WITH data AS (SELECT RANK() OVER (PARTITION BY b.UserId ORDER BY b.Date) AS rn, b.UserId, b.Date FROM Badges AS b WITH (nolock) WHERE b.Name = 'asp.net') SELECT ROW_NUMBER() OVER (ORDER BY Date) AS Number, u.DisplayName, data.Date, CASE rn WHEN 1 THEN 'bronze' WHEN 2 THEN 'silver' WHEN 3 THEN 'gold' END AS badge FROM data JOIN Users AS u WITH (nolock) ON data.UserId = u.Id WHERE rn = 1 AND LOWER(u.Location) LIKE LOWER('%india') ORDER BY Date