Views-per-day time distribution

0

Please login or register to vote for this query.

(click on this box to dismiss)

Psychology & Neuroscience Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

with
  views_per_day as (
    select
--      cast(viewcount as float) / datediff(day, creationdate, GetDate()) as vpd,
      creationdate,
      datediff(day, creationdate, GetDate()) as age_in_days
    from
      posts
    where
      posttypeid = 1
  ),
  stats as (
    select top 1
      age_in_days as max_age,
      percentile_disc(0.5)
          within group (order by age_in_days)
          over (partition by 1)
        as median_age
    from
      views_per_day
    order by age_in_days desc
  )
select
  top 50 *
from
  views_per_day, stats

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results