instruction: Fast-gun' distribution for a user.
response: WITH Dates AS (SELECT a.Id, q.CreationDate AS QDate, a.CreationDate AS ADate FROM Posts AS q, Posts AS a WHERE q.Id = a.ParentId AND q.PostTypeId = 1 AND a.PostTypeId = 2 AND a.OwnerUserId = '##UserId##'), Delays AS (SELECT Id, CAST((JULIANDAY(ADate) - JULIANDAY(QDate)) * 1440.0 AS INT) AS Delay FROM Dates) SELECT SUM(CASE WHEN Delay <= 15 THEN 1 ELSE 0 END) AS WITHin15, SUM(CASE WHEN Delay > 15 AND Delay <= 30 THEN 1 ELSE 0 END) AS WITHin30, SUM(CASE WHEN Delay > 30 AND Delay <= 45 THEN 1 ELSE 0 END) AS WITHin45, SUM(CASE WHEN Delay > 45 AND Delay <= 60 THEN 1 ELSE 0 END) AS WITHinHour, SUM(CASE WHEN Delay > 60 THEN 1 ELSE 0 END) AS MoreThanHour FROM Delays