What time of day do I post questions and answers most?
Q&A about the site for developers and users of elementary OS and applications
-- My Activity by UTC Hour
-- What time of day do I post questions and answers most?
DECLARE @UserID INT = ##UserID?9449426##
-- Create a table containing all the hours in a day (0-24)
SELECT x.number AS Hours
FROM master.dbo.spt_values x
WHERE x.type = 'P'
AND x.number <= 23;
SELECT * FROM #Hours
FROM #Hours h
LEFT JOIN Posts ON h.Hours = datepart(hour, CreationDate)
PostTypeId IN (1, 2) AND
OwnerUserId = @UserID