select u.Id ,u.DisplayName ,count(c.Id) as 'count' FROM c...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

select
  u.Id
  ,u.DisplayName
  ,count(c.Id) as 'count'
FROM
  comments c
  LEFT JOIN users u ON u.Id=c.UserId
WHERE
  u.Id IS NOT NULL
  AND c.text LIKE '%thank%'
GROUP BY
  u.Id,u.DisplayName
ORDER BY 
  'count' DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results