xyz

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping

Q&A for gardeners and landscapers

with mentions_per_month as (
select
  concat(datepart(year, CreationDate),'-', datepart(month, CreationDate)) as year_month,
  count(1) as mentions,
  sum(ViewCount) as views
from
  Posts
where
  Title LIKE '%##Title##%'
/*and
  datepart(year,CreationDate) LIKE '2016' */
group by
  concat(datepart(year, CreationDate),'-', datepart(month, CreationDate))
)
select
  year_month,
  mentions,
  sum(mentions) over (order by year_month) as mentions_cum,
  views,
  sum(views) over (order by year_month) as views_cum
from
  mentions_per_month
order by
  year_month

Enter Parameters

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