Fork of Distribution of registration time for users with 5+ edits (enwiki) by Tgr
This query is marked as a draft This query has been published by Tgr.

SQL

x
 
use huwiki_p;
SELECT
    CONCAT(SUBSTR(user_registration, 1, 4), 'q', (SUBSTR(user_registration, 5, 2) - 1) DIV 3 + 1) AS registration_date,
    -- SUBSTR(user_registration, 1, 6) AS registration_date,
    count(*) AS new_users
FROM (
    SELECT
        user_id,
        user_registration,
        count(*) AS recent_edits
    FROM
        user
        JOIN actor ON user_id = actor_user
        JOIN recentchanges ON actor_id = rc_actor AND rc_timestamp > DATE_FORMAT(NOW() -INTERVAL 30 DAY, '%Y%m%d%H%i%s')
    GROUP BY user_id, user_registration
    HAVING recent_edits >= 5
) tmp
GROUP BY registration_date
ORDER BY registration_date
;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...