ค้นหาผู้ใช้ตามพื้นที่และแท็ก ไม่จำเป็นต้องใช้ตารางทั้งหมด
Search Users By Area and Tag.It is not neccessary to use all the tables.
 PostNotices:  Id [ number]  PostId [ number]  PostNoticeTypeId [ number]  CreationDate [ time]  DeletionDate [ time]  ExpiryDate [ time]  Body [ text]  OwnerUserId [ number]  DeletionUserId [ number] 
SELECT ROW_NUMBER() OVER (ORDER BY SUM(p.Score) DESC) AS "#", p.OwnerUserId AS "user_link", MAX(u.Reputation) AS "total_reputation", SUM(p.Score) AS "tag_upvote", SUM(p.Score) * 10 + MAX(CASE q.AcceptedAnswerId WHEN p.Id THEN 15 ELSE 0 END) AS "tag_reputation", SUM(CASE q.AcceptedAnswerId WHEN p.Id THEN 1 ELSE 0 END) AS "accepted_answers", COUNT(p.Id) AS "answers_per_tag" FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN Posts AS q ON q.Id = p.ParentId WHERE LOWER(u.Location) LIKE LOWER('%##CityName##%') AND p.PostTypeId = 2 AND q.Tags LIKE LOWER('%<##TagName##>%') GROUP BY p.OwnerUserId ORDER BY SUM(p.Score) DESC