SELECT WeekdaySummary.Hour AS Hour, WeekdaySummary.Activi...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

SELECT
  WeekdaySummary.Hour AS Hour,
  WeekdaySummary.Activity AS WeekdayActivity,
  WeekendSummary.Activity AS WeekendActivity
FROM
(
  SELECT
    Hour,
    COUNT(*) Activity
  FROM
  (
    SELECT
      UserId,
      DATEPART(hh, v.CreationDate) + CAST(DATEPART(mi, v.CreationDate)/10 AS FLOAT)/6 AS Hour
    FROM SuggestedEditVotes v
    INNER JOIN Users ON Users.Id = v.UserId
    WHERE Users.Reputation >= 3000 AND
          ((DATEPART(dw, v.CreationDate) + @@DATEFIRST) % 7) NOT IN (0, 1)
  ) X
  GROUP BY Hour
) as WeekdaySummary
INNER JOIN
(
  SELECT
    Hour,
    COUNT(*) Activity -- manually normalized peak weekday (19.313
  FROM
  (
    SELECT
      UserId,
      DATEPART(hh, v.CreationDate) + CAST(DATEPART(mi, v.CreationDate)/10 AS FLOAT)/6 AS Hour
    FROM SuggestedEditVotes v
    INNER JOIN Users ON Users.Id = v.UserId
    WHERE Users.Reputation >= 3000 AND
          ((DATEPART(dw, v.CreationDate) + @@DATEFIRST) % 7) IN (0, 1)
  ) X
  GROUP BY Hour
) as WeekendSummary
ON WeekdaySummary.Hour = WeekendSummary.Hour
ORDER BY Hour

Enter Parameters

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