SELECT t.tagname AS language, COUNT(*) AS num_posts, SUM(...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English

Q&A for linguists, etymologists, and serious English language enthusiasts

SELECT t.tagname AS language, COUNT(*) AS num_posts,
       SUM(CONVERT(BIGINT, p.viewcount)) AS total_views,
	   (SUM(CONVERT(BIGINT, p.viewcount)) / COUNT(*)) AS avg_views_per_post
  FROM posts p, posttags pt, tags t 
 WHERE p.id = pt.postid
   AND t.id = pt.tagid
   AND t.tagname in ('java', 'javascript', 'c#', 'c++', 'c', 'objective-c',
                     'ruby', 'perl', 'php', 'sql', 'python', 'swift', 'r')
 GROUP BY t.tagname
 ORDER BY 3 DESC;

Enter Parameters

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