You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
COUNT(CASE WHEN activity_count >= 1 AND activity_count < 5 THEN 1 END) AS monthly_casual_users,
145
+
COUNT(CASE WHEN activity_count >= 5 THEN 1 END) AS monthly_active_users
146
+
FROM (
147
+
SELECT
148
+
rc.rc_actor,
149
+
COUNT(*) AS activity_count
150
+
FROM
151
+
$tableRecentChanges AS rc
152
+
INNER JOIN $tableActor AS a ON rc.rc_actor = a.actor_id
153
+
WHERE rc.rc_timestamp >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y%m%d%H%i%S') -- monthly
154
+
/*
155
+
Conditions below added for consistency with Wikidata: https://phabricator.wikimedia.org/diffusion/ADES/browse/master/src/wikidata/site_stats/sql/active_user_changes.sql
156
+
*/
157
+
AND a.actor_user != 0
158
+
AND rc.rc_bot = 0
159
+
AND (rc.rc_log_type != 'newusers' OR rc.rc_log_type IS NULL)
0 commit comments