ชื่อผู้ใช้ที่ใช้ในความคิดเห็นที่เป็นไปได้ตอบกลับโพสต์โดยผู้ใช้ที่กำหนด ไม่จำเป็นต้องใช้ตารางทั้งหมด
Usernames used in possible comment replies to posts by a given user.It is not neccessary to use all the tables.
 PostsWithDeleted:  Id [ number]  PostTypeId [ number]  AcceptedAnswerId [ number]  ParentId [ number]  CreationDate [ time]  DeletionDate [ time]  Score [ number]  ViewCount [ number]  Body [ text]  OwnerUserId [ number]  OwnerDisplayName [ text]  LastEditorUserId [ number]  LastEditorDisplayName [ text]  LastEditDate [ time]  LastActivityDate [ time]  Title [ text]  Tags [ text]  AnswerCount [ number]  CommentCount [ number]  FavoriteCount [ number]  ClosedDate [ time]  CommunityOwnedDate [ time]  ContentLicense [ text] 
WITH texts_cte AS (SELECT DISTINCT c.Text AS Text FROM Comments AS c JOIN Posts AS p ON (c.PostId = p.Id) AND (p.OwnerUserId = '##UserId##') WHERE (c.Text LIKE '%@%')), substrings_cte AS (SELECT SUBSTRING(Text, STR_POSITION(Text, '@'), LENGTH(Text)) AS TextFrom FROM texts_cte), names AS (SELECT SUBSTRING(TextFrom, 1, PATINDEX('%_:,.%', TextFrom + ' ') - 1) AS Reply FROM substrings_cte) SELECT Reply, COUNT(*) AS Count FROM Names GROUP BY Reply ORDER BY COUNT(*) DESC