Anton.Sandbox

0

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

-- The best time to ask questions
-- Look for the minimum value on y-scale:
-- It says when the time between question and answer is minimal.
-- For example

select TOP 500 Title, AcceptedAnswerId FROM Posts
/*
SELECT TOP 5 DATEDIFF(minute, q.CreationDate, a.CreationDate) as diffMin,
         ROUND((CAST(DATEPART("weekday", q.CreationDate) AS float) +
                CAST(DATEPART("hour", q.CreationDate) AS float) / 24), 2) as cat
  FROM Posts q
    LEFT OUTER JOIN Posts a ON q.AcceptedAnswerId = a.Id
  WHERE q.AcceptedAnswerId > 0


WITH tmp AS
(
  SELECT DATEDIFF(minute, q.CreationDate, a.CreationDate) as diffMin,
         ROUND((CAST(DATEPART("weekday", q.CreationDate) AS float) +
                CAST(DATEPART("hour", q.CreationDate) AS float) / 24), 2) as cat
  FROM Posts q
    LEFT OUTER JOIN Posts a ON q.AcceptedAnswerId = a.Id
  WHERE q.AcceptedAnswerId > 0
  )
  SELECT cat, AVG(diffMin)
FROM tmp
GROUP BY cat
ORDER BY cat

*/

Enter Parameters

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