Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation
Posts.OwnerUserID as UserId,
Users.DisplayName as UserName,
'https://codegolf.stackexchange.com/users/' + CAST(Users.Id as VARCHAR) + '/' as Profile,
count(*) as PostCount,
min(Posts.CreationDate) as FirstPost,
max(Posts.CreationDate) as LastPost,
DATEDIFF(dd, min(Posts.CreationDate),max(Posts.CreationDate)) as Tenure
INNER JOIN Users on Users.Id = Posts.OwnerUserID
where lower(Posts.Body) like '<h_>' + lower('##Lang##') + '%<code>-%l%</code>%,%</h_>%'
or lower(Posts.Body) like '<h_><a href="%">' + lower('##Lang##') + '</a>%<code>-%l%</code>%,%</h_>%'
group By Posts.OwnerUserID, Users.DisplayName, Users.Id
order by PostCount DESC