title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
PLN Stats 2021
null
select p1.page_id, pl1.pl_namespace, pl1.pl_title from page as p1, pagelinks as pl1, user as u1, pagelinks as pl2, page as p2, logging as l1, actor_logging as al1 where pl1.pl_from=p1.page_id and u1.user_name=pl1.pl_title and p1.page_id IN (1627105,1629817,1645426) ...
{"runningtime": "0.33", "resultsets": [{"headers": ["rank", "IFNULL(actor_name, '\u0412\u0441\u044c\u043e\u0433\u043e')", "newbie"], "rowcount": 71}]}
fiwiki
Quotes in title
null
select page_namespace, page_title from page where page_title like "%—%" and page_is_redirect = 0 and page_namespace = 0;
{"runningtime": "19.25", "resultsets": [{"rowcount": 13151, "headers": ["rc_id", "count(rc_id)"]}]}
bswiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"runningtime": "1.29", "resultsets": [{"headers": ["log_id"], "rowcount": 454}]}
enwiki
Files on tr.wiki NOT in spec categories (no license)
null
#USE glwiki_p; SELECT CONCAT("* [[:File:", img_name, "]]") AS file, actor_name #, # img_timestamp AS img_creation # ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp. FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN actor_image ON img_actor ...
{"runningtime": "0.10", "resultsets": [{"rowcount": 14, "headers": ["log_id"]}]}
trwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"runningtime": "0.15", "resultsets": [{"rowcount": 44, "headers": ["\u0645", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a"]}]}
enwiki
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "27.26", "resultsets": [{"headers": ["Anzahl", "actor_name"], "rowcount": 91}]}
commonswiki_p
count globalimagelinks
count global imagelinks
-- database layout: https://www.mediawiki.org/wiki/Manual:Page_table SELECT p.page_title as Title, concat('https://commons.wikimedia.org/wiki/File:', p.page_title) as complete_link, count(p.page_id) as cnt FROM globalimagelinks AS g RIGHT JOIN page AS p ON p.page_title = g.gil_to INNER JOIN categorylinks as c ON c.cl_f...
{"runningtime": "6170.89", "resultsets": [{"rowcount": 4094711, "headers": ["user_name", "user_id"]}]}
commonswiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"runningtime": "0.40", "resultsets": [{"rowcount": 131, "headers": ["log_id"]}]}
enwiki
Magda 1a
null
USE dewiki_p; SELECT up_user, user.user_registration, user.user_editcount, user.user_name, edits_after FROM user_properties JOIN user ON user.user_id = user_properties.up_user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat...
{"runningtime": "0.82", "resultsets": [{"rowcount": 418, "headers": ["log_id"]}]}
dewiki
AFC Backlog Drive Review Counts
Forking so I can refresh the data. Credit to Robertsky and KylieTastic.
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"connection_id": 20886556}
enwiki
Redlinks from pages in a category
null
SELECT page_namespace AS ans, page_title AS article, pl_namespace AS rns, pl_title AS redlink FROM categorylinks JOIN pagelinks ON pl_from = cl_from AND NOT EXISTS (SELECT 1 FROM page WHERE page_title = pl_title AND page_namespace = pl_namespace) JOIN page ON page_id = cl_from WHERE cl_to = "Lists of Bangladeshi cricke...
{"runningtime": "1.63", "resultsets": [{"rowcount": 31, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_rand...
enwiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "2315.58", "resultsets": [{"rowcount": 1604070, "headers": ["afl_id", "afl_timestamp"]}]}
commonswiki_p
blastingnews.com links in mainspace
null
SELECT DISTINCT page.page_title, externallinks.el_to FROM externallinks INNER JOIN page ON externallinks.el_from = page.page_id WHERE ((externallinks.el_index LIKE "https://com.blastingnews%") OR (externallinks.el_to LIKE "http://com.blastingnews%")) AND page.page_namespace = 0
{"runningtime": "4.31", "resultsets": [{"rowcount": 13, "headers": ["actor_name", "cnt"]}]}
enwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"runningtime": "0.16", "resultsets": [{"rowcount": 46, "headers": ["CONCAT(\"[[User:\", page_title, \"]]\")", "comment_text", ""]}]}
enwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"runningtime": "43.77", "resultsets": [{"headers": ["page_namespace", "page_title", "page_latest", "tl_title", "tl_namespace"], "rowcount": 502}]}
enwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Use as a rough gauge of progress
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "0.65", "resultsets": [{"rowcount": 37, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
enwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "61.89", "resultsets": [{"headers": ["concat ('*[[',page_title,']]')"], "rowcount": 2}]}
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.09", "resultsets": [{"rowcount": 10, "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", ...
enwiki
WikiDaheim users 2020 (by first revision, by uploader)
null
USE commonswiki_p; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count FROM actor, revision, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image.img_name = page.page_title and revision.r...
{"runningtime": "6.92", "resultsets": [{"headers": ["page_title"], "rowcount": 28}]}
commonswiki_p
Bengali Wikipedia Content Translation edits
null
use guwiki_p; -- When appropriate, change 'contenttranslation' to 'sectiontranslation' set @cx_edit_tag = ( select ctd_id from change_tag_def where ctd_name = 'contenttranslation' ); select date_format(rev_timestamp, "%Y-%m-%d %H:%i:%s") as 'Time', rev_id as 'Revision ID', actor_name as 'Us...
{"runningtime": "4.38", "resultsets": [{"headers": ["pl_title", "page_title"], "rowcount": 2763}]}
guwiki_p
Articles created by CX in siwiki in 2021
null
-- When appropriate, change 'contenttranslation' to 'sectiontranslation' set @cx_edit_tag = ( select ctd_id from change_tag_def where ctd_name = 'contenttranslation' ); SELECT rev_timestamp, actor_name, page_title, page_namespace, page_id, MAX(ct_rev_id) FROM `cha...
{"runningtime": "1.68", "resultsets": [{"headers": ["ptrp_page_id", "ptrp_reviewed", "ptrp_deleted", "ptrp_created", "ptrp_tags_updated", "ptrp_reviewed_updated", "ptrp_last_reviewed_by", "page_title", "user_name"], "rowcount": 1000}]}
guwiki_p
Tewiki:saMsthalu articles without images
null
select p1.Page_title from page p1,page p2 where -- p1.page_id not in (select pp_page from page_props where pp_propname in ("page_image", "page_image_free")) -- p1.page_id in (select il_from from imagelinks) -- p1.page_id in (select il_from from imagelinks where il_to not like "%map%") -- a...
{"runningtime": "6.08", "resultsets": [{"rowcount": 3000, "headers": ["page"]}]}
tewiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; -- make group_concat do a crude truncation of content after a certain number of characters SET SESSION group_concat_max_len = 2000; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as "reviews (including comments)", -- too confusing? count(CASE WHEN comment_text like "Commenti...
{"runningtime": "87.81", "resultsets": [{"rowcount": 3, "headers": ["wikitext"]}]}
enwiki
Biggest "duplicate refs" diffs by PBbot on plwiki
null
select rc_title, rc_old_len - rc_new_len as neg_size_diff from recentchanges inner join actor on actor_id = rc_actor inner join comment on comment_id = rc_comment_id where actor_name = "PBbot" and comment_text = "grupowanie przypisów" and rc_timestamp > 20210718000000 and rc_timestamp < 202107192359...
{"runningtime": "0.15", "resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 50}]}
plwiki_p
jawt: 英語形容詞
null
select distinct P.page_title from page as P, categorylinks as CL where P.page_namespace = 0 and CL.cl_to = "英語_形容詞" and P.page_id = CL.cl_from -- limit 100
{"runningtime": "45.18", "resultsets": [{"rowcount": 220, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_id", "page_latest", "ar_namespace", "ar_title", "(SELECT MAX(log_timestamp) FROM logging WHERE log_namespace = ar_namespace AND log_title = ar_title AND log_type = 'delete' AND log_action ...
jawiktionary_p
Personen ohne Geschlecht
Download => Wikitable ==> Copy/Paste
SELECT CONCAT('[[', REPLACE(page_title, '_', ' '), ']]') As Artikel, GROUP_CONCAT(CONCAT('[[:Kategorie:', REPLACE(cl_to, '_', ' '), ']]') SEPARATOR ', ') As Kategorien FROM page, categorylinks WHERE cl_from = page_id AND (cl_to LIKE "Geboren%" OR cl_to LIKE "Gestorben%") AND page_namespace = 0 AND NO...
{"connection_id": 19165454}
dewiki_p
itwiki GFDL files by upload date in cat
null
#USE jawiki_p; SELECT CONCAT("[[:File:", page_title, "]]") as File, img_timestamp, actor_name FROM templatelinks JOIN page ON tl_from = page_id JOIN image ON img_name = page_title AND page_namespace = 6 JOIN actor_image ON img_actor = actor_id JOIN categorylinks ON cl_from = page_id AND cl_type = "file" AND cl_to = "M...
{"runningtime": "39.67", "resultsets": [{"rowcount": 3, "headers": ["user_name", "rc_this_oldid", "comment_text"]}]}
itwiki_p
Most thanked users
Users with the most thanks
USE viwiki_p; SELECT log_title, COUNT(DISTINCT log_actor) AS people_thanking, COUNT(DISTINCT log_id) AS number_thanked FROM logging WHERE log_type = "thanks" GROUP BY log_title ORDER BY people_thanking DESC -- Hạn chế số lượng kết quả. -- Điều chỉnh số này để thêm hoặc bớt số bài. LIMIT 20; SELECT logging.log_...
{"runningtime": "0.66", "resultsets": [{"rowcount": 12, "headers": ["rc_namespace", "antal"]}]}
viwiki_p
Voci orfane senza interlink create da utenti anonimi (limitate temporalmente)
null
SELECT CONCAT('# [[', page_title , ']]') FROM page, revision JOIN actor ON rev_actor = actor_id WHERE page_id = rev_page AND page_namespace = 0 AND page_is_redirect = 0 AND page_id IN (SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_title IN ('O')) AND page_id NOT IN (SELECT ll_from FROM langlink...
{"runningtime": "12.14", "resultsets": [{"rowcount": 3632, "headers": ["eu_entity_id", "eu_aspect", "COUNT(*)"]}]}
itwiki_p
All orphan non-free files on hr.wiki
null
#USE viwiki_p; SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0) LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2....
{"runningtime": "0.61", "resultsets": [{"rowcount": 193, "headers": ["user_name", "user_editcount", "Last edit", "Last Log", "user_group"]}]}
hrwiki_p
WPWPBN পরিসংখ্যান
৩১-৭-২০২১ পর্যন্ত।
/* select count(rev_page) as total from revision,comment where comment_id=rev_comment_id and comment_text like "%WPWPTE%" and rev_timestamp>="2021070100000"; -- --- */select actor_name,count(rev_actor) as countt from revision,comment,actor,page where comment_id=rev_comment_id and rev_actor=actor_i...
{"runningtime": "1642.34", "resultsets": [{"rowcount": 200, "headers": ["user", "edit_count"]}]}
bnwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Articles_for_creati...
{"runningtime": "0.18", "resultsets": [{"headers": ["pp_propname"], "rowcount": 33}, {"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 10}]}
enwiki
All files on hr.wiki with no license
null
#USE glwiki_p; SELECT CONCAT("* [[:File:", img_name, "]]") AS file, actor_name #, # img_timestamp AS img_creation # ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp. FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN actor_image ON img_actor ...
{"runningtime": "0.09", "resultsets": [{"headers": ["rev_id", "actor_name", "GROUP_CONCAT(ctd_name)"], "rowcount": 1}]}
hrwiki_p
Files on hr.wiki with old versions
null
#USE viwiki_p; SELECT CONCAT("# [[:File:", oi_name, "]]") FROM oldimage INNER JOIN page p ON p.page_title = oi_name AND p.page_namespace = 6 INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "Sve_neslobodne_datoteke" #Non-free files #INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "सभी...
{"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_auto", "ipb_anon_only", "ipb_create_account", "ipb_expiry", "ipb_range_start", "ipb_range_end", "ipb_enable_autoblock", "ipb_deleted", "ipb_block_email", "ipb_by_actor", "ipb_a...
hrwiki_p
Files on ro.wiki NOT in spec categories (no license)
null
#USE glwiki_p; SELECT CONCAT("* [[:File:", img_name, "]]") AS file, actor_name #, # img_timestamp AS img_creation # ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp. FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN actor_image ON img_actor ...
{"runningtime": "354.87", "resultsets": [{"rowcount": 0, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
rowiki_p
Possibly inappropriate subpage redirects
null
SELECT mainpage.page_title, mainpage.page_is_new FROM page talkpage INNER JOIN page mainpage on talkpage.page_title = mainpage.page_title WHERE talkpage.page_namespace = 1 AND mainpage.page_namespace = 0 AND mainpage.page_is_redirect = 1 AND mainpage.page_title LIKE '%/GA%' # Archive_%' AND mainpage.page_title NOT LIKE...
{"runningtime": "2.45", "resultsets": [{"rowcount": 1521, "headers": ["\u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435"]}]}
enwiki_p
Wiki4HumanRights
null
select actor_name,page_title,rev_len, CONCAT(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2), "-",substr(rev_timestamp,7,2)," ",substr(rev_timestamp,9,2)+7,":",substr(rev_timestamp,11,2)) as 'Timestamp' from revision join page on rev_page = page_id join actor on rev_actor = actor_id where page_title = "Hak_ko...
{"runningtime": "0.15", "resultsets": [{"headers": ["page_id", "pp_value"], "rowcount": 20}]}
idwiki
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.09", "resultsets": [{"rowcount": 10, "headers": ["rev_id", "comment_text"]}]}
commonswiki_p
Anonymous edits rc_patrolled summary (idwiki)
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": "125.82", "resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 987}]}
idwiki
Most popular individual edit times
List of a user's edit times.
SELECT DAYOFWEEK(rev_timestamp) AS dow, HOUR(rev_timestamp) AS hour, COUNT(rev_id) AS edits FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id) -- Filter by user. WHERE actor.actor_name = "NguoiDungKhongDinhDanh" GROUP BY dow, hour ORDER BY dow ASC, hour ASC;
{"runningtime": "1.21", "resultsets": [{"rowcount": 486, "headers": ["page_title"]}]}
viwiki_p
Username and editcount of Female Users (idwiki)
null
SELECT user_name, user_editcount FROM user RIGHT JOIN (SELECT up_user FROM user_properties WHERE up_property LIKE 'gender' AND up_value LIKE 'female') as female ON female.up_user=user_id ORDER BY user_editcount DESC limit 1000;
{"runningtime": "0.15", "resultsets": [{"rowcount": 18, "headers": ["ips_item_id", "ips_site_page"]}]}
idwiki_p
Male vs Female editors (idwiki)
null
SELECT count(user_name) AS "pengguna", (SELECT count(user_name) FROM idwiki_p.user JOIN user_properties ON up_user = user_id WHERE up_property = 'gender' AND up_value = 'female') AS "female" FROM idwiki_p.user JOIN idwiki_p.user_properties ON up_user = user_id WHERE up_property = 'gender' AND up_value = 'male'
{"runningtime": "0.14", "resultsets": [{"rowcount": 21, "headers": ["ips_item_id", "ips_site_page"]}]}
idwiki_p
Essentially the Special:WantedPages query for bnwikisource
null
SELECT pl_namespace AS namespace, pl_title AS title, COUNT(*) AS value FROM pagelinks LEFT JOIN page AS pg1 ON pl_namespace = pg1.page_namespace AND pl_title = pg1.page_title LEFT JOIN page AS pg2 ON pl_from = pg2.page...
{"runningtime": "0.21", "resultsets": [{"rowcount": 0, "headers": ["CONCAT('| [[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']] ||[[:\u0391\u03c1\u03c7\u03b5\u03af\u03bf:', i_p.page_title, ']]')"]}]}
bnwikisource_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 = 'Cabayi' ; 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 'protection level' FROM protected_titles pt, user u WHERE pt.pt_user = u.user_id AND u.user_name = @uname ORDER B...
{"runningtime": "2.54", "resultsets": [{"rowcount": 100, "headers": ["title", "title_length"]}]}
enwiki_p
top rollbacker
null
SELECT actor_name as user, COUNT(*) as cnt FROM revision JOIN change_tag ON rev_id = ct_rev_id JOIN actor ON actor_id = rev_actor WHERE ct_tag_id = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'mw-rollback') GROUP BY user ORDER BY cnt DESC LIMIT 1000;
{"runningtime": "0.13", "resultsets": [{"headers": ["CONCAT('Benutzer:', page_title)"], "rowcount": 2}]}
bnwiki
Account creation and users blocked per day (idwiki)
null
SELECT SUBSTR(log_timestamp, 1, 8) DAY, SUM((log_type, log_action) = ('newusers', 'create')) ACCUNTS_CREATED, SUM((log_type, log_action) = ('block', 'block')) BLOCKS, SUM((log_type, log_action) = ('block', 'block') AND log_title NOT RLIKE '^(\\d+\\.\\d+\\.|[0-9a-fA-F]+:[0-9a-fA-F]+)') REGISTERED_USERS_BLOCKED FROM...
{"runningtime": "0.23", "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": 88}]}
idwiki_p
Tewiki:Articles with images but also have image request on talk pages
null
select p.page_title from page p,page p1 where p.page_id in (select il_from from imagelinks where il_to like "%_locator_map.svg") -- p.page_id in (select il_from from imagelinks where il_from_namespace=0) and p.page_namespace=0 and p1.page_namespace=1 and p1.page_title=p.page_title -- and p.page_title in (select p1.pag...
{"runningtime": "374.58", "resultsets": [{"rowcount": 3, "headers": ["term_type", "term_language", "terms"]}]}
tewiki
Most edited pages in the last month (idwiki)
From https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#Most_edited_pages_in_last_month This query runs fairly fast.
SELECT rc_title, COUNT(*) AS num_edits FROM recentchanges WHERE rc_namespace = 0 GROUP BY 1 ORDER BY 2 DESC LIMIT 100;
{"runningtime": "0.26", "resultsets": [{"rowcount": 150, "headers": ["page_namespace", "page_title"]}]}
idwiki_p
/doc and .css orphans (idwiki)
null
SELECT page_namespace, page_title FROM page d WHERE page_namespace IN (10, 828) AND (( page_title REGEXP '/doc$' AND NOT EXISTS ( SELECT * FROM page m WHERE m.page_namespace=d.page_namespace AND m.page_title=REGEXP_REPLACE(d.page_title, '/doc$', '')) ) OR ( page_title REGEXP '/[^/]+...
{"connection_id": 8813619}
idwiki
Editors still active after 10 years (idwiki)
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 < '201020324000000' limit 500
{"runningtime": "0.15", "resultsets": [{"rowcount": 1, "headers": ["page_title", "rd_title"]}]}
idwiki_p
List all table (idwiki_p)
null
SHOW TABLES; DESCRIBE ipblocks; DESCRIBE actor; DESCRIBE recentchanges; DESCRIBE site_stats; DESCRIBE content; DESCRIBE imagelinks; DESCRIBE image; DESCRIBE babel; DESCRIBE externallinks; DESCRIBE linter;
{"runningtime": "3.50", "resultsets": [{"rowcount": 10, "headers": ["page_title", "page_id", "rev_page", "rev_timestamp"]}]}
idwiki_p
Longest talks in ukrainian wiki
null
select REPLACE(REPLACE(REPLACE(REPLACE(page_title, "/Архів_1", ""),"/Архів_2", ""),"/Архів_3", ""), "_", " ") as page_title, SUM(page_len) as page_len from page WHERE page_namespace=1 AND page_len > 500 GROUP BY REPLACE(REPLACE(REPLACE(page_title, "/Архів_1", ""),"/Архів_2", ""),"/Архів_3", "") ORDER BY page_len DESC l...
{"runningtime": "150.39", "resultsets": [{"rowcount": 0, "headers": ["user_id", "user_registration", "user_editcount", "COUNT(*)"]}, {"rowcount": 1, "headers": ["user_id", "user_registration", "user_editcount", "COUNT(*)"]}, {"rowcount": 200, "headers": ["user_id", "user_registration", "user_editcount"]}, {"rowcount": ...
ukwiki_p
Polluted categories (idwiki)
from https://wikitech.wikimedia.org/wiki/Help:MySQL_queries/Example_queries
SELECT DISTINCT cl_to FROM categorylinks AS cat JOIN page AS pg1 ON cat.cl_from = pg1.page_id WHERE page_namespace = 2 AND EXISTS (SELECT 1 FROM page AS pg2 JOIN categorylinks AS cl ON pg2.page_id = cl.cl_from WHERE pg2.page_namespace = 0 AND c...
{"runningtime": "156.15", "resultsets": [{"rowcount": 61727, "headers": ["log_type", "log_action", "log_timestamp", "log_title", "log_comment_id", "comment_text"]}]}
idwiki_p
Last 30d IPv6 vandalism ratio per subnets 2021 (idwiki)
~Not working; unreliable data on idwi ref: https://www.mediawiki.org/wiki/Manual:Recentchanges_table
SELECT reverts_c, edits_c, distinct_addresses_c, reverts_c/edits_c AS ratio, reverts_ip_range AS ip_range FROM ( SELECT SUM(1) AS reverts_c, CONCAT(SUBSTR(REGEXP_SUBSTR(comment_text,'/([0-9A-F]{1,4}:[0-9A-F]{1,4}:)'),2),"*") AS reverts_ip_range FROM recentchanges, comment WHERE ...
{"runningtime": "147.87", "resultsets": [{"rowcount": 61730, "headers": ["log_type", "log_action", "log_timestamp", "log_title", "log_comment_id", "log_namespace"]}]}
idwiki_p
m. domains in dewiki
all linked external subdomains in german wikipedia that start with "http://m." or "https://m."
select substring_index(el_to, '/', 3) as subdomain, count(*) as `count` from externallinks where el_to like 'http://m.%' or el_to like 'https://m.%' group by subdomain order by `count` desc;
{"runningtime": "0.99", "resultsets": [{"headers": ["page_title"], "rowcount": 405}]}
dewiki_p
AfC daily review stats (review, accept, decline) 23 Sep 2021 *
null
select DATE(rc_timestamp) AS date,count(rc_id) as reviews, SUM(comment_text like "%Publishing accepted%") as accepts, SUM(comment_text like "Declining submission:%") as declines, SUM(comment_text like "Rejecting submission:%") as rejects, concat(round(SUM(comment_text like "%Publishing accepte...
{"runningtime": "1307.07", "resultsets": [{"headers": ["user_name", "user_registration", "user_editcount", "rev_count"], "rowcount": 5076}]}
enwiki
Globally locked editors
Editors that have been globally locked including the lock timestamp and reason
select logging.log_timestamp, logging.log_title, logging.log_comment_id, logging.log_action, logging.log_actor, comment.comment_text from metawiki.logging left join metawiki.comment on logging.log_comment_id=comment.comment_id where log_type='globalauth' and log_action='setstatus' limit 10
{"connection_id": 14391702}
metawiki
حجم الإضافات
null
USE arwiki_p; SELECT CONCAT(actor_name) AS user_name, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count, COUNT(rev.rev_id) as edit_count FROM user INNER JOIN revision rev ON user.user_id = rev.rev_actor INNER JOIN actor ON rev.rev_actor = actor.actor_id INNER JOIN revisi...
{"runningtime": "0.16", "resultsets": [{"rowcount": 3, "headers": ["img_name", "img_width", "img_height", "size"]}]}
arwiki_p
Bnwiki active user list
null
USE bnwiki_p; SELECT CONCAT("# {{#target:",actor_name,"}}") AS rev_user_text, COUNT(actor_id) AS recent_user_editcount /*user_editcount*/ FROM revision JOIN actor ON rev_actor=actor_id JOIN page ON rev_page=page_id WHERE actor_user IS NOT NULL AND page_namespace IN ('0','1','2','3','4') AND rev_timestamp BETWEEN 20...
{"runningtime": "774.78", "resultsets": [{"rowcount": 9, "headers": ["term_type", "term_language", "terms"]}]}
bnwiki_p
Authors of articles by category [CEE Spring 2021]
null
SELECT DISTINCT A.actor_name, COUNT(1) as articles FROM ukwiki_p.revision R JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id JOIN ukwiki_p.page P2 ON P1.page_title = P2.page_title JOIN ukwiki_p.categorylinks CL ON P2.page_id = CL.cl_from JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id WHERE R.rev_parent_id = 0 A...
{"runningtime": "2.64", "resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 5}, {"headers"...
ukwiki_p
nlwiki Lists without a list category
null
SELECT CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS page_title, REPLACE(REPLACE(page_title,'Lijst_van_',''),'_',' ') AS suffix FROM page WHERE page_namespace=0 AND page_is_redirect=0 AND page_title REGEXP '^Lijst_van_' AND NOT EXISTS (SELECT * FROM categorylinks WHERE cl_from=page_id AND cl_to REGEXP '...
{"runningtime": "0.35", "resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 28}]}
nlwiki
Recent reverts of multiple non-autoconfirmed editors
null
SELECT rc_title as 'Page', CONCAT('https://en.wikipedia.org/w/index.php?title=', rc_title, '&action=history') as 'History URL' FROM recentchanges_userindex INNER JOIN change_tag ON 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_recentchanges ...
{"runningtime": "0.46", "resultsets": [{"rowcount": 20, "headers": ["\u0b87\u0ba8\u0bcd\u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bcd \u0bae\u0bc6\u0baf\u0bcd\u0baa\u0bcd\u0baa\u0bc1\u0baa\u0bcd\u0baa\u0ba3\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b88\u0b9f\u0bc1\u0baa\u0b9f\u0bcd\u0b9f\u0bcb\u0bb0\u0bcd:<br/>"]}]}
enwiki_p
edo - nlwiki_p Anonymous edits rc_patrolled summary
forked from Bdijkstra - show all unpatrolled edits for the last weeks by day/user/lemma
USE nlwiki_p; # 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...
{"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace"]}]}
nlwiki
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...
{"connection_id": 26445075}
commonswiki_p
Indef sysop creation protection
null
SELECT CONCAT ("[[",pt_title,"]]") AS 'Page', user_name AS "Protecting admin", pt_timestamp AS "Time", comment_text AS "Summary" FROM protected_titles JOIN comment ON comment_id = pt_reason_id JOIN user on user_id = pt_user WHERE pt_expiry = 'infinity' AND pt_create_perm = 'sysop' AND pt_namespace = 0;
{"runningtime": "0.71", "resultsets": [{"headers": ["Szerkeszt\u0151", "WPWPHU"], "rowcount": 5}]}
enwiki
WikiDaheim correctors 2021 (after first revision)
Count the number of edits on WikiDaheim images after upload done by users other than the uploader.
#USE commonswiki_p; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(revision.rev_parent_id) as edit_count FROM actor, /*user_groups,*/ revision, revision as revision0, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image...
{"runningtime": "2.68", "resultsets": [{"rowcount": 1600, "headers": ["page_title", "linter_cat", "linter_params", "lint_count"]}]}
commonswiki
Unreviewed redirects sorted by date
null
SELECT CONCAT('[https://hu.wikipedia.org/w/index.php?title=',page1.page_title,'&redirect=no ',page1.page_title,']') AS 'Cím', MIN(revision1.rev_timestamp) FROM page as page1 INNER JOIN revision AS revision1 ON page1.page_id = revision1.rev_page # first revision LEFT OUTER JOIN flaggedpages ON flaggedpages.fp_page_id = ...
{"resultsets": [{"rowcount": 32, "headers": ["actor_name", "countt"]}], "runningtime": "0.62"}
huwiki_p
Anomalous projectspace pages on enwiki
Projectspace non-subpages that do not have any incoming redirects
SELECT page_title, CONCAT("https://en.wikipedia.org/wiki/Wikipedia:", page_title) AS link FROM page p WHERE page_namespace = 4 AND p.page_title NOT LIKE "_%/_%" AND p.page_is_redirect = 0 AND NOT EXISTS (SELECT NULL FROM categorylinks c WHERE c.cl_from = p.p...
{"resultsets": [{"headers": ["cat_id", "cat_title"], "rowcount": 10}], "runningtime": "0.08"}
enwiki_p
Kswiki template and module counts
Transclusion count for templates and modules on kswiki
SELECT tl_namespace, tl_title, COUNT(*) FROM templatelinks WHERE tl_namespace = 10 OR tl_namespace = 828 GROUP BY tl_title HAVING COUNT(*) > 1 ORDER BY tl_namespace ASC, COUNT(*) DESC, tl_title ASC LIMIT 10000;
{"resultsets": [{"headers": ["page_title"], "rowcount": 1000}], "runningtime": "30.50"}
kswiki_p
Files with extension that can't be uploaded anymore
null
SELECT concat("File:", img_name) FROM image WHERE img_name NOT RLIKE "\.([pP][nN][gG]|[jJ][pP][eE]?[gG]|[sS][vV][gG]|[tT][iI][fF]?[fF]|[gG][iI][fF]|[wW][eE][bB][pPmM]|[mM][pP][eE]?[gG]|[mM][iI][dD][iI]?|[oO][gG][gGvVaA]|[mM][pP][3]|[wW][aA][vV]|[xX][cC][fF]|[dD][jJ][vV][uU]|[fF][lL][aA][cC]|[oO][pP][uU][sS]|[pP][dD][fF...
{"resultsets": [{"headers": ["user_name", "total", "weekdays", "dist_days"], "rowcount": 105}], "runningtime": "401.71"}
enwiki
rcat outside shell test
null
select page_title from page left join revision on page_latest=rev_id inner join templatelinks on page_id=tl_from where page_namespace=0 and page_is_redirect=1 and rev_actor=39784 and tl_title="Rcat_shell";
{"resultsets": [{"headers": ["user_editcount"], "rowcount": 1}], "runningtime": "0.10"}
enwiki_p
Redlinked redirects in category "Sidnamn med arabiska alfabetet"
Find redirects with red links in a specific category
SELECT page_title AS "Page" FROM page JOIN pagelinks ON pl_from = page_id JOIN categorylinks ON cl_from = pl_from WHERE cl_to = "Sidnamn_med_arabiska_alfabetet" AND pl_namespace = 0 AND (NOT EXISTS( SELECT * FROM page WHERE page_title = pl_title AND page_namespace = 0)) AND page_namespace = 0;
{"resultsets": [{"headers": ["concat(rev_id,\",\")"], "rowcount": 270}], "runningtime": "0.38"}
svwiki
nlwiki Red article links w/ rare title suffixes between parenthesis
(just suffixes w/ lowercase letters for now) 1. count all suffixes in article links 2. get red article links with a suffix 3. join and select rare suffixes (currently: that occur only once) takes 15-20 mins https://nl.wikipedia.org/wiki/Gebruiker:Bdijkstra/quarry/Haakjesanomalieën
SELECT REPLACE(s.`suffix`,'_',' ') AS suffix, CONCAT('[[:',REPLACE(`from`,'_',' '),']]') AS `from`, CONCAT('[[:',REPLACE(`to`,'_',' '),']]') AS `to` FROM ( SELECT `suffix`, COUNT(*) AS `count` FROM (SELECT pl_from, pl_title, REGEXP_REPLACE(pl_title, '^.*_\\(([^\\(\\)]+)\\)$', '\\1') AS `suffix` FROM pagelinks ...
{"resultsets": [{"headers": ["page_title", "$link"], "rowcount": 10694}], "runningtime": "12.59"}
nlwiki
Early gaming - experiment
null
SET STATEMENT max_statement_time = 120 FOR WITH wikied_actors AS ( SELECT DISTINCT actor_id FROM change_tag INNER JOIN revision_userindex AS revision ON change_tag.ct_rev_id = revision.rev_id INNER JOIN actor_revision AS actor ON revision.rev_actor = actor.actor_id WHERE ct_tag...
{"resultsets": [{"headers": ["deletions", "actor_name"], "rowcount": 19}], "runningtime": "0.11"}
enwiki_p
Select OrphanTalk from ns 1 (Talk) in thwikisource
Query is based on https://github.com/Krinkle/mw-tool-orphantalk/blob/9353b1d1642827c7c812a34e1e69f97644e8c0af/class.php#L303 and [[User:Patsagorn Y.]]
/* OrphanTalk::getOrphans */ SELECT p2.page_title FROM page as p1 RIGHT JOIN page as p2 ON p1.page_title = p2.page_title AND p1.page_namespace = 0 WHERE p2.page_namespace = 1 AND p1.page_title IS NULL ORDER BY p2.page_namespace ASC, p2.page_title ASC LIMIT 10000
{"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 7}, {"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 10}], "runningtime": "0.47"}
thwikisource_p
Select OrphanTalk from ns 7 (Talk) in thwikisource
Query is based on https://github.com/Krinkle/mw-tool-orphantalk/blob/9353b1d1642827c7c812a34e1e69f97644e8c0af/class.php#L303 and [[User:Patsagorn Y.]]
/* OrphanTalk::getOrphans */ SELECT p2.page_title FROM page as p1 RIGHT JOIN page as p2 ON p1.page_title = p2.page_title AND p1.page_namespace = 114 WHERE p2.page_namespace = 115 AND p1.page_title IS NULL ORDER BY p2.page_namespace ASC, p2.page_title ASC LIMIT 10000
{"resultsets": [{"headers": ["page_title"], "rowcount": 95}], "runningtime": "0.58"}
thwikisource_p
TPA and email indefs by Ivi
null
SET STATEMENT max_statement_time = 60 FOR SELECT actor_name, ipb_address, comment_text FROM ipblocks INNER JOIN actor ON (ipblocks.ipb_by_actor = actor.actor_id) INNER JOIN comment ON (ipblocks.ipb_reason_id = comment.comment_id) WHERE TRUE AND actor_name = 'Ivi104' -- AND ipb_allow_usertalk = 0 AND ipb_blo...
{"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 538}], "runningtime": "6.35"}
hrwiki_p
Comparison of IP edits by removal
null
SELECT -- Add the following columns... -- COUNT(*) COUNT(CASE WHEN ct_tag_id = 59 THEN 1 END) as "reverted edits", COUNT(CASE WHEN 1=1 THEN 1 END) as "all" FROM revision as rev -- ... from all Wikipedia revisions JOIN change_tag ON change_tag.ct_rev_id = rev.rev_id -- Combines revision tags ...
{"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 8}], "runningtime": "0.53"}
hrwiki_p
wikidata: edits by username and property
null
SELECT rev_id, page_title, page_namespace, rev_timestamp, comment_text FROM actor_revision JOIN revision_userindex ON rev_actor=actor_id JOIN comment ON rev_comment_id=comment_id JOIN page ON rev_page=page_id WHERE actor_name='Geek surine' AND comment_text LIKE '%P2566%';
{"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace", "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": 7}],...
wikidatawiki
Statistik: Rollbacks pro Benutzer
null
SELECT actor_name as user, COUNT(*) as cnt FROM revision JOIN change_tag ON rev_id = ct_rev_id JOIN actor ON actor_id = rev_actor WHERE ct_tag_id = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'mw-rollback') GROUP BY user ORDER BY cnt DESC LIMIT 400;
{"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": 1}], "runningtime": "12.39"}
dewiki
top bnwiki users by block log of all time
সংখ্যা অনুযায়ী বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি বাধাপ্রাপ্ত ব্যবহারকারী
USE bnwiki_p; SELECT log_title, COUNT(*) FROM logging WHERE log_type="block" GROUP BY log_title ORDER BY COUNT(*) DESC LIMIT 500;
{"resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 0}], "runningtime": "0.71"}
bnwiki_p
Globalimagelinks
Find files without globalimagelinks (unused files) on commons in a certain category
-- database layout: https://www.mediawiki.org/wiki/Manual:Page_table SELECT p.page_title FROM globalimagelinks AS g RIGHT JOIN page AS p ON p.page_title = g.gil_to INNER JOIN categorylinks as c ON c.cl_from = p.page_id WHERE cl_to = 'Audio_files_made_by_jeuwre' AND g.gil_to IS NULL AND p.page_is_redirect = 0
{"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 31}], "runningtime": "0.10"}
commonswiki_p
WikiDaheim users 2021 (by first revision, by uploader)
Uploads by users for WikiDaheim 2021 (only first revisions)
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count FROM actor, revision, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image.img_name = page.page_title and revision.rev_page = page.page_...
{"resultsets": [{"headers": ["page_title"], "rowcount": 100}], "runningtime": "2.26"}
commonswiki_p
Tewiki:pustakaalu articles without images
null
select p2.Page_title from page p1, page p2 where -- p1.page_id not in (select pp_page from page_props where pp_propname in ("page_image", "page_image_free")) p1.page_id not in (select il_from from imagelinks) and p1.page_namespace=0 and p1.page_is_redirect=0 and p1.page_id not in (select pp_pa...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 10000}], "runningtime": "56.37"}
tewiki
Tewiki:SciTech articles without images
null
select p1.Page_title from page p1,page p2 where -- p1.page_id not in (select pp_page from page_props where pp_propname in ("page_image", "page_image_free")) p1.page_id not in (select il_from from imagelinks) and p1.page_namespace=0 and p1.page_is_redirect=0 and p1.page_id not in (select pp_pag...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 100000}], "runningtime": "124.73"}
tewiki
Tewiki:History articles without images
null
select p1.Page_title from page p1,page p2 where -- p1.page_id not in (select pp_page from page_props where pp_propname in ("page_image", "page_image_free")) p1.page_id not in (select il_from from imagelinks) and p1.page_namespace=0 and p1.page_is_redirect=0 and p1.page_id not in (select pp_page...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 100000}], "runningtime": "160.88"}
tewiki
Tewiki:Articles without images
null
select p1.Page_title from page p1,page p2 where p1.page_id not in (select pp_page from page_props where pp_propname in ("page_image", "page_image_free")) and p1.page_namespace=0 and p1.page_is_redirect=0 and p1.page_id not in (select pp_page from page_props where pp_propname ="disambiguation") ...
{"resultsets": [{"headers": ["CONVERT(cl_to USING utf8)", "COUNT(*)"], "rowcount": 9}], "runningtime": "98.49"}
tewiki
list
null
USE bnwiki_p; SELECT CONCAT("# {{target | user =",actor_name,"| site = bn.wikipedia.org }}") AS rev_user_text, COUNT(actor_id) AS recent_user_editcount /*user_editcount*/ FROM revision JOIN actor ON rev_actor=actor_id JOIN page ON rev_page=page_id WHERE actor_user IS NOT NULL AND page_namespace IN ('0','1','2','3','4...
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "LOWER(CONVERT(log_title USING utf8mb4))"], "rowcount": 0}], "runningtime": "418.09"}
bnwiki_p
User pages without a user account (bnwiki)
(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...
{"resultsets": [{"headers": ["user_name", "user_id", "actor_id"], "rowcount": 1}], "runningtime": "0.06"}
bpywiki_p
Username and editcount of Female Users (bnwiki)
null
SELECT user_name, user_editcount FROM user RIGHT JOIN (SELECT up_user FROM user_properties WHERE up_property LIKE 'gender' AND up_value LIKE 'female') as female ON female.up_user=user_id ORDER BY user_editcount DESC limit 1000;
{"resultsets": [{"headers": ["user_name", "user_id", "actor_id"], "rowcount": 1}], "runningtime": "0.08"}
bnwiki_p
nlwiki Template edits from Telianet
null
SELECT rn.rev_timestamp, rn.rev_len AS `new-len`, ro.rev_len AS `old-len`, page_title, actor_name, comment_text, NOT EXISTS (SELECT * FROM revision rc WHERE page_id=rc.rev_page AND rc.rev_parent_id!=0 AND rc.rev_parent_id=rn.rev_id) AS latest, GROUP_CONCAT(DISTINCT pr_level) AS pr_level FROM revision rn, (pag...
{"resultsets": [{"headers": ["url", "pagename", "page_id"], "rowcount": 0}], "runningtime": "36.70"}
nlwiki
Recent small edits on enwiki
null
SELECT user_name as 'User', CONCAT('https://en.wikipedia.org/wiki/Special:Contributions/', user_name) as 'Contributions', ipb_id FROM recentchanges_userindex INNER JOIN actor_recentchanges ON rc_actor = actor_id INNER JOIN user ON actor_user = user.user_id LEFT JOIN ipblocks ON ipb_user = user.user_id WHERE TRU...
{"resultsets": [{"headers": ["pl_title"], "rowcount": 9}], "runningtime": "0.07"}
enwiki_p
WikiDaheim Constraints 2021
check the 2 MPixel minimum requirement
#USE commonswiki_p; SELECT /* SLOW_OK */ image.img_name, image.img_height, image.img_width, (image.img_height * image.img_width) as size FROM image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title AND categorylinks.cl_to = "Media_from_WikiDahei...
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 57}], "runningtime": "0.40"}
commonswiki
Page-wise count of Red links in Andhra Pradesh village pages
null
SELECT concat("[[",page_title,"]]"),count(page_title) redlinksCount FROM pagelinks,categorylinks,page WHERE cl_from=pl_from and page_id=pl_from and pl_namespace=0 AND pl_from_namespace = 0 AND (cl_to = 'ఆంధ్రప్రదేశ్_గ్రామాలు' OR cl_to IN (select page_title from page inner join categorylinks on cl_f...
{"resultsets": [{"headers": ["user_name"], "rowcount": 168}], "runningtime": "13.73"}
tewiki
First revision with the "visualeditor" tag after a given revision for a given page
null
SELECT page_title, page_len FROM page WHERE page_namespace=0 AND page_is_redirect=0 AND page_id NOT IN (SELECT pp_page FROM page_props WHERE pp_propname='disambiguation' UNION SELECT tl_from FROM templatelinks JOIN linktarget ON lt_id=tl_target_id WHERE lt_namespace=104) LIMIT 10
{"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched",...
enwikisource_p
c
null
SELECT user_name AS user, count(*) AS review_cnt FROM logging JOIN actor ON log_actor = actor_id JOIN user ON actor_user = user_id WHERE log_type = 'review' AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i') AND log_timestamp > 20210406000000 GROUP BY user_name ORDER ...
{"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 2953}], "runningtime": "23.23"}
bnwiki
trwiki_p Links to disambiguation pages
null
#SELECT DISTINCT CONCAT('# [[Özel:SayfayaBağlantılar/',page_title,'|',page_title,']]') 'sayfa adı'#, COUNT(pl_from) AS 'count' SELECT DISTINCT CONCAT('# [[',pl_from,']]') 'sayfa id', fp.page_title #, COUNT(pl_from) AS 'count' FROM (( # direct links from non-redirects to disambiguation pages SELECT dp.page_name...
{"connection_id": 205819470}
trwiki_p
Files on km.wiki NOT in spec categories (no license)
null
#USE tewiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file, actor_name #, revactor_timestamp ###FROM templatelinks ###JOIN page ON tl_from = page_id ###JOIN image ON img_name = page_title AND page_namespace = 6 ###JOIN actor_image ON img_actor = actor_id FROM image JOIN page ON page_namespace=6 AND page_ti...
{"resultsets": [{"headers": ["actor_name", "count(rev_actor)"], "rowcount": 356}], "runningtime": "0.93"}
kmwiki_p
All orphan non-free files on km.wiki
null
#USE ukwiki_p; #SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p SELECT CONCAT('[[User:', actor_name, ']]') as Uploader, CONCAT('[[:File:', p.page_title, ']]') as file FROM page p INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from LEFT JOIN imagelinks i ...
{"resultsets": [], "runningtime": "0.03"}
kmwiki_p
Заблоковані користувачі
null
SELECT ipblocks.ipb_address, 'blocked' FROM ipblocks WHERE ipb_address != '' AND ipb_address NOT REGEXP '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'
{"resultsets": [{"headers": ["Maddeler"], "rowcount": 0}], "runningtime": "0.05"}
eswiki_p