Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Iluvatar
.
Toggle Highlighting
SQL
-- active sysops SELECT COUNT(actor_name) AS active FROM user_groups JOIN actor ON actor_user = ug_user AND ug_group = "sysop" WHERE EXISTS (SELECT rev_id FROM revision_userindex WHERE actor_id = rev_actor AND LEFT (rev_timestamp, 8) >= REPLACE (CURDATE() - interval 2 month, '-', '') LIMIT 1) OR EXISTS (SELECT log_id FROM logging_userindex WHERE actor_id = log_actor AND LEFT (log_timestamp, 8) >= REPLACE (CURDATE() - interval 2 month, '-', '') LIMIT 1) -- total sysops UNION ALL SELECT COUNT(ug_user) AS total FROM user_groups WHERE ug_group = "sysop" -- actove sysop for w-detect UNION ALL SELECT COUNT(actor_name) AS active FROM user_groups JOIN actor ON actor_user = ug_user AND ug_group = "sysop" WHERE (EXISTS ( SELECT rev_id FROM revision_userindex WHERE actor_id = rev_actor AND LEFT (rev_timestamp, 8) >= REPLACE (CURDATE() - interval 1 week, '-', '') LIMIT 1) OR EXISTS ( SELECT log_id FROM logging_userindex WHERE actor_id = log_actor AND LEFT (log_timestamp, 8) >= REPLACE (CURDATE() - interval 1 week, '-', '') LIMIT 1))
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...