Database

0

Please login or register to vote for this query.

(click on this box to dismiss)

for drupalmotion.com

Ask Ubuntu

Q&A for Ubuntu users and developers

select voteType, count(id),[Month] from (
select vt.name as voteType, v.id, CAST(
      cast(DATEPART(YYYY, v.CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month]
from Votes as v
join VoteTypes as vt on vt.id = v.VoteTypeId
where vt.name in ('AcceptedByOriginator','UpMod')
) as a
group by voteType, [Month]
order by [Month] asc, voteType asc

Enter Parameters

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