title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Test IP-controle (patrolling) NL-Wikipedia
null
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "111.26", "resultsets": [{"headers": ["page_id", "name", "Total", "Interlanguage"], "rowcount": 574}]}
nlwiki_p
Edit summary frequency
Fork for standing queries
SELECT actor_name as username, count(*) / user_editcount as frequency FROM revision LEFT JOIN comment on rev_id = comment_id LEFT JOIN actor on rev_actor = actor_id LEFT JOIN user on actor_user = user_id WHERE comment_text = "Template" GROUP BY actor_name ORDER BY 2 DESC
{"runningtime": "2.83", "resultsets": [{"headers": ["page_title"], "rowcount": 4}]}
enwiki_p
台大物理服學課待撰條目(110)
null
select REPLACE(l.ll_title, '_', ' '), REPLACE(p.page_title, '_', ' '), page_len from langlinks l join page p on p.page_id=l.ll_from where p.page_namespace=0 and page_len<20000 and page_len>8000 and p.page_title in (select pla.page_title from categorylinks cla join page pla on cla.cl_from...
{"runningtime": "0.19", "resultsets": [{"rowcount": 14, "headers": ["date", "images"]}]}
enwiki_p
beauty
null
SELECT actor_name as username, count(*) / user_editcount as frequency FROM revision LEFT JOIN comment on rev_id = comment_id LEFT JOIN actor on rev_actor = actor_id LEFT JOIN user on actor_user = user_id WHERE comment_text REGEXP '[Bb]eautif(ied|ications)' GROUP BY actor_name ORDER BY 2 DESC
{"runningtime": "1.53", "resultsets": [{"headers": ["wiki", "project", "domain"], "rowcount": 985}]}
enwiki_p
Rater.js count of a particular user during Tag-and-Assess
This query needs to be re-run, and you are seeing result from an old run
SELECT page_title, comment_text, page_id, r1.rev_timestamp FROM revision_userindex r1 JOIN actor_revision ON actor_id = r1.rev_actor LEFT JOIN page ON page_id = r1.rev_page LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id WHERE actor_name IN ('Vis...
{"connection_id": 94679066}
enwiki_p
البحث عن مقالات ملخص تعديل معين
null
use arwiki_p; SELECT rev_timestamp, page_id, rev_id, comment_text FROM revision INNER JOIN page ON rev_page = page_id INNER JOIN actor ON rev_actor = actor.actor_id INNER JOIN comment ON comment_id = rev_comment_id WHERE rev_timestamp between 20210101000000 and 20211231000000 AND page_namespace...
{"runningtime": "5.34", "resultsets": [{"rowcount": 4, "headers": ["rc_patrolled", "count"]}, {"rowcount": 10, "headers": ["user", "unpatrolled"]}, {"rowcount": 31, "headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"]}, {"rowcount": 7, "headers": ["rc_namespace", "unpatrolled"]}, {"rowcount...
arwiki_p
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"runningtime": "6.07", "resultsets": [{"rowcount": 182, "headers": ["rank", "reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
enwiki
IP-patrolling (NL-Wikipedia)
Vandalismebestrijding 01-10-2021
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "547.59", "resultsets": [{"rowcount": 49, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
nlwiki_p
Most protected pages
500 pages that had the most protections on vi.wikipedia.
SELECT log_namespace AS namespace, log_title AS protected_page, COUNT(log_title) AS occurrences, MAX(log_timestamp) AS latest_occurence FROM logging WHERE log_type = "protect" GROUP BY namespace, protected_page ORDER BY occurrences DESC LIMIT 500;
{"runningtime": "62.29", "resultsets": [{"headers": ["rev_timestamp", "new-len", "old-len", "page_title", "actor_name", "comment_text", "latest", "pr_level"], "rowcount": 41}]}
fawiki_p
Jeeputer - fawiki Dead people articles contain Living People category
null
use fawiki_p; select CONCAT('# [[',page.page_title,']]') from page where page_namespace = 0 and page.page_id in (select cl_from from categorylinks where cl_to = 'افراد_زنده') and page.page_id in (select cl_from from categorylinks where cl_to REGEXP 'درگذشتگان_') and page.page_id not in (select cl_from from catego...
{"connection_id": 8538238}
fawiki
Jeeputer - fawiki Users with most edits in the past month (including bots and IPs)
List of a user's edit times.
SELECT actor.actor_name AS کاربر, GROUP_CONCAT(DISTINCT user_groups.ug_group) AS اختیارات, COUNT(DISTINCT rev_id) AS تعداد FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id) LEFT JOIN user_groups ON (actor.actor_user = user_groups.ug_user) -- پالایش بر پایه زمان WHERE DATEDIFF(CURDATE(), rev...
{"runningtime": "0.05", "resultsets": [{"rowcount": 0, "headers": ["page_namespace", "page_title"]}]}
fawiki_p
Jeeputer - Reply Tool usage/user (fa.wiki)
null
select actor_name, count(*) as total from ( select ct.ct_id, ct.ct_rev_id, actor_user, actor_name from fawiki_p.change_tag ct inner join fawiki_p.revision_actor_temp rat on ct.ct_rev_id = rat.revactor_rev inner join fawiki_p.actor act on rat.revactor_actor = act.actor_id inner join fawiki_p.change_tag_def on ct_tag_i...
{"runningtime": "1.15", "resultsets": [{"rowcount": 616, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}]}
fawiki_p
Jeeputer - 2021 deletion statistic (fawiki)
null
SELECT actor_name As کاربر, COUNT(log_id) As تعداد_حذف‌ها FROM logging_logindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = "delete" AND log_timestamp >= "20210000000000" GROUP BY actor_name ORDER BY 2 DESC
{"runningtime": "8.14", "resultsets": [{"rowcount": 183, "headers": ["rank", "reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
fawiki_p
Jeeputer - fawiki Orphaned template documentation pages
null
select concat('الگو:', replace(doc.page_title, '_', ' ')) as doc, doc.page_is_redirect as doc_is_redirect, concat('الگو:', replace(replace(doc.page_title, '/توضیحات', ''), '_', ' ')) as non_transcluder, ifnull(template.page_is_redirect, 0) = 1 as non_transcluder_is_redirect, doc.page_id is not NULL as non_...
{"runningtime": "14.04", "resultsets": [{"rowcount": 55, "headers": ["page_title", "page_id", "rev_id", "rev_actor", "rev_timestamp"]}]}
fawiki_p
fawiki editors still active after 10 years
null
select distinct rc_actor, actor_name from actor join recentchanges on actor_id = rc_actor and rc_source = 'mw.edit' join user on actor_user = user_id where user_registration < '20111001000000' limit 100
{"runningtime": "27.37", "resultsets": [{"rowcount": 55, "headers": ["page_title", "page_id", "rev_id", "rev_actor", "actor_user", "actor_name", "rev_timestamp"]}]}
fawiki_p
Jeeputer - fawiki New pages created using content translation in 2021
All publishings from Content translation tool, repeat publishings are not counted, first time overwriting is counted
select concat(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2),"-",substr(rev_timestamp,7,2)) as Date_time, actor_name as User, page_title, rev_len from change_tag, change_tag_def, revision, page, actor where ct_tag_id = ctd_id and rev_id = ct_rev_id and page_id = rev_page and page_namesp...
{"runningtime": "0.16", "resultsets": [{"headers": ["page_title", "page_id", "rev_id", "rev_actor", "actor_user", "actor_name", "rev_timestamp", "rev_deleted"], "rowcount": 53}]}
fawiki_p
Jeeputer - fawiki User pages without a user account
(anonymous users and redirects excluded) Note that the table `user` doesn't seem to contain entries for users with zero edits. TODO: could perhaps get better info from table `actor`.
SELECT page_namespace, REPLACE(page_title,'_',' ') AS page_title, GROUP_CONCAT(REPLACE(cl_to,'_',' ') SEPARATOR ' | ') AS cl_to FROM `page` LEFT JOIN `categorylinks` ON page_id=cl_from WHERE page_is_redirect=0 AND page_namespace IN (2, 3) AND page_title NOT REGEXP '([1-9][0-9\.]+[0-9]|[1-9A-F][0-9A-F...
{"runningtime": "0.23", "resultsets": [{"rowcount": 93, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "p...
fawiki_p
Jeeputer - fawiki User pages without a user account
(anonymous users and redirects excluded) Note that the table `user` doesn't seem to contain entries for users with zero edits. TODO: could perhaps get better info from table `actor`.
SELECT CONCAT('{{جا:فن:',page_namespace,'}}'), CONCAT('[[{{جا:فن:', page_namespace, '}}:', REPLACE(page_title,'_',' '), ']]') AS page_title, GROUP_CONCAT(REPLACE(cl_to,'_',' ') SEPARATOR ' | ') AS cl_to FROM `page` LEFT JOIN `categorylinks` ON page_id=cl_from WHERE page_is_redirect=0 AND page_namespace IN...
{"runningtime": "6.09", "resultsets": [{"headers": ["reviews", "rc_title", "accepted", "accept %", "declined", "decline %"], "rowcount": 2778}]}
fawiki_p
Pages salted by a named user
Omits namespace for articles, adds leading colon for categories. Dresses the namespace & title as a usable link Export the result as a wiki table & it's good-to-go
SET @uname = 'Jeeputer' ; SELECT CONCAT('[[', IF (pt.pt_namespace=6,':',IF (pt.pt_namespace=14,':','')), '{{ns:', CAST(pt.pt_namespace AS CHAR), '}}:', pt.pt_title, ']]') page, pt.pt_create_perm 'سطح محافظت' FROM protected_titles pt, user u WHERE pt.pt_user = u.user_id AND u.user_name = @uname ORDER BY 2,...
{"runningtime": "10.83", "resultsets": [{"rowcount": 1660, "headers": ["editor", "accepts", "recent_edits"]}]}
fawiki_p
Number of indef blocks
A straightforward count of the number of indef blocks.
USE fawiki_p; SELECT count(*) FROM ipblocks WHERE ipb_expiry = 'infinity'
{"runningtime": "1.25", "resultsets": [{"rowcount": 310, "headers": ["editor", "accepts", "recent_edits"]}]}
fawiki_p
Jeeputer - fawiki This week new user sandboxs with external links
null
USE fawiki_p; SELECT CONCAT('[[کاربر:',article.page_title,']]') as "صفحه", MIN(revision.rev_id) as "نسخه", actor.actor_name as "کاربر", revision.rev_actor as "شناسهٔ کاربر", revision.rev_timestamp as "تاریخ ایجاد", article.page_len as "حجم صفحه" FROM revision inner join actor on actor_id = rev_actor INNER JOIN pag...
{"runningtime": "8.77", "resultsets": [{"headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}]}
fawiki
Articles linking to module namespace
(excluded prefixes are modules that check for the existence of their subpages, counting as a pagelink)
select concat("[[پودمان:", pl_title, ']]') as "عنوان پیوند", page_title from pagelinks join page on page.page_id = pagelinks.pl_from where (pl_namespace = 828) and pl_title not like "Adjacent_stations%" and pl_title not like "Solar_eclipse%" and pl_title not like "Location_map%" and pl_from_namespace = 0;
{"runningtime": "6.34", "resultsets": [{"rowcount": 118, "headers": ["declined_then_deleted", "actor_name"]}]}
fawiki_p
Heavy thanks senders Jan-Sep 2021
Find thanks
select sender, thanks from (select actor_name as sender, count(log_timestamp) as thanks from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id and log_action = 'thank' and "20210101" <= log_timestamp and log_timestamp <= "20210930" and user_editcount < 15 group by actor...
{"runningtime": "80.61", "resultsets": [{"rowcount": 1997, "headers": ["Page"]}]}
fawiki
Template count in fawiki
null
select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"runningtime": "117.97", "resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 987}]}
fawiki_p
Articles containing unexisting files on fawiki
null
USE fawiki_p; SELECT CONCAT('[[',page_title,']]') AS page_title, CONCAT('[[:پرونده:',il_to,']]') AS il_to FROM page JOIN imagelinks ON page_id = il_from WHERE (NOT EXISTS( SELECT 1 FROM image WHERE img_name = il_to)) AND (NOT EXISTS( SELECT 1 FROM fawiki_p.page WHERE page_title = il_to AND page_namespace = 6)) AND page...
{"runningtime": "18.39", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]}
fawiki_p
Submitted drafts with 0, 1, or 2 external links
These are often easy declines, because you usually need around 3 sources to pass GNG. Help thin out the queue a bit. Still needs manual review though, because 1) some drafts qualify for an SNG, and 2) some drafts have citations such as books that don't include an external link. The lowest # of external links a draft c...
SELECT page_namespace, page_title, ( SELECT COUNT(*) FROM externallinks WHERE el_from = page_id ) AS externallinks_count FROM categorylinks JOIN page ON page_id = cl_from WHERE cl_to = 'درخواست‌های_مقاله‌ها_برای_ایجاد_در_انتظار' AND page_namespace = 118 AND ( SELECT COUNT(*) FROM externallinks WHERE el_from =...
{"runningtime": "0.96", "resultsets": [{"headers": ["Draft", "Article"], "rowcount": 0}]}
fawiki
Redirect count leaderboard
Pages on Persian Wikipedia with a ridiculous number of redirects.
-- Generated from siteinfo-namespaces in the dump; -- namespaces.name is the local name, not the canonical name. with namespaces(id, name) as ( values (-2, 'Media'), (-1, 'ویژه'), (0, ''), (1, 'بحث'), (2, 'کاربر'), (3, 'بحث کاربر'), (4, 'ویکی‌پدیا'), (5, 'بحث ویکی‌پدیا'), (6, 'پرونده...
{"runningtime": "0.73", "resultsets": [{"rowcount": 0, "headers": ["Draft", "Article"]}]}
fawiki_p
Deletion leaderboard
Times each person has deleted a page.
select actor_name as 'نام', count(*) as 'شمار حذف‌ها' from logging join actor on actor_id = log_actor where log_type = 'delete' and log_action = 'delete' group by log_actor order by count(*) desc limit 100;
{"runningtime": "0.08", "resultsets": [{"rowcount": 6, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}]}
fawiki_p
Jeeputer - fawiki Times deleted leaderboard
Pages in the Persian Wikipedia ranked by the number of times they've been deleted.
select CONCAT('[[', IF(log_namespace = 14, ':', ''), IF(log_namespace = 6, ':', ''), IF(log_namespace > 0, CONCAT('{{جا:فن:', log_namespace, '}}'), ''), IF(log_namespace > 0, ':', ''), REPLACE(log_title,'_',' '), ']]') as 'عنوان', CONCAT('{{جا:فن:',log_namespace,'}}') as 'فضای نام', CONCAT('{{جا:آرایش‌عدد:',co...
{"runningtime": "1376.16", "resultsets": [{"rowcount": 104, "headers": ["tl_title"]}]}
fawiki_p
Authors of articles by category [CEE Spring 2021]
null
SELECT DISTINCT A.actor_name, CONCAT('{{subst:formatnum:',COUNT(1),'}}') as articles FROM fawiki_p.revision R JOIN fawiki_p.page P1 ON R.rev_page = P1.page_id JOIN fawiki_p.page P2 ON P1.page_title = P2.page_title JOIN fawiki_p.categorylinks CL ON P2.page_id = CL.cl_from JOIN fawiki_p.actor A ON R.rev_actor = A.act...
{"runningtime": "0.07", "resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}]}
fawiki_p
Jeeputer - fawiki User subpage with category
null
USE fawiki_p; SELECT CONCAT('[[کاربر:',page_title,']]') as page_title FROM page LEFT JOIN categorylinks ON cl_from = page_id WHERE cl_from IS NOT NULL AND page_namespace = 2 AND page_title RLIKE '^.*/(?!رده.*|.*.js$).*' GROUP BY page_title LIMIT 200
{"runningtime": "0.07", "resultsets": [{"rowcount": 6, "headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"]}]}
fawiki
Possibly using Wikipedia as webhost (sample)
List of pages in User and Usertalk namespaces that have only been edited by one user, where that editor has not edited mainspace at all
SELECT DISTINCT u.user_name AS user, Concat(IF(p.page_namespace = 2, 'کاربر:', 'بحث کاربر:'), p.page_title) AS page FROM actor a, page p, user u, revision_userindex rp WHERE actor_user IS NOT NULL AND NOT EXISTS (SELECT 1 FROM revision_userindex ru...
{"runningtime": "0.14", "resultsets": [{"headers": ["concat(\"* [[{{subst:ns:\", tl_namespace, \"}}:\", tl_title, \"]]\")"], "rowcount": 11}]}
fawiki
Non-free media on fawiki outside of mainspace
null
USE fawiki_p; SELECT DISTINCT CONCAT('[[:پرونده:', p.page_title, ']]') AS 'عنوان' FROM page p INNER JOIN categorylinks c ON p.page_id = c.cl_from INNER JOIN (imagelinks i LEFT JOIN redirect r ON i.il_from = r.rd_from) ON p.page_title = i.il_to WHERE c.cl_to = "محتویات_غیر_آزاد" AND i.il_from_namespace != 0 AND r.rd_fro...
{"runningtime": "54.01", "resultsets": [{"rowcount": 162, "headers": ["page_namespace", "page_title"]}]}
fawiki
Category:AfC G13 eligible soon submissions clone
null
SELECT DISTINCT page_namespace, page_title, rev_timestamp, page_latest FROM page JOIN revision ON rev_id = page_latest JOIN templatelinks ON tl_from = page_id WHERE page_namespace IN (2, 118) AND tl_title = "AfC_submission" AND tl_namespace = 10 AND page_is_redirect = 0 AND rev_timestamp < (DATE_FORMAT((NOW() - INTER...
{"runningtime": "0.08", "resultsets": [{"headers": ["wbx_id", "wbx_text"], "rowcount": 10}]}
fawiki_p
fawiki Talk subpage-to-mainspace redirects
null
SELECT concat( "*[https://fa.wikipedia.org/w/index.php?title=بحث:{{urlencode:", p.page_title, "}}&redirect=no بحث:", p.page_title, "] به [[:", r.rd_title, "]] تغییر مسیر دارد" ) FROM redirect r INNER JOIN page p ON p.page_id = r.rd_from WHERE p.page_namespace = 1 AND r.rd_namespace = 0 AND p.page_titl...
{"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]}
fawiki_p
Löschanträge - dewiki
null
use dewiki_p; SELECT count(*) AS Anzahl, actor_name FROM page, revision, actor_revision, comment_revision WHERE page_title LIKE "Löschkandidaten/%" AND page_namespace = 4 AND page_id = rev_page AND rev_actor = actor_id AND comment_id = rev_comment_id AND comment_text like "Neuer Abschnitt%" GROUP by ...
{"runningtime": "0.15", "resultsets": [{"rowcount": 30, "headers": ["page_namespace", "page_title"]}]}
dewiki_p
Uncategorized in-use files
null
SELECT CONCAT("File:", page_title), COUNT(*) FROM page JOIN templatelinks ON tl_from = page_id JOIN globalimagelinks ON page_title = gil_to WHERE tl_title = "Uncategorized" AND tl_namespace = 10 AND page_namespace = 6 GROUP BY page_id ORDER BY COUNT(*) DESC
{"runningtime": "0.48", "resultsets": [{"rowcount": 10, "headers": ["oresc_id", "oresc_rev", "oresc_model", "oresc_class", "oresc_probability", "oresc_is_predicted", "oresm_name"]}]}
commonswiki_p
corr
null
SELECT rc_cur_id, rc_title, MAX(rc_this_oldid) AS oldid FROM ( SELECT * FROM recentchanges INNER JOIN change_tag ON recentchanges.rc_id = change_tag.ct_rc_id INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_tag_def.ctd_id INNER JOIN actor ON recentchanges.rc_actor...
{"runningtime": "1.71", "resultsets": [{"rowcount": 100, "headers": ["rev_timestamp", "oresm_name", "oresc_probability", "page_title", "actor_name"]}]}
enwiki_p
Corr2
null
SELECT DISTINCT actor_name, rc_this_oldid, comment_text FROM recentchanges_userindex AS recentchanges INNER JOIN comment ON recentchanges.rc_comment_id = comment.comment_id INNER JOIN actor_recentchanges AS actor ON recentchanges.rc_actor = actor.actor_id WHERE rc_namespace = 0 AND rc_bot = 0 AND acto...
{"runningtime": "0.58", "resultsets": [{"rowcount": 100, "headers": ["rev_timestamp", "oresm_name", "oresc_probability", "page_title", "actor_name"]}]}
enwiki_p
most active editors in recent week
null
SELECT RANK() OVER (ORDER BY sl DESC) rank, actor_name, sl FROM (SELECT actor_name, user_id, COUNT(*) sl FROM revision JOIN actor ON rev_actor = actor_id JOIN `user` ON actor_user = user_id WHERE rev_timestamp > DATE_FORMAT(NOW() - INTERVAL 7 DAY, '%Y%m%d%H%i%s') GROUP BY actor_name ) aaa WHERE NOT EXISTS (SELECT * FRO...
{"runningtime": "128.42", "resultsets": [{"headers": ["wikitext"], "rowcount": 0}]}
zhwiki_p
تخصيص البذور حسب المقالات المشابهة حسب التصنيف
null
use arwiki_p; select concat("#[[", p1.page_title,"]]--->", group_concat(DISTINCT concat("<div class = \"stub-value ",cl4.cl_to,"\">", cl4.cl_to, "</div>") SEPARATOR ' '),"</br>") from page p1 inner join categorylinks cl1 on cl1.cl_from = p1.page_id inner join categorylinks cl2 on p1.page_id = cl2.cl_from inn...
{"runningtime": "0.08", "resultsets": [{"rowcount": 0, "headers": ["ans", "article", "rns", "redlink"]}]}
arwiki_p
Bored SQL
null
SELECT comment_text, Count(*) AS num FROM comment WHERE comment_text LIKE "%copey edit%" GROUP BY comment_text ORDER BY Count(*) DESC;
{"runningtime": "0.89", "resultsets": [{"headers": ["page_title"], "rowcount": 395}]}
enwiki_p
Oldest last-edited modules
Pages with the oldest last-edited timestamp, excluding disambiguation and redirects.
USE fawiki_p; SELECT page.page_namespace AS namespace, revision.rev_page AS page, CONCAT('[[پودمان:',page.page_title, '|', page.page_title, ']]') AS title, CONCAT('{{جا:#زمان:d F Y|',MAX(revision.rev_timestamp),'}}') AS latest_edit, CONCAT('[[ویژه:تفاوت/',MAX(revision.rev_id),'|تفاوت]]') AS diff FROM page ...
{"runningtime": "2.31", "resultsets": [{"rowcount": 0, "headers": ["cat1", "cat2", "title"]}]}
fawiki_p
Venkat TL's assessments during Tag&Assess2021
null
SELECT actor_name, r1.rev_timestamp, comment_text, page.page_title FROM revision_userindex r1 JOIN actor_revision ON actor_id = r1.rev_actor LEFT JOIN page ON page_id = r1.rev_page LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id WHERE actor_name IN ('Ve...
{"runningtime": "29.86", "resultsets": [{"rowcount": 14442, "headers": ["user_name", "rc_title"]}]}
enwiki
IP-Patrolling nlwiki
Vandalismebestrijding 3 oktober 2021
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "0.72", "resultsets": [{"rowcount": 73, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", ...
nlwiki_p
Empty article talks on plwiki
null
USE plwiki_p; SELECT concat("# [[Dyskusja:",page_title,"]]") AS page_title FROM plwiki_p.page WHERE page_namespace = 1 AND page_len = 0 ORDER BY page_title;
{"runningtime": "0.50", "resultsets": [{"rowcount": 73, "headers": ["rank", "tot_reviews", "reviews", "concat(\"[[User:\", actor_name, \"|\", actor_name, \"]]\")", "accept", "decline", "reject", "comment", "accept %", "decline %", "reject %", "comment %", "GROUP_CONCAT(rc_title)"]}]}
plwiki_p
WikiDaheim 2021 media by date
null
SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(img_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, COUNT(image.img_name) as images FROM image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title AND categorylinks.cl_to = "Media_from_WikiDaheim_2021_in_A...
{"runningtime": "0.61", "resultsets": [{"rowcount": 73, "headers": ["rank", "tot_reviews", "reviews", "concat(\"[[User:\", actor_name, \"|\", actor_name, \"]]\")", "accept", "decline", "reject", "comment", "accept %", "decline %", "reject %", "comment %", "GROUP_CONCAT(CASE WHEN rc_namespace = 118 then concat(\" [[Draf...
commonswiki_p
WikiDaheim 2021 media by date
null
SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(img_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, COUNT(image.img_name) as images FROM image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title AND categorylinks.cl_to = "Media_from_WikiDaheim_2021_in_A...
{"runningtime": "27.56", "resultsets": [{"headers": ["user_name"], "rowcount": 16329}]}
commonswiki_p
Testing user_groups table
null
DESCRIBE user_groups;
{"runningtime": "1.53", "resultsets": [{"rowcount": 67, "headers": ["CONCAT('File:', REPLACE(page_title,'_',' '))"]}]}
tewiki_p
Blocks with given comment
null
SET STATEMENT max_statement_time = 120 FOR SELECT * FROM ipblocks INNER JOIN comment ON ipblocks.ipb_reason_id = comment.comment_id WHERE TRUE AND ipb_user = 0 AND comment_text LIKE '%olocationwebhost-soft%' ;
{"runningtime": "3.62", "resultsets": [{"headers": ["declined_then_deleted", "actor_name"], "rowcount": 119}]}
enwiki
English Wikipedia edits per day
Simple query, except for the fact where it runs over ~1 billion rows.
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s")); SELECT DATE_FORMAT(`rev_timestamp`, "%Y-%m-%d") as `Date`, COUNT(*) AS 'Edits' FROM revision WHERE rev_id >= @rev AND rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%...
{"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id"]}]}
enwiki_p
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"runningtime": "0.10", "resultsets": [{"rowcount": 2, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_mode...
enwiki
nlwiki Mistakes by Just Another Bot
null
/*SELECT page_title, revnew.rev_timestamp AS timestamp, revold.rev_len AS 'old-len', revnew.rev_len AS 'new-len', comment_text FROM revision revnew, revision revold, page, `comment` WHERE revnew.rev_actor=(SELECT actor_id FROM actor WHERE actor_name='Just Another Bot') AND revnew.rev_page=page_id AND page_namespac...
{"runningtime": "7.42", "resultsets": [{"rowcount": 100, "headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"]}]}
nlwiki
de_wiki: red links count gt 120
output for https://de.wikipedia.org/wiki/Wikipedia:Fehlende_Artikel
use dewiki_p; SET sql_mode='PIPES_AS_CONCAT'; select '- [['||REPLACE(pl_title, '_', ' ')||']] <!-- '|| c ||' Links -->' as output from (select pl_title , count(*) as c , pl_namespace from pagelinks where pl_from_namespace=0 and pl_namespace=0 group by pl_title, pl_namespace having count(*)>97) ...
{"runningtime": "0.96", "resultsets": [{"rowcount": 390, "headers": ["page_title"]}]}
dewiki_p
Count fixes in Wikipedia:Correct typos in one click
null
SELECT comment_text FROM revision LEFT JOIN comment on rev_comment_id=comment_id WHERE rev_page in (60533818,62053073,61925999,61926002,61926007,61926012,61926014,62002342,62002343,62002345,62002348,62002349,61925967,62057349,61925968,61925974,61925980,61925985,61925989,61925991,61925997) AND comment_text LIKE "% fixed...
{"connection_id": 16131908}
enwiki_p
Monthly edit counts to articles
null
SELECT SUBSTR(rev_timestamp, 1, 6) AS MONTH, COUNT(rev_id) AS edits FROM revision INNER JOIN page on rev_page = page_id WHERE page_namespace = 0 GROUP BY MONTH;
{"runningtime": "24.64", "resultsets": [{"rowcount": 45, "headers": ["user_name"]}]}
enwiki_p
Wikidata: Monuments database Norway
null
SELECT DISTINCT page_title FROM revision_userindex r1 JOIN actor_revision ON actor_id = r1.rev_actor LEFT JOIN page ON page_id = r1.rev_page LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id WHERE actor_name='Sebastian Berlin (WMSE)' AND comment_text LIKE '%Monuments database Norway%'
{"runningtime": "11.33", "resultsets": [{"headers": ["Page", "History URL"], "rowcount": 42}]}
wikidatawiki_p
WLM uploads via Commons Android App
null
SELECT log_timestamp AS upload_timestamp, log_title AS upload_title, actor_name AS uploader_username FROM logging_logindex JOIN actor_logging ON log_actor=actor_id JOIN templatelinks ON tl_from=log_page JOIN categorylinks ON cl_from=log_page WHERE -- only uploads log_type='upload' AND log_ac...
{"runningtime": "10.92", "resultsets": [{"headers": ["Page", "History URL"], "rowcount": 40}]}
commonswiki_p
Admin users in TeWiki
null
select user_id from user join user_groups on ug_user=user_id where ug_group="sysop"
{"runningtime": "8.45", "resultsets": [{"rowcount": 16, "headers": ["user_name", "CONCAT('https://en.wikipedia.org/wiki/Special:Contributions/', user_name)"]}]}
tewiki
Actions performed by admins in TeWiki in 09-2021
null
select user_name, log_type, log_timestamp from logging join user join actor join user_groups on ug_user=user_id and actor_user=user_id and log_actor=actor_id where ug_group="sysop" and log_type in ("delete","block","protect","rights") and log_timestamp>20210901000000 limit 100;
{"runningtime": "7.03", "resultsets": [{"headers": ["user_name", "namespace", "title", "url", "timestamp"], "rowcount": 49}]}
tewiki
Counting actions performed by admins in TeWiki in 09-2021
null
select user_name, count(log_type) as count_actions from logging join user join actor join user_groups on ug_user=user_id and actor_user=user_id and log_actor=actor_id where ug_group="sysop" and log_type in ("delete","block","protect","rights") and log_timestamp>20210401000000 group by user_name limit 100;
{"runningtime": "11.47", "resultsets": [{"rowcount": 95, "headers": ["user", "edits"]}]}
tewiki
50k random users with userpages, reg before 2020-10
Order by page_random
select user_name, user_id, user_registration from page inner join user on page_title = user_name where page_namespace = 2 and user_registration < 20201001000000 order by page_random desc limit 50000
{"runningtime": "516.41", "resultsets": [{"rowcount": 5000, "headers": ["iwl_title", "count"]}]}
enwiki_p
recent changes for ns0 edits with edit comments
null
SELECT * FROM recentchanges INNER JOIN comment ON comment_id = rc_comment_id WHERE rc_type = 0 OR rc_type = 1 AND rc_namespace = 0
{"runningtime": "205.26", "resultsets": [{"rowcount": 5000, "headers": ["wikipedia_page", "link_count"]}]}
enwiki_p
Pages lacking sources or talk pages
null
SELECT pg.page_title FROM page pg INNER JOIN categorylinks on pg.page_id = categorylinks.cl_from WHERE pg.page_is_redirect = 0 AND pg.page_namespace = 0 AND pg.page_title NOT IN (SELECT pg2.page_title FROM page pg2 WHERE pg2.page_namespace = 1) AND categorylinks.cl_to = "All_stub_articles" LIMIT 1000
{"runningtime": "0.42", "resultsets": [{"rowcount": 200, "headers": ["CONCAT('[[', page_title, ']]')"]}]}
enwiki_p
Recently edited articles in both a mother and a daughter category
null
SELECT p1.page_title, cl1.cl_to, cl2.cl_to FROM page p1 -- article JOIN categorylinks cl1 -- daughter ON p1.page_id = cl1.cl_from JOIN categorylinks cl2 -- mother ON p1.page_id = cl2.cl_from JOIN page p2 -- daughter cat page ON cl1.cl_to = p2.page_title AND p2.page_namespace = 14 JOIN categorylinks cl3 ...
{"runningtime": "0.24", "resultsets": [{"rowcount": 92, "headers": ["Tables_in_hewiki_p"]}, {"rowcount": 10, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model"...
fawiki_p
nds_nlwiki Categories without main page
null
SELECT cp.page_title AS cat, (cat_pages-cat_subcats-cat_files) AS `#p`, GROUP_CONCAT(p1.page_title ORDER BY p1.page_title SEPARATOR '|') AS `articles` FROM page cp, category cat0, categorylinks cl1, page p1 WHERE cp.page_is_redirect=0 AND cp.page_namespace=14 AND cp.page_title NOT REGEXP '^Artikel_in_de_...
{"runningtime": "0.60", "resultsets": [{"rowcount": 75, "headers": ["rank", "reviews", "username", "re-reviews", "accept", "decline", "reject", "comment", "accept %", "decline %", "reject %", "comment %"]}]}
nds_nlwiki
Vandalismebestrijding nlwiki (IP-patrolling)
Vandalismebestrijding 6 okt. 2021
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "0.07", "resultsets": [{"headers": ["rank", "actor_name", "COUNT(*)"], "rowcount": 0}]}
nlwiki_p
MediaWiki sites
null
select site_language from sites where site_group = 'wikipedia'
{"runningtime": "3.65", "resultsets": [{"rowcount": 285, "headers": ["redirect target", "redirect count", "redirect namespace", "redirect title"]}]}
mediawikiwiki_p
3 users' edits from revision_userindex, 2 give no results
null
SELECT * FROM revision_userindex WHERE rev_actor = 13286072 LIMIT 5; SELECT * FROM revision_userindex WHERE rev_actor = 144088 LIMIT 5; SELECT * FROM revision_userindex WHERE rev_actor = 24 LIMIT 5;
{"runningtime": "3.36", "resultsets": [{"rowcount": 139, "headers": ["user", "cnt"]}]}
enwiki_p
Edits to articles for a single user by time
null
select rev_timestamp from revision_userindex where rev_actor = 54 and rev_timestamp > 20121003204752 and rev_timestamp < 20121104204752
{"runningtime": "0.20", "resultsets": [{"headers": ["date", "images"], "rowcount": 19}]}
enwiki_p
Counting actions performed by admins on a wiki in 09-2021
null
select user_name, count(log_type) as count_actions from logging join user join actor join user_groups on ug_user=user_id and actor_user=user_id and log_actor=actor_id where ug_group in ("sysop", "bureaucrat") AND ug_user not in (select ug_user from user_groups where ug_group='bot') and log_type in ("delete","block","...
{"runningtime": "1.10", "resultsets": [{"headers": ["actor_name", "sl"], "rowcount": 200}]}
hiwiki_p
Admin users count in TeWiki
null
select count(DISTINCT user_name) from user join user_groups on ug_user=user_id where ug_group in ("sysop", "bureaucrat") AND ug_user not in (select ug_user from user_groups where ug_group='bot')
{"runningtime": "0.25", "resultsets": [{"rowcount": 34, "headers": ["user_name", "user_editcount", "Last edit", "Last Log", "user_group"]}]}
dewiki_p
de_wiki: red links count gt 120
output for https://de.wikipedia.org/wiki/Wikipedia:Fehlende_Artikel
use dewiki_p; SET sql_mode='PIPES_AS_CONCAT'; select '- [['||REPLACE(pl_title, '_', ' ')||']] <!-- '|| c ||' Links -->' as output from (select pl_title , count(*) as c , pl_namespace from pagelinks where pl_from_namespace=0 and pl_namespace=0 group by pl_title, pl_namespace having count(*)>97) ...
{"runningtime": "7.75", "resultsets": [{"headers": ["User", "Contributions", "ipb_id"], "rowcount": 19}]}
dewiki_p
50k random users with userpages, reg before 2020-10
Order by page_random
select * from page inner join user on page_title = user_name where page_namespace = 2 and user_registration < 20201001000000 order by page_random desc limit 50
{"runningtime": "1.28", "resultsets": [{"rowcount": 306, "headers": ["editor", "accepts", "recent_edits"]}]}
enwiki_p
Edits to articles for a single user by time
null
select * from revision_userindex where rev_actor = 54 and rev_timestamp > 20121003204752 and rev_timestamp < 20121104204752
{"runningtime": "5.78", "resultsets": [{"headers": ["User", "Contributions", "ipb_id"], "rowcount": 31}]}
enwiki_p
Fawiki 2019 elections eligible voters
null
use fawiki_p; select concat('[[User:', user_name, '|]]'), concat(left(log_timestamp, 4), '-', mid(log_timestamp, 5, 2), '-', mid(log_timestamp, 7, 2)) as acct_created, concat(left(first_timestamp, 4), '-', mid(first_timestamp, 5, 2), '-', mid(first_timestamp, 7, 2)) as first_edit, concat('{{formatnum:', onefifty.cnt, '...
{"runningtime": "0.07", "resultsets": [{"headers": ["img_name", "img_width", "img_height", "size"], "rowcount": 0}]}
fawiki_p
Random sample of 10k edits from Hindi Wikipedia
null
USE enwiki_p; SELECT rev_id FROM revision WHERE rev_timestamp BETWEEN "20190512000000" AND "20200512000000" ORDER BY RAND() LIMIT 10000;
{"runningtime": "18.30", "resultsets": [{"rowcount": 9956, "headers": ["ip16", "c"]}]}
enwiki_p
Affiliate members harvest on Meta-Wiki
Harvest affiliate members for all affiliates in Wikimedia.
# avoid duplicate user names SELECT DISTINCT metawiki_p.pagelinks.pl_title AS "Past Board" FROM metawiki_p.page AS p JOIN metawiki_p.pagelinks ON metawiki_p.pagelinks.pl_from = p.page_id # harvest usernames from a specific page WHERE p.page_title IS "History_of_the_Wikimedia_Foundation_Board_of_Trustees" AND metawik...
{"runningtime": "8.19", "resultsets": [{"headers": ["User", "Contributions", "ipb_id"], "rowcount": 30}]}
wikimedia
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"connection_id": 15328755}
enwiki
Revisions per user
null
with bots as ( SELECT ug_user FROM user_groups WHERE ug_group="bot" ) , actor_revisions as ( SELECT r.rev_actor, a.actor_user IS NOT NULL is_registered_user, b.ug_user IS NOT NULL is_bot, COUNT(1) revisions, count(case when r.rev_minor_edit then 1 end) minor_revisions FROM revision_userindex r LEFT JOIN actor_revis...
{"runningtime": "0.88", "resultsets": [{"headers": ["page_title"], "rowcount": 390}]}
dewiki_p
Active admins in the last hour
null
SELECT count(DISTINCT rc_user) AS active FROM recentchanges_compat INNER JOIN user_groups ON ug_user = rc_user WHERE rc_timestamp > now() - interval 1 hour AND ug_group = "sysop";
{"runningtime": "16.03", "resultsets": [{"rowcount": 2, "headers": ["actor_name", "rc_this_oldid", "comment_text"]}]}
enwiki
Number of pages by namespaces on Italian Wikipedia
null
SELECT page_namespace, COUNT(*) FROM page GROUP BY page_namespace;
{"runningtime": "5.84", "resultsets": [{"headers": ["reviews", "rc_title", "accepted", "accept %", "declined", "decline %"], "rowcount": 2526}]}
itwiki_p
IPv4 user talk page created by TuanminhBot (100 records) (1)
null
select page_id, page_namespace, page_title, page_is_new, page_latest, actor_name from page join revision on page_latest = rev_id join actor on rev_actor = actor_id where page_namespace = 3 and is_ipv4(page_title) and page_is_new = 1 and actor_name = "TuanminhBot" limit 100
{"runningtime": "0.79", "resultsets": [{"rowcount": 19, "headers": ["user", "edit_count"]}]}
viwiki
IPv4 user talk page created by TuanminhBot (all records) (1)
null
select page_title from page join revision on page_latest = rev_id join actor on rev_actor = actor_id where page_namespace = 3 and is_ipv4(page_title) and page_is_new = 1 and actor_name = "TuanminhBot"
{"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["cat_title", "cat_pages"]}]}
viwiki
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}]}
enwiki
Most pending changes accepts (all time)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' GROUP BY log_actor ORDER BY manual_accept_count DESC LIMIT 1000
{"runningtime": "0.05", "resultsets": [{"rowcount": 0, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}]}
enwiki
Stale IP sox on enwiki
For you, GN <3
SELECT p.page_title, CONCAT("https://en.wikipedia.org/wiki/Special:Contribs/", p.page_title) AS link, ipc.ipc_rev_timestamp as last_edit FROM templatelinks tl INNER JOIN page p ON tl.tl_from = p.page_id INNER JOIN ( SELECT ipc_rev_timestamp, ipc_hex FROM ip_changes ORDER BY ipc_rev_timestamp DESC ) ...
{"runningtime": "7.51", "resultsets": [{"rowcount": 31, "headers": ["date", "reviews", "accepts", "declines", "rejects", "accept %", "decline %", "reject %"]}]}
enwiki_p
IW links to IRC chat cmds page (mww)
null
select * from iwlinks where iwl_prefix = 'w' and iwl_title = 'List_of_Internet_Relay_Chat_commands'
{"runningtime": "1.79", "resultsets": [{"rowcount": 500, "headers": ["log_title", "COUNT(*)"]}]}
mediawikiwiki_p
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"runningtime": "363.96", "resultsets": [{"rowcount": 3, "headers": ["term_type", "term_language", "terms"]}]}
enwiki
nds_nlwiki Lists without a list category
null
SELECT page_title FROM page WHERE page_namespace=0 AND page_is_redirect=0 AND page_title REGEXP '^L(ie|y|ij|ai)ste?' AND NOT EXISTS (SELECT * FROM categorylinks WHERE cl_from=page_id AND cl_to REGEXP '^L(ie|y)sten') AND NOT EXISTS (SELECT * FROM page_props WHERE pp_page=page_id AND pp_propname='disambi...
{"runningtime": "0.67", "resultsets": [{"rowcount": 0, "headers": ["cat_title", "cat_pages"]}]}
nds_nlwiki
Total revisions, by actors, by bots, and by registered users,
null
SET STATEMENT max_statement_time = 1200 FOR with bots as ( SELECT ug_user FROM user_groups WHERE ug_group="bot" ) SELECT a.actor_user IS NOT NULL is_registered_user, b.ug_user IS NOT NULL is_bot, COUNT(1) revisions, COUNT(distinct actor_id) actors FROM revision_userindex r LEFT JOIN actor_revision a ON a.actor_id = ...
{"runningtime": "157.84", "resultsets": [{"rowcount": 1697, "headers": ["user_name", "user_registration", "user_editcount", "Count(rev_id)"]}]}
dewiki_p
Monthly/weekly editors
null
SET @date = "20140101"; SET @n = 1; SELECT COUNT(*) FROM ( SELECT rev_user, SUM(revisions) AS revisions FROM ( SELECT rev_user, COUNT(*) AS revisions FROM revision WHERE rev_timestamp BETWEEN @date AND DATE_FORMAT...
{"runningtime": "0.25", "resultsets": [{"rowcount": 6, "headers": ["img_name", "img_height", "img_width", "size"]}]}
mediawikiwiki_p
Most used templates on bnwiki
null
SELECT DISTINCT CONCAT("{{t1|",page_title,"}}") AS template, COUNT(DISTINCT tl_from) AS counting, pr_type, pr_level FROM page JOIN templatelinks ON page_title = tl_title AND tl_namespace = 10 AND tl_from_namespace = 0 LEFT JOIN page_restrictions ON pr_page = page_id WHERE page_namespace = 10 AND page_is_redirect = 0 ...
{"runningtime": "2.00", "resultsets": [{"rowcount": 373, "headers": ["page_title"]}]}
bnwikibooks_p
Vandalismebestrijding (IP-patrolling) nlwiki
Vandalismebestrijding 11 oktober 2021
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "1.98", "resultsets": [{"rowcount": 20, "headers": ["page_title", "page_len"]}]}
nlwiki_p
enwiki inactive admin users
null
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', log_timestamp AS 'Last log', ug1.ug_group AS 'user_group' FROM `user` LEFT JOIN user_groups ug1 ON user_id = ug1.ug_user JOIN actor ON actor_user = user_id JOIN revision_userindex ON rev_id = (SELECT rev_id FROM revision_userindex ...
{"runningtime": "11.15", "resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 1661}]}
sqwiki_p
Edit summary search
Fork for standing queries
SELECT actor_name AS user, count(actor_name) AS hits FROM recentchanges INNER JOIN comment on rc_id = comment_id LEFT JOIN actor on rc_actor = actor_id WHERE comment_text = "ce" GROUP BY actor_name ORDER BY 2 DESC LIMIT 1
{"runningtime": "0.27", "resultsets": [{"headers": ["rfn", "redirect", "article", "redirector", "rc_timestamp"], "rowcount": 13}]}
enwiki_p
List of wikis
null
SELECT site_global_key, site_group, site_language FROM sites
{"runningtime": "1.49", "resultsets": [{"rowcount": 0, "headers": ["cat1", "cat2"]}]}
mediawikiwiki_p
Vandalismebestrijding (IP-patrolling) nlwiki
Vandalismebestrijding 12 oktober 2021
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"runningtime": "1.43", "resultsets": [{"rowcount": 0, "headers": ["cat1", "cat2"]}]}
nlwiki_p
Uncategorized in-use files
null
SELECT CONCAT("File:", page_title), COUNT(*) FROM page JOIN templatelinks ON tl_from = page_id JOIN globalimagelinks ON page_title = gil_to WHERE tl_title = "Uncategorized" AND tl_namespace = 10 AND page_namespace = 6 GROUP BY page_id ORDER BY COUNT(*) DESC
{"runningtime": "51.26", "resultsets": [{"rowcount": 26173, "headers": ["log_title", "COUNT(log_id)"]}]}
commonswiki_p
Temporary sandbox 2
null
USE ruwiki_p; SELECT page_title FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 ORDER BY page_id DESC LIMIT 1000
{"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["log_actor", "log_timestamp"]}]}
ruwiki_p