select count(distinct Id) as count, CreationYear, Creatio...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

select count(distinct Id) as count, CreationYear, CreationMonth
from (

select Id,
substring(cast(CreationDate as nvarchar), 8, 4) as CreationYear,
substring(cast(CreationDate as nvarchar), 1, 3) as CreationMonth
from Users

) as users

group by CreationYear, CreationMonth


/*

select count(distinct Id),
substring(cast(CreationDate as nvarchar), 8, 4) as CreationYear
from Users
where Id in(

select OwnerUserId
from Posts

union

select UserId
from Comments

)
group by CreationYear

*/

Enter Parameters

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