title: SQL: Finding user with most number of comments
body: <p>I need to find out the user who has posted the most number of comments. There are two tables 1)users(Id, DisplayName) 2)comments(Id, UserId, test) . I have used the following query</p>
  
  <pre><code>Select DisplayName from users INNER JOIN (Select UserId, max(comment_count) as `max_comments from (Select UserId, count(Id) as comment_count from comments group by UserId) as` T1) as T2 ON users.Id=T2.UserId
  </code></pre>
  
  <p>However, this returns to me the Display Name of the user with Id = 1 rather than what I want. How do I work around this ?</p>