WITH Dates As (--- Select user creation date (SELECT Crea...

0

Please login or register to vote for this query.

(click on this box to dismiss)

TeX - LaTeX

Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems

WITH Dates As
  (--- Select user creation date
    (SELECT CreationDate
     FROM Users
     WHERE Id = ##UserId##)
  UNION
    --- Select user post creation dates
    (SELECT CreationDate
     FROM Posts
     WHERE OwnerUserId = ##UserId##)
  UNION
    --- Select comments creation dates
    (SELECT CreationDate
     FROM Comments
     WHERE UserId = ##UserId##)
  UNION
    --- Select post edits creation dates
    (SELECT CreationDate
     FROM PostHistory
     WHERE UserId = ##UserId##)
  UNION
    --- Select suggested edits
    (SELECT CreationDate
     FROM SuggestedEdits
     WHERE OwnerUserId = ##UserId##)
  UNION
    --- Select suggested edit reviews
    (SELECT CreationDate
     FROM SuggestedEditVotes
     WHERE UserId = ##UserId##)
  UNION
    --- Select votes
    (SELECT CreationDate
     FROM Votes
     WHERE UserId = ##UserId##)
 )
  
SELECT
  DATEFROMPARTS(
    Year(CreationDate),
    Month(CreationDate),
    Day(CreationDate)
  ) As Calendar_Date,
  Count(
    DATEFROMPARTS(
      Year(CreationDate),
      Month(CreationDate),
      Day(CreationDate)
    )
  ) As Action_Cnt
FROM
  Dates
GROUP BY
  DATEFROMPARTS(
    Year(CreationDate),
    Month(CreationDate),
    Day(CreationDate)
  )
ORDER BY
  Calendar_Date;

Enter Parameters

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