• judasferret@aussie.zoneOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Found it. It is the function “site_aggregates_activity” which essentially says if you have published a comment or a post since the target time (day, month, 6 month etc) you are considered active. Here is the code

    select c.creator_id from comment c inner join person u on c.creator_id = u.id where c.published > (‘now’::timestamp - i::interval) and u.local = true union select p.creator_id from post p inner join person u on p.creator_id = u.id where p.published > (‘now’::timestamp - i::interval) and u.local = true