Code Golf Languages


Please login or register to vote for this query.

(click on this box to dismiss)

Code Golf and Coding Challenges

Q&A for programming puzzle enthusiasts and code golfers

In the UserId box below, enter: 
* your user id, to see your stats
* null, to see the stats of all users

declare @UserId int = ##UserId##;

with EndIndex as (
      p.Id, p.ParentId as QuestionId, p.Body,
      replace(replace(replace(replace(p.Body, ' ', '|'), '<', '|'), ':', '|'), ',', '|')
        , 5) as LanguageNameEndIndex
      Posts p
      join Posts q
        on p.ParentId = q.Id
      p.PostTypeId = 2 --answer
      and p.Body like '<h[1-3]>%'
      and q.Tags not like '%king-of-the-hill%'
      and (p.OwnerUserId = @UserId or @UserId is null)
), AnswerLanguages as (
    Id, QuestionId, Body, 
    '' + convert(varchar(99), Id) as Link,
    lower(substring(Body, 5, LanguageNameEndIndex-5)) as Language
  from EndIndex
--select * from AnswerLanguages where Language like 'tsql%'
select Language, count(1) as AnswerCount
from AnswerLanguages
group by Language
order by count(1) desc

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results