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
Andreyyshore
.
Toggle Highlighting
SQL
SET @MIN_EDITS = 700; SET @x = 0; SELECT @x:=@x+1 INTO @user_ids LIMIT 10; /*SELECT ss_total_edits FROM site_stats; SELECT SUM(user_editcount) FROM user WHERE user_editcount < @MIN_EDITS; SELECT user_id, user_name, user_editcount, user_admin, user_bot INTO @user_ids FROM ( SELECT user.user_id AS user_id, user.user_name AS user_name, user.user_editcount AS user_editcount, CASE WHEN (ug.user_admin > 0 OR ue.user_admin > 0) THEN 1 ELSE 0 END AS user_admin, CASE WHEN (ug.user_bot > 0 OR ue.user_bot > 0) THEN 1 ELSE 0 END AS user_bot FROM user LEFT JOIN ( SELECT ug_user, SUM(ug_group="sysop") AS user_admin, SUM(ug_group="bot") AS user_bot FROM user_groups GROUP BY ug_user HAVING (user_admin = 1 OR user_bot = 1) ) AS ug ON user.user_id = ug.ug_user LEFT JOIN ( SELECT user_id, 0 AS user_admin, 1 AS user_bot FROM user INNER JOIN ( SELECT REPLACE(page_title, "_", " ") AS user_name FROM categorylinks INNER JOIN page ON categorylinks.cl_from = page.page_id WHERE (page_namespace = 2 AND cl_to = "Roboți_Wikipedia") UNION SELECT user_name FROM user INNER JOIN pagelinks ON user.user_name = REPLACE(pagelinks.pl_title, "_", " ") WHERE (pl_namespace = 2 AND pl_from = 1995229) ) AS user_exceptions ON user.user_name = user_exceptions.user_name ) AS ue ON user.user_id = ue.user_id HAVING (user_editcount >= @MIN_EDITS OR user_admin = 1 OR user_bot = 1) ORDER BY user_editcount DESC, user_id LIMIT 1500 ) AS users_;*/ SELECT user_id, user_lastedit FROM ( SELECT actor_id, actor_user AS user_id FROM actor WHERE actor_user IN (SELECT @user_ids) ) AS actor_ LEFT JOIN (SELECT MAX(rev_timestamp) AS user_lastedit, rev_actor FROM revision GROUP BY rev_actor) AS revision_ ON actor_.actor_id = revision_.rev_actor
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...