Testing

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics Meta

Q&A about the site for professional robotic engineers, hobbyists, researchers and students

select resultTable.Years, (cast(count(resultTable.OwnerUserId) as float)/
(SELECT cast(count(*) as float) FROM users where datepart(year,creationdate) = 2008))*100
Active2008UserYearly
from (
    select datepart(year,creationdate) Years,OwnerUserId, count(*) 
    NoOfQuestionPost
    from Posts where OwnerUserId in 
    (SELECT  Id  FROM users
    where datepart(year,creationdate) = 2008)
    and posttypeid = 1 and datepart(year,creationdate) < 2019
    group by datepart(year,creationdate), OwnerUserId 
    having count(*) > 5
) resultTable 
group by resultTable.Years
order by resultTable.Years


--select (2427.00/21683.00)*100.00



/*
select resultTable.Years, (count(resultTable.OwnerUserId)/(SELECT count(*) 
FROM users
where datepart(year,creationdate) = resultTable.Years))*100 UserActivityInPercentage
from (
select datepart(year,creationdate) Years,OwnerUserId, count(*) 
NoOfQuestionPost
from Posts where OwnerUserId in 
(SELECT  Id  FROM users
where datepart(year,creationdate) = 2008)
and posttypeid = 1 and datepart(year,creationdate) < 2019
group by datepart(year,creationdate), OwnerUserId 
having count(*) > 5
--order by datepart(year,creationdate), OwnerUserId
) resultTable 
group by resultTable.Years
*/


/*
select datepart(year,creationdate) Years, count(*) UsersOf2008_Activity
from Posts where OwnerUserId in 
(SELECT  Id  FROM users
where datepart(year,creationdate) = 2017)
and posttypeid = 2 and datepart(year,creationdate) between 2017 and 2018
group by datepart(year,creationdate) 
having count(*) >5
*/

Enter Parameters

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