4.prolific users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

/*select 
p.id,
p.OwnerUserId,
count(p.id) over(partition by p.OwnerUserId) as total_posts_by_user
from posts p
where 
    cast(p.CreationDate as date) between '2021-09-01' and '2021-09-30'*/
    
    
/*select distinct
t.OwnerUserId as UserId,
avg_user_score,
posts_per_user
from (
*/
select 
    datepart(year,p.CreationDate),
    p.OwnerUserId,
    avg(cast(p.score as decimal(9,2))) over(partition by p.OwnerUserId) as avg_user_score,
    count(p.Id) over(partition by p.OwnerUserId) as posts_per_user
from posts p
where 
    cast(p.CreationDate as date) between '2021-09-01' and '2021-09-30' and
    p.OwnerUserId > 0

--where    t.avg_user_score > 1.5 and t.posts_per_user >= 3


/*
    u.DisplayName,
    u.Location ,
    
    inner join users u
    on (p.OwnerUserId = u.id)*/

Enter Parameters

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