title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
WLM in Sweden participants (last 5 editions)
People who have uploaded images during WLM in Sweden (2016–2020). List ready for mass messaging (https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Monuments_in_Sweden/Mass_message)
use commonswiki_p; SELECT CONCAT("# {{#target:User_talk:", actor_name, "}}") as line FROM revision r_prev join categorylinks on rev_page = cl_from join actor on rev_actor = actor_id and actor_user is not null WHERE rev_parent_id = 0 and cl_to IN ( "Images_from_Wiki_Loves_Monuments_2022_in_Sweden", "Images_from_Wik...
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 17}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 13}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 18}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 25}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
commonswiki_p
Thanks frwiki (all)
null
USE frwiki_p; SELECT log_title, COUNT(log_id) FROM logging_logindex WHERE log_type = "thanks" GROUP BY log_title ORDER BY 2 DESC
{"resultsets": [{"headers": ["ul_key", "ul_value"], "rowcount": 19}], "runningtime": "0.07"}
frwiki
সম্পাদনার সংখ্যা অনুযায়ী উইকিবইয়ের সম্পাদকগণ/১-১০০
উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন।
USE bnwikibooks_p; SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])|বট|CommonsDelinker(.*)" ORDE...
{"resultsets": [{"headers": ["wbit_item_id"], "rowcount": 4278}], "runningtime": "4.32"}
bnwikibooks_p
TimedText
null
select page_title from page where page_namespace = 102;
{"resultsets": [{"headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 3}], "runningti...
commonswiki
Tamzin's sandbox
Something is terribly wrong (probably)
SELECT actor_name, rev_id, comment_text FROM change_tag LEFT JOIN revision ON ct_rev_id = rev_id LEFT JOIN comment ON comment_id = rev_comment_id INNER JOIN actor on actor_id = rev_actor WHERE ct_tag_id = 566 -- Reply tool AND comment_text LIKE "Reply__%"
{"connection_id": 165599897}
enwiki_p
Files on gl.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 ...
{"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", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "comm...
glwiki_p
Most active Lexeme editors (Swedish)
null
SELECT actor.actor_name as Username, COUNT(actor.actor_name) AS cnt FROM page JOIN revision ON page.page_id=revision.rev_page JOIN pagelinks ON page.page_id=pagelinks.pl_from JOIN actor ON revision.rev_actor=actor.actor_id WHERE page.page_namespace=146 AND pagelinks.pl_title="Q9027" # Swedish GROUP BY actor....
{"resultsets": [{"headers": ["basepage_title"], "rowcount": 1}], "runningtime": "52.91"}
wikidatawiki_p
Nonstandard user categories
null
select distinct cl_to from categorylinks join page on page_id=cl_from where page_namespace=2 and page_title not like "%/%" and cl_to not like "%Wikipedian%" and cl_to not like "Wikipedia_sockpuppets_of%" and cl_to not like "Suspected_Wikipedia_sockpuppets_of%" and cl_to not like "%ser_templates%" and cl_to not like "Af...
{"resultsets": [{"headers": ["page_title", "page_id", "talk_id"], "rowcount": 3938}], "runningtime": "220.71"}
enwiki_p
wikidatawiki Alias equal to label
Query breakdown: - inner 2 queries (t1 & t2): find recently changed items with labels and aliases and their languages - middle query (t3): find items that use the same text in the same language as both its label and as an alias - outer query: lookup the texts themselves and the language codes and group them by item ID ...
SELECT CONCAT('Q', wbit_item_id) AS `item ID`, GROUP_CONCAT(DISTINCT wbxl_language SEPARATOR ', ') AS lang, GROUP_CONCAT(DISTINCT wbx_text SEPARATOR ', ') AS text FROM (SELECT t1.wbit_item_id AS wbit_item_id, t1.wbtl_text_in_lang_id AS wbtl_text_in_lang_id FROM (SELECT wbit_item_id, wbtl_text_in_...
{"resultsets": [{"headers": ["rev_timestamp", "actor_name", "page_title", "comment_data", "page_id"], "rowcount": 217}], "runningtime": "0.26"}
wikidatawiki
Number of all edits in ns0 in certain wiki per year
null
select actor_name, count(*) c from revision join page on rev_page=page_id join actor on rev_actor=actor_id where page_namespace = 0 and rev_timestamp >= "20200101000000" and rev_timestamp < "20210101000000";
{"runningtime": "0.92", "resultsets": [{"rowcount": 507, "headers": ["cl_from1", "page_title1", "cl_to1"]}]}
fawiki_p
fawiki - number of reverted edits in certain periods
One week AFTER the IP editing restriction
select rev_timestamp DIV 1000000 as "زمان", count(rev_id) as "تعداد برگردانی‌ها" FROM revision JOIN change_tag ON rev_id = ct_rev_id WHERE ct_tag_id = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'mw-reverted') and rev_timestamp > "2021102100000" and rev_timestamp < "20211027235959" GROUP BY rev_timestamp DIV 1...
{"runningtime": "0.21", "resultsets": [{"rowcount": 100, "headers": ["log_timestamp", "log_title", "log_type", "log_action"]}]}
fawiki_p
fawiki - number of reverted edits in certain periods
One week BEFORE the IP editing restriction
select rev_timestamp DIV 1000000 as "زمان", count(rev_id) as "تعداد برگردانی‌ها" FROM revision JOIN change_tag ON rev_id = ct_rev_id WHERE ct_tag_id = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'mw-reverted') and rev_timestamp > "2021101400000" and rev_timestamp < "20211020235959" GROUP BY rev_timestamp DIV 1...
{"runningtime": "5.11", "resultsets": [{"rowcount": 70, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_namespace", "page_title", "page_touched"]}]}
fawiki_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": "1.86", "resultsets": [{"headers": ["afl_id", "afl_filter", "afl_global", "afl_filter_id", "afl_user", "afl_user_text", "afl_ip", "afl_action", "afl_actions", "afl_var_dump", "afl_timestamp", "afl_namespace", "afl_title", "afl_wiki", "afl_deleted", "afl_patrolled_by", "afl_rev_id"], "rowcount": 0}]}
enwiki
WikiProject India - Tag & Assess 2021 - Results
This query needs to be re-run, and you are seeing result from an old run
SELECT actor_name, count(DISTINCT page_id) 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 ('AshLin', 'DaxServer',...
{"runningtime": "0.23", "resultsets": [{"rowcount": 100, "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_...
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": 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", "page_lang"]}]}
enwiki
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 "% was d...
{"runningtime": "8.50", "resultsets": [{"rowcount": 15, "headers": ["actor_name", "countt"]}]}
enwiki_p
unreviewed articles for Wikiproject Australia
null
SELECT DISTINCT article.page_title AS PT, CONCAT("https://en.wikipedia.org/wiki/", article.page_title) AS link FROM page article JOIN page talkpage ON article.page_title = talkpage.page_title JOIN templatelinks ON talkpage.page_id=templatelinks.tl_from WHERE article.page_id IN ( SELECT page.page_id FROM revision JOI...
{"runningtime": "3.22", "resultsets": [{"headers": ["CONCAT('Razgovor sa suradnikom:', page_title)"], "rowcount": 2170}]}
enwiki
Missing Disambiguation pages , de
null
set @i = 12; SELECT page1.page_title FROM page as page1 WHERE SUBSTRING(page1.page_title,@i,1) = '(' AND (SELECT COUNT(page2.page_id) FROM page as page2 WHERE page2.page_namespace=0 AND LENGTH(page2.page_title)>=@i AND SUBSTRING(page1.page_title,1,@i)=SUBSTRING(page2.page_title,1,@i)) > 1 AND (SELECT COUNT(page2.page_i...
{"runningtime": "412.24", "resultsets": [{"rowcount": 72, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
dewiki_p
Whoops, I think I just abused the system :( (I'm sorry)
null
SELECT * FROM `user_properties`
{"runningtime": "0.36", "resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 28}]}
thwiki_p
WStaProofreadersListஅறிவியல் நோக்கில் இலக்கியம், சமயம், தத்துவம்
This Query will provide the list of users who did edit on given book with its all pages.
Use tawikisource_p; SET @w:=0; select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book WHERE rev_page IN (select p...
{"runningtime": "0.87", "resultsets": [{"headers": ["wp_participant_user", "num_edits_to_wp_pages"], "rowcount": 89}]}
tawikisource_p
Softblocked Rollbackers
null
SELECT * FROM ipblocks JOIN user ON ipb_user = user_id JOIN user_groups ON ug_user = user_id WHERE ipb_enable_autoblock = 0 AND ipb_user != 0 AND ug_group = 'rollbacker' LIMIT 10;
{"runningtime": "48.75", "resultsets": [{"rowcount": 188, "headers": ["page_title", "pl_title", "page_latest"]}]}
enwiki
All Blocked Rollbackers
null
SELECT * FROM ipblocks JOIN user ON ipb_user = user_id JOIN user_groups ON ug_user = user_id WHERE ipb_user != 0 AND ug_group = 'rollbacker';
{"runningtime": "0.50", "resultsets": [{"rowcount": 3, "headers": ["file", "actor_name"]}]}
enwiki
How many active sysops are there?
null
SELECT count(DISTINCT user_id) FROM recentchanges JOIN actor ON rc_actor = actor_id JOIN user ON actor_user = user_id JOIN user_groups ON ug_user = user_id WHERE ug_group = 'sysop';
{"runningtime": "2.62", "resultsets": [{"rowcount": 4, "headers": ["rc_patrolled", "count"]}, {"rowcount": 7, "headers": ["user", "unpatrolled"]}, {"rowcount": 31, "headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"]}, {"rowcount": 1, "headers": ["rc_namespace", "unpatrolled"]}, {"rowcount"...
enwiki
enwiki registered users per year
null
select count(*),substr(user_registration,1,4) as reg_y from user where user_registration IS NOT NULL GROUP BY reg_y;
{"runningtime": "11.99", "resultsets": [{"rowcount": 2122, "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_p
frwikisource total registered users
null
select count(*), "total" as reg_y from user;
{"runningtime": "7.59", "resultsets": [{"rowcount": 1802, "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"...
frwikisource_p
Reviewed uncategoried templates by Perohanych
null
select concat('{{tl|', p.page_title, '}}'), p_cl.page_title, fr.* from flaggedrevs fr join user on fr_user = user_id join page p on fr_page_id = p.page_id and p.page_namespace = 10 and p.page_is_redirect = 0 join revision_userindex on fr_rev_id = rev_id and rev_parent_id = 0 left join categorylinks on fr_page_id = cl_f...
{"runningtime": "19.25", "resultsets": [{"rowcount": 12915, "headers": ["type", "page_title"]}]}
ukwiki_p
Persons lacking English description
Instances of humans with country of citizenship and occupation properties, but no English description
# Draft — stil figuring this out! #SELECT CONCAT("Q",wbit_item_id), wbit_term_in_lang_id #FROM wbt_item_terms #LIMIT 10 SELECT CONCAT("Q", wbit_item_id) as id, wby_name as type, wbxl_language as language, wbx_text as text FROM wbt_item_terms LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id LEFT JO...
{"runningtime": "322.84", "resultsets": [{"rowcount": 6, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
wikidatawiki_p
scowiki mainspace non-redirs
null
select page_title from page where page_namespace = 0 and page_is_redirect = 0;
{"runningtime": "1.19", "resultsets": [{"headers": ["Title", "user", "comment"], "rowcount": 156}]}
scowiki_p
Most popular categories
Sites that has the most links.
USE dewiki_p; SELECT el_to, COUNT(DISTINCT el_from) AS num_pages FROM externallinks GROUP BY el_to ORDER BY num_pages 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 100;
{"runningtime": "0.31", "resultsets": [{"headers": ["page_title"], "rowcount": 13}]}
dewiki_p
Most edited articles on yuewiki
null
SELECT page_title, COUNT(page_id) AS edits FROM revision JOIN page ON rev_page = page_id WHERE page_is_redirect = 0 AND page_namespace = 0 GROUP BY page_id ORDER BY edits DESC LIMIT 40;
{"runningtime": "0.33", "resultsets": [{"headers": ["page_title"], "rowcount": 1}]}
dewiki_p
Leere Kategorien in Bayerischen Wiki
null
SELECT IF(page_is_redirect = 1, CONCAT('[{{fullurl:Kategorie:', REPLACE(page_title, '_', ' '), '}} ', REPLACE(page_title, '_', ' '), '] <small>(Redirect)</small>'), CONCAT('[[:Kategorie:', REPLACE(page_title, '_', ' '), ']]') ) AS Link FROM category, page WHERE page_title = cat_title ...
{"runningtime": "3.50", "resultsets": [{"headers": ["page_title", "linter_cat", "linter_params", "lint_count"], "rowcount": 1620}]}
barwiki_p
Leere Kategorien in Bayerischen Wiki
null
SELECT IF(page_is_redirect = 1, CONCAT('[{{fullurl:Kategorie:', REPLACE(page_title, '_', ' '), '}} ', REPLACE(page_title, '_', ' '), '] <small>(Redirect)</small>'), CONCAT('', REPLACE(page_title, '_', ' '), '') ) AS Link FROM category, page WHERE page_title = cat_title AND page_namesp...
{"runningtime": "1.84", "resultsets": [{"headers": ["page_title", "linter_cat", "linter_params", "lint_count"], "rowcount": 541}]}
mgwiktionary_p
UkrWLE 2021 Video Uploaders
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Video_Special_Nomination_for_WLE_20...
{"runningtime": "0.98", "resultsets": [{"rowcount": 31, "headers": ["DATE_FORMAT(log_timestamp,\"%Y-%m-%d\")", "count(*)"]}]}
commonswiki_p
Number of all photos by user
null
USE commonswiki_p; SELECT COUNT(rev_page) FROM revision_userindex JOIN page ON page.page_id = revision_userindex.rev_page JOIN actor ON actor.actor_id = revision_userindex.rev_actor WHERE actor_name ="Packa" AND rev_parent_id=0 /* nově založené, tj. nemělo minulou revizi */ AND page.page_namespace = ...
{"runningtime": "1.23", "resultsets": [{"rowcount": 1, "headers": ["months", "count(*)"]}]}
commonswiki_p
Articles per day
null
SELECT page.page_title AS Title, concat("https://ru.wikipedia.org/wiki/", page.page_title) as URL FROM page, revision WHERE revision.rev_timestamp > 20211031000000 AND -- > 31.10.2021 revision.rev_timestamp < 20211101000000 AND -- < 01.11.2021 page.page_namespace = 0 AND page.page_i...
{"runningtime": "21.19", "resultsets": [{"headers": ["user_name", "total", "weekdays", "dist_days"], "rowcount": 15}]}
ruwiki_p
Photoproject "Fotíme Česko" and number of photos uploaded in 2021 (b)
null
SELECT actor_name, count(rev_page) FROM revision_userindex JOIN page ON page_id = rev_page JOIN actor ON actor.actor_id = revision_userindex.rev_actor JOIN categorylinks ON cl_from = page_id WHERE rev_parent_id=0 /* nově založené, tj. nemělo minulou revizi */ AND page_namespace = 6 /* namespace 6 jsou ...
{"runningtime": "0.09", "resultsets": [{"rowcount": 0, "headers": ["user_name", "user_editcount", "ipb_expiry", "comment_text"]}]}
commonswiki_p
Photoproject "WMCZ Camera grant" and number of photos
null
SELECT actor_name, count(rev_page) FROM revision_userindex JOIN page ON page_id = rev_page JOIN actor ON actor.actor_id = revision_userindex.rev_actor JOIN categorylinks ON cl_from = page_id WHERE rev_parent_id=0 /* nově založené, tj. nemělo minulou revizi */ AND page_namespace = 6 /* namespace 6 jsou ...
{"runningtime": "0.08", "resultsets": [{"headers": ["user_name", "user_editcount", "ipb_expiry", "comment_text"], "rowcount": 0}]}
commonswiki_p
Number of photos by a user from this year
null
SELECT COUNT(rev_page) FROM revision_userindex JOIN page ON page.page_id = revision_userindex.rev_page JOIN actor ON actor.actor_id = revision_userindex.rev_actor WHERE rev_timestamp >= 20210101000000 AND rev_timestamp < 20211101000000 AND actor_name ="Packa" AND rev_parent_id=0 /* nově založené, ...
{"runningtime": "0.44", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]}
commonswiki_p
recent pages without a talk page
null
SELECT article.page_title FROM page article LEFT OUTER JOIN page talkpage ON article.page_title = talkpage.page_title AND article.page_namespace + 1 = talkpage.page_namespace WHERE talkpage.page_id IS NULL LIMIT 10
{"runningtime": "0.42", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]}
enwiki
Edit counter
null
SELECT user_editcount FROM user WHERE user_name = "Titodutta";
{"runningtime": "0.42", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]}
enwiki
Tewiki Date-wise pages published from Content translation
null
use ocwiki_p; select substr(rev_timestamp, 1, 8) as Datee, count(substr(rev_timestamp, 1, 8)) as Translated_articles from change_tag, change_tag_def, revision, page where ct_tag_id = ctd_id and rev_id = ct_rev_id and page_id = rev_page and page_namespace = 0 and page_is_redirect = 0 and ctd_name...
{"runningtime": "0.21", "resultsets": [{"rowcount": 13, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}, {"rowcount": 16, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}, {"rowcount": 10, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}]}
ocwiki_p
All revisions of a page
null
select * from logging where log_page = 4371158
{"runningtime": "1.97", "resultsets": [{"rowcount": 1000, "headers": ["rc_title", "num_edits"]}]}
fawiki_p
hewiki most prolific translators
null
use hawiki_p; SELECT rev_actor, actor_name, count(revision.rev_id) as articles_created FROM change_tag, actor, revision WHERE revision.rev_parent_id = 0 AND ct_tag_id = (select ctd_id from change_tag_def where ctd_name = 'contenttranslation') AND rev_id = ct_rev_id AND rev_actor = actor_id GROUP BY rev_acto...
{"runningtime": "0.09", "resultsets": [{"rowcount": 6, "headers": ["actor_name", "countt"]}]}
hawiki_p
enwiki Articles with lots of language links, but not Dutch
https://nl.wikipedia.org/wiki/Gebruiker:Valhallasw/interwiki_in_andere_taal
select REPLACE(page_title,'_',' ') AS page_title, cnt from (select ll_from, count(*) as cnt from langlinks group by ll_from having count(*)>20) as bigll left join langlinks as checkll on bigll.ll_from=checkll.ll_from and checkll.ll_lang='nl' left join page on bigll.ll_from=page_id where checkll.ll_lang IS NULL...
{"runningtime": "56.86", "resultsets": [{"rowcount": 32529, "headers": ["log_title", "COUNT(log_id)"]}]}
enwiki
w:en | potentially problematic cross-namespace redirects
null
SELECT * FROM redirect WHERE rd_namespace != 0; JOIN page ON redirect.rd_from = page.page_id AND page.page_namespace = 0;
{"runningtime": "1.70", "resultsets": [{"rowcount": 1, "headers": ["(\n SELECT COUNT(*) FROM logging\n WHERE log_type = \"patrol\"\n AND log_action = \"patrol\"\n AND log_namespace = 0\n AND log_timestamp BETWEEN 20201201000000 AND 20210101000000 \n AND log_params NOT LIKE '%\"5::previd\";s:1%' # Ignore new page ...
enwiki_p
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-tunisia
null
SELECT page_title, comment_text 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 ('AliciaFagervingWMSE-bot') AND ...
{"runningtime": "3.56", "resultsets": [{"rowcount": 25, "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", "ug_user", "ug_group", "ug_expiry"]}]}
commonswiki_p
Shortest plwiki articles that do not transclude {{przypisy}}
https://pl.wikipedia.org/w/index.php?title=Wikipedia:Zadania_dla_bot%C3%B3w&oldid=65121657#Najkr%C3%B3tsze_artyku%C5%82y_x2
select page_title, page_len from page left join templatelinks on tl_from = page_id and tl_from_namespace = 0 and tl_namespace = 10 and tl_title = "Przypisy" left join page_props on pp_page = page_id and pp_propname = "disambiguation" where page_namespace = 0 and ...
{"runningtime": "0.08", "resultsets": [{"rowcount": 1, "headers": ["COUNT(DISTINCT ug_user)"]}]}
plwiki_p
Test
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": "3.03", "resultsets": [{"rowcount": 1, "headers": ["(\n SELECT COUNT(*) FROM logging\n WHERE log_type = \"patrol\"\n AND log_action = \"patrol\"\n AND log_timestamp BETWEEN 20201201000000 AND 20210101000000 \n AND log_params NOT LIKE '%\"5::previd\";s:1%' # Ignore new page patrols\n AND log_params...
nlwiki_p
Example log type names
An example list of log types, linked from https://www.mediawiki.org/wiki/Manual:Logging_table#log_type
SELECT log_type FROM ( SELECT DISTINCT log_type FROM metawiki_p.logging ) logging ORDER BY log_type ASC ;
{"runningtime": "0.55", "resultsets": [{"rowcount": 10, "headers": ["page_title", "COUNT(DISTINCT sockcat.cl_from)"]}]}
metawiki_p
Euro2024 global locks/metawkik
null
SELECT * FROM logging INNER JOIN comment ON log_comment_id = comment_id WHERE log_type = 'globalauth' AND comment_text RLIKE 'Euro2024|Bule Cloud|Bule_Cloud' ORDER BY log_timestamp DESC;
{"runningtime": "31.23", "resultsets": [{"headers": ["page_title", "COUNT(DISTINCT sockcat.cl_from)"], "rowcount": 20190}]}
metawiki_p
Statistik: Seitenleerungen 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-blank') GROUP BY user ORDER BY cnt DESC LIMIT 2000;
{"runningtime": "1.22", "resultsets": [{"rowcount": 100, "headers": ["page_title", "substring_index(page_title, \"_\", -1)", "substring_index(page_title, \"_\", 1)", "ll_title"]}]}
dewiki_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;
{"connection_id": 32432554}
bnwiki
Find specific hashtag in edit summary
This query is intended to be used for tests.
select replace(concat(page_namespace, ":", page_title), "0:", "") as Page, actor_name as "User", concat("[[Special:Diff/", rev_id, "]]") as Diff from revision join comment on rev_comment_id = comment_id join actor on rev_actor = actor_id join page on rev_page = page_id where comment_text like "%#1Lib1Ref%" -- Change "#...
{"connection_id": 32440825}
fawiki_p
Euro2024 blocks enwiki
null
SELECT * FROM logging INNER JOIN comment ON log_comment_id = comment_id WHERE log_type = 'block' AND comment_text RLIKE 'Euro2024|Bule Cloud|Bule_Cloud' ORDER BY log_timestamp DESC;
{"runningtime": "0.36", "resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 4}]}
enwiki_p
Euro2024 blocks commonswiki
null
SELECT * FROM logging INNER JOIN comment ON log_comment_id = comment_id WHERE log_type = 'block' AND comment_text RLIKE 'Euro2024|Bule Cloud|Bule_Cloud' ORDER BY log_timestamp DESC;
{"runningtime": "1.08", "resultsets": [{"rowcount": 710, "headers": ["concat(\"Template:\",page_title)", "cl_timestamp"]}]}
commonswiki_p
ويكي داتا
null
USE arwiki_p; SELECT CONCAT('# [[:تصنيف:',cl_to,']]') AS cl_to, COUNT(*) AS count_cl_to FROM page, categorylinks WHERE page_id = cl_from #AND page_namespace = 0 AND cl_to LIKE '%مقالات_تستعمل%' AND NOT EXISTS (SELECT * FROM page AS p1 WHERE cl_to = p1.page_title AND p1.page_namespace = 14) GROUP BY cl_to ORDER BY coun...
{"runningtime": "0.53", "resultsets": [{"rowcount": 1, "headers": ["concat(\"Portal:\",page_title)"]}]}
arwiki
Pages lacking sources or talk pages
EB 1911 no footnotes
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 categorylinks.cl_to = "Wikipedia articles incorporating text from the 1911 Encyclopædia Britannica" AND categorylinks.cl_to = "All articles lacking in-text citatio...
{"runningtime": "0.36", "resultsets": [{"rowcount": 100, "headers": ["concat(\"Portal:\",page_title)"]}]}
enwiki_p
pipes in redirects.... maybe
null
SELECT * from redirect where rd_namespace=2 #and rd_interwiki like "%m%:";
{"runningtime": "0.08", "resultsets": [{"rowcount": 1, "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"]}]}
foundationwiki_p
foundationwiki redirected userpages
null
select page_title from page where page_namespace = 2 and page_is_redirect = 1; AND rd_title
{"runningtime": "0.08", "resultsets": [{"rowcount": 1, "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"]}]}
foundationwiki_p
A different GWToolset user
null
select * from logging where log_type = "gwtoolset" and log_actor <> 1026 order by log_timestamp desc limit 5;
{"runningtime": "39.20", "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"], "rowcount": 0}]}
commonswiki_p
zhwiki: log_search
null
SELECT * FROM log_search LIMIT 50
{"runningtime": "84.98", "resultsets": [{"rowcount": 74, "headers": ["page_title"]}]}
zhwiki_p
Getting page properties
null
select page_id, page_title, pp_propname, pp_value from page join page_props on page_id = pp_page where page_title = 'Шипайло' and page_namespace=0
{"runningtime": "0.12", "resultsets": [{"headers": ["Tables_in_centralauth_p"], "rowcount": 9}]}
ukwiki
abusive edit summary check
null
SELECT rev_id,rev_timestamp,comment_revision.comment_text FROM revision,comment_revision WHERE rev_timestamp>20210101000000 AND comment_text like "%https://en.wikipedia.org/wiki/American_and_British_English_spelling_differences#/media/File:Defence_Defense_Labour_Labor_British_American_spelling_by_country.svg%" ORDER BY...
{"runningtime": "0.41", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]}
enwiki_p
Multi-new user attracting articles in recent 2 days
null
select rc_title, group_concat(actor_name order by edits desc separator ' - ') from ( select concat('[[کاربر:', actor_name, ']]') as actor_name, concat('[[', rc_title, ']]') as rc_title, count(*) as edits from recentchanges_userindex join actor on actor_id = rc_actor join user on actor_us...
{"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
fawiki_p
abusive edit summaries, take two
null
SELECT page_title,rev_timestamp,comment_text FROM revision,page JOIN `comment` ON comment_id = comment.comment_id AND comment_text like "%https://en.wikipedia.org/wiki/American_and_British_English_spelling_differences#/media/File:Defence_Defense_Labour_Labor_British_American_spelling_by_country.svg%" WHERE rev_id>10000...
{"runningtime": "2.80", "resultsets": [{"rowcount": 0, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
enwiki_p
abusive edit summaries
null
SELECT page_title,rev_timestamp,comment_text FROM revision,page JOIN `comment` ON comment_id = comment.comment_id AND comment_text like "China uses US spelling%"
{"runningtime": "1.38", "resultsets": [{"rowcount": 0, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
enwiki_p
abusive edit summaries, take 3
null
SELECT page_title,rev_timestamp,comment_text FROM revision,page JOIN `comment` ON comment_id = comment.comment_id AND comment_text like "China uses US spelling%" WHERE rev_id>1000000000
{"runningtime": "16.53", "resultsets": [{"rowcount": 47, "headers": ["Page", "History URL"]}]}
enwiki_p
Indonesian Wikidata Edits
null
select CONCAT(substr(rc_timestamp,1,4),"-",substr(rc_timestamp,5,2), "-",substr(rc_timestamp,7,2)," ",mod(substr(rc_timestamp,9,2)+7,24),":",substr(rc_timestamp,11,2)) as 'Time', actor_name, rc_title, /*rc_new_len - rc_old_len as 'diff',*/ rc_source from recentchanges_userindex left join actor on rc_actor = actor_id ...
{"runningtime": "3.42", "resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 210}]}
idwiki
edit summaries containing "uses US spelling" in 2021
Example search for a partial edit summary, limited by timestamp. For [[WP:RAQ#Searching for edit summary text over the revision table]] circa 7 November 2021.
SELECT actor_name, page_namespace, page_title, rev_timestamp, comment_text FROM revision JOIN page ON page_id = rev_page JOIN comment_revision ON comment_id = rev_comment_id JOIN actor_revision ON actor_id = rev_actor WHERE comment_text LIKE '%uses US spelling%' AND rev_timestamp >= '2021';
{"runningtime": "396.30", "resultsets": [{"rowcount": 22, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
enwiki_p
Query to get Top 10 Most thanked in enwiki_p
This query is to get Top 10 Most thanked in enwiki_p for Google Code-In.
use enwiki_p; select log_user_text, COUNT(log_user_text) from logging where log_type='thanks' GROUP by log_user_text ORDER by COUNT(log_user_text) DESC limit 10
{"runningtime": "0.08", "resultsets": [{"headers": ["start"], "rowcount": 10}]}
enwiki
To find "%.sp" categories at Commons
null
SELECT CONCAT ("Category:",page_title,"") #LEFT JOIN page as page ON page_id=cat_id FROM page AS page WHERE page_namespace =14 AND page_len >0 AND page_is_redirect = 0 AND page_title LIKE "%Local_Cuisine%" #cat_title LIKE '%by_quantity%' #AND cat_title NOT LIKE "Images_from_the_Geograph_British_Isles_project_needin...
{"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["SUBSTRING(beg, LOCATE('https', beg), 10)"]}]}
commonswiki_p
asnblock global test query
null
SELECT gb_expiry FROM globalblocks WHERE gb_range_start LIKE "0815%" AND gb_range_start <= "08150800" AND gb_range_end >= "08150BFF"
{"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["SUBSTRING(beg, LOCATE('//', beg)+2, LOCATE('/', beg, 8))"]}]}
centralauth_p
Biggest AfD log pages
null
SELECT page_title, page_len, page_namespace FROM page WHERE page_namespace='4' AND page_title LIKE 'Articles_for_deletion/Log/%' ORDER BY page_len ASC LIMIT 1000;
{"runningtime": "0.09", "resultsets": [{"headers": ["beg", "SUBSTRING(beg, LOCATE('//', beg)+2, LOCATE('./', beg)-LOCATE('//', beg))", "LOCATE('./', beg)"], "rowcount": 10}]}
enwiki_p
shortest rfas
null
SELECT page_title, page_len, page_namespace FROM page WHERE page_namespace='4' AND page_title LIKE 'Requests_for_adminship/%' ORDER BY page_len ASC LIMIT 1000;
{"runningtime": "153.44", "resultsets": [{"headers": ["beg", "COUNT(1)"], "rowcount": 10}]}
enwiki_p
abusive edit summaries, take 4
null
SELECT page_title,rev_timestamp,actor_name,comment_text FROM revision JOIN page ON page_id = rev_page JOIN actor ON actor_id = rev_actor JOIN `comment` ON comment_id = rev_comment_id AND comment_text like "%File:Defence_Defense%" WHERE rev_id > 1010000000 & rev_id < 1020000000
{"runningtime": "8.62", "resultsets": [{"rowcount": 80, "headers": ["declined_then_deleted", "actor_name"]}]}
enwiki_p
Getting page properties
null
select page_id, page_title, pp_propname, pp_value from page join page_props on page_id = pp_page where page_title = 'Шипайло' and page_namespace=0
{"runningtime": "26.69", "resultsets": [{"rowcount": 1, "headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}]}
ukwiki
edit summaries containing "Defence_Defense" in 2021
Example search for a partial edit summary, limited by timestamp. For [[WP:RAQ#Searching for edit summary text over the revision table]] circa 7 November 2021.
SELECT actor_name, page_namespace, page_title, rev_timestamp, comment_text FROM revision JOIN page ON page_id = rev_page JOIN comment_revision ON comment_id = rev_comment_id JOIN actor_revision ON actor_id = rev_actor WHERE comment_text LIKE '%Defence_Defense%' AND rev_id >= 950000000 AND rev_id <= 980000000;
{"runningtime": "407.67", "resultsets": [{"rowcount": 52, "headers": ["File name", "Date", "Size", "Uploader's name"]}]}
enwiki_p
most recent edit for given cohort
null
SELECT actor_name, DATE(MAX(rev_timestamp)) AS last_edit_date FROM revision_userindex JOIN actor_revision ON actor_id=rev_actor WHERE actor_name IN ( 'VasilijKov', 'Palmar1', 'Hyláková', 'Libor Bednarik', 'Kate Sou', 'Jaroslava Syrovátková', 'Zaječice', 'J.Broukal', 'Míla srch', 'Evaferda', 'Květa Slavětínská', '...
{"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
cswiki_p
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৮ জানু ২০২০
SELECT CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম, COUNT(rev_id) AS মোট_নিবন্ধ FROM actor INNER JOIN revision ON revision.rev_actor = actor.actor_id JOIN page ON page.page_id = revision.rev_page WHERE page_is_redirect = 0 AND rev_parent_id = 0 AND page_namespace = 0 AND rev_timestamp <= ...
{"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["log_title"]}]}
bnwikitionary
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৮ জানু ২০২০
SELECT CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম, COUNT(rev_id) AS মোট_নিবন্ধ FROM actor INNER JOIN revision ON revision.rev_actor = actor.actor_id JOIN page ON page.page_id = revision.rev_page WHERE page_is_redirect = 0 AND rev_parent_id = 0 AND page_namespace = 0 AND rev_timestamp <= ...
{"runningtime": "28.84", "resultsets": [{"rowcount": 0, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
bnwikitionary
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৮ জানু ২০২০
SELECT CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম, COUNT(rev_id) AS মোট_নিবন্ধ FROM actor INNER JOIN revision ON revision.rev_actor = actor.actor_id JOIN page ON page.page_id = revision.rev_page WHERE page_is_redirect = 0 AND rev_parent_id = 0 AND page_namespace = 0 AND rev_timestamp <= ...
{"runningtime": "0.03", "resultsets": []}
bnwikitionary
মোট সম্পাদনার সংখ্যা
১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন।
USE bnwiki_p; SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)" ORDER BY user_editcount DESC...
{"runningtime": "1.03", "resultsets": [{"rowcount": 500, "headers": ["namespace", "protected_page", "occurrences", "latest_occurence"]}]}
bnwikitionary
মোট সম্পাদনার সংখ্যা
১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন।
USE bnwiki_p; SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)" ORDER BY user_editcount DESC...
{"runningtime": "1.00", "resultsets": [{"headers": ["namespace", "protected_page", "occurrences", "latest_occurence"], "rowcount": 500}]}
bnwikitionary
মোট সম্পাদনার সংখ্যা
null
SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)" ORDER BY user_editcount DESC LIMIT 1000;
{"runningtime": "0.87", "resultsets": [{"rowcount": 500, "headers": ["id", "blocked"]}]}
bnwiktionary
R4 speedies
Deletions of pages in any namespace containing "R4" (as a distinct word) in the log comment. Just for fun.
SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp, log_title AS pagename, comment_text FROM logging JOIN comment_logging ON comment_id = log_comment_id WHERE log_type = 'delete' AND log_action = 'delete' AND comment_text RLIKE '\\bR4\\b' ORDER BY log_id DESC LIMIT 1000;
{"runningtime": "0.09", "resultsets": [{"rowcount": 4, "headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]}
enwiki
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-greece
null
SELECT page_title, comment_text 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 ('AliciaFagervingWMSE-bot') AND ...
{"runningtime": "0.42", "resultsets": [{"rowcount": 30, "headers": ["actor_name", "countt"]}]}
commonswiki_p
Wie oft hat ein Benutzer eine Seite in einem Zeitraum geändert
null
SELECT COUNT(*) FROM page, revision_userindex, actor WHERE page_title = 'Fragen_zur_Wikipedia' # Leerzeichen im Lemma durch Unterstrich ersetzen AND page_namespace = 4 # Siehe https://de.wikipedia.org/wiki/Hilfe:Namensräume AND rev_page = page_id AND rev_timestamp BETWEEN '20210101000000' AND '2022010100000...
{"runningtime": "0.47", "resultsets": [{"rowcount": 2, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}]}
dewiki_p
تأسست في
null
use arwiki_p; select CONCAT('* [[:تصنيف:',page_title, ']]>') AS cat1 , REPLACE(CONCAT('[[:تصنيف:', page_title, ']]'), 'تأسست_في' , 'أسست_في' ) as cat2 from page where page_namespace=14 and page_is_redirect=0 and (page_title like "%تأسست_في%") and page_title not like "%/%"
{"runningtime": "24.57", "resultsets": [{"headers": ["cl_to", "ns_count", "namespaces"], "rowcount": 16}]}
arwiki
أسست في
null
use arwiki_p; select CONCAT('* [[:تصنيف:',page_title, ']]>') AS cat1 , REPLACE(CONCAT('[[:تصنيف:', page_title, ']]'), 'أسست_في' , 'تأسست_في_' ) as cat2 from page where page_namespace=14 and page_is_redirect=0 and (page_title like "%أسست_في_%") and page_title not like "%/%"
{"runningtime": "4.52", "resultsets": [{"rowcount": 17, "headers": ["actor_name", "countt"]}]}
arwiki
{{Heavily used template}} links from templates and doc pages
context: https://w.wiki/4NCA (permalink: https://w.wiki/4NCB)
SELECT SUM(page_title LIKE '%/doc') AS links_from_doc_pages, SUM(page_title NOT LIKE '%/%') AS links_not_from_doc_pages FROM templatelinks JOIN page ON tl_from = page_id WHERE tl_from_namespace = 10 AND tl_namespace = 10 AND tl_title = 'Heavily_used_template';
{"runningtime": "10.47", "resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 3}]}
commonswiki_p
largest arbcom cases
null
SELECT page_id, page_title, page_len FROM page WHERE page_namespace='4' AND page_title LIKE 'Arbitration/Requests/Case%' AND page_title NOT LIKE 'Arbitration/Requests/Case/%/%' ORDER BY page_len DESC LIMIT 1000;
{"runningtime": "2.32", "resultsets": [{"rowcount": 142, "headers": ["user", "cnt"]}]}
enwiki_p
Largest templates.
null
SELECT page_id, page_len, page_title FROM page WHERE page_namespace='10' AND page_title NOT LIKE '%json' AND page_title NOT LIKE 'Attached_KML%' AND page_title NOT LIKE '%/core%' AND page_title NOT LIKE '%sandbox' AND page_title NOT LIKE '%testcases' AND page_title NOT LIKE '%/data/%' ORDER BY page_len DESC LIMIT 1000...
{"runningtime": "13.01", "resultsets": [{"rowcount": 4, "headers": ["actor_name", "rc_this_oldid", "comment_text"]}]}
enwiki_p
AFCSW talk edits
null
SELECT rc_title FROM recentchanges_userindex JOIN comment_recentchanges ON rc_comment_id = comment_id WHERE rc_namespace = 119 AND comment_text LIKE '%[[WP:AFCSW|AfC-submit-wizard]]' ORDER BY rc_title
{"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["rev_id", "rev_page", "actor_name"]}]}
enwiki
P2 speedies
Deletions of pages in any namespace containing "P2" (as a distinct word) in the log comment. Just for fun.
SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp, log_title AS pagename, comment_text FROM logging JOIN comment_logging ON comment_id = log_comment_id WHERE log_type = 'delete' AND log_action = 'delete' AND comment_text RLIKE '\\bP2\\b' ORDER BY log_id DESC LIMIT 1000;
{"runningtime": "5.60", "resultsets": [{"rowcount": 3450, "headers": ["page_title"]}]}
enwiki
Number of expired blocks
null
select now() + 0, count(*) as n from ipblocks where ipb_expiry != 'infinity' and ( ipb_expiry < now() + 0 ) ;
{"runningtime": "12.96", "resultsets": [{"headers": ["page_id", "page_title", "page_latest", "tl_title"], "rowcount": 8233}]}
enwiki_p
Ontbrekende Interwiki in en:
https://nl.wikipedia.org/wiki/Wikipedia:Ontbrekende_Interwiki_in_en:
SELECT CONCAT('en:', page_title) AS `title`, cnt AS `count` FROM ( SELECT ll_from, count(*) AS cnt FROM langlinks GROUP BY ll_from HAVING count(*)>20) AS bigll LEFT JOIN langlinks AS checkll ON bigll.ll_from=checkll.ll_from AND checkll.ll_lang='nl' LEFT JOIN page ON bigll.ll_from=page_id ...
{"runningtime": "0.38", "resultsets": [{"rowcount": 162, "headers": ["el_to", "count(*)"]}]}
enwiki_p
enwiki College/University redirects
null
SELECT page_title, rd_title FROM page RIGHT JOIN redirect ON page_id = rd_from WHERE page_namespace = 0 AND page_is_redirect = 1 AND page_title RLIKE "(College|University)$" AND rd_title RLIKE "(College|University)$" AND ((REPLACE(page_title, "_College", "_University") = rd_title) OR (REPLACE(page_t...
{"runningtime": "0.38", "resultsets": [{"rowcount": 200, "headers": ["rev_id", "rev_page", "actor_name"]}]}
enwiki_p
Count fixes in Wikipedia:Correct typos in one click
null
SELECT comment_text, rev_timestamp 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 rev_timesta...
{"runningtime": "1843.24", "resultsets": [{"rowcount": 156, "headers": ["tl_title"]}]}
enwiki_p
Number of IP blocks and range blocks
null
select sum(1) as n, sum(if(ipb_address != '' and ipb_range_start = ipb_range_end, 1, 0)) as n_with_address, sum(if(ipb_address != '' and ipb_range_start != ipb_range_end, 1, 0)) as n_with_address_and_range_block from ipblocks ;
{"runningtime": "0.10", "resultsets": [{"rowcount": 7, "headers": ["actor_name", "countt"]}]}
enwiki_p
New Wikidata items created by user
null
USE wikidatawiki_p; SELECT page_title FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_id IN (SELECT rev_page FROM revision WHERE rev_parent_id = 0 AND rev_actor = (SELECT actor_id ...
{"runningtime": "7.65", "resultsets": [{"rowcount": 4746, "headers": ["file", "actor_name"]}]}
wikidatawiki_p