Question 3; George Hayward

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

-- #3-a
-- a) How many posts were created in 2017?
SELECT
  count(distinct Id) as 'Number of Stories in 2017'
FROM Posts
WHERE year(CreationDate) = '2017';

-- #3-b
-- b) What is the distribution of views for users?
SELECT 
  Views,
  count(*)
FROM
  Users
GROUP BY Views
ORDER BY Views ASC;

-- #3-C
-- c) What are the top 10 tags associated with posts created in 2017?
SELECT
  Tags
From Posts;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results