Answer created traffic

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  Len(a.Body)                    as 'Length',
  Len(a.Body) * SUM(q.ViewCount) as 'Traffic'
FROM 
  Posts a inner join Posts q on a.ParentId = q.Id
WHERE 
  a.PostTypeId = 2
GROUP BY
  Len(a.Body)
ORDER BY
  'Length' ASC

Enter Parameters

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