DECLARE @SortedPosts TABLE (CreationDate datetime, Views ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @SortedPosts TABLE (CreationDate datetime, Views int, IsIdReq smallint)

--INSERT INTO @SortedPosts (CreationDate, Views, IsIdReq)
  --SELECT --CreationDate,
    --SUM(ViewCount) AS Views,
    --CASE
    --  WHEN Tags LIKE '%identification-request%'
    --  THEN 1
    --  ELSE 0
    --END AS IsIdReq
  --FROM Posts
  --WHERE YEAR(CreationDate) >= 2014

SELECT * FROM @SortedPosts

Enter Parameters

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