City vs Tag โดยตัวแทน ไม่จำเป็นต้องใช้ตารางทั้งหมด
City vs Tag by Rep.It is not neccessary to use all the tables.
 CloseReasonTypes:  Id [ number]  Name [ text]  Description [ text] 
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation, COUNT(p.Id) FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE LOWER(Location) LIKE LOWER('%##cityname##%') AND t.TagName = '##tagname##' GROUP BY u.Reputation, u.Id ORDER BY Reputation DESC