title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Pages in Category: edited only by a specific user
null
USE srwiktionary_p; SELECT CONCAT(CASE page_namespace WHEN 0 THEN '' WHEN 1 THEN 'Talk:' WHEN 2 THEN 'User:' WHEN 10 THEN 'Template:' WHEN 4 THEN 'Project:' ELSE CONCAT('{{ns:', page_namespace, '}}:') END, ...
{"runningtime": "92.07", "resultsets": [{"rowcount": 1, "headers": ["count(distinct il_to)"]}]}
null
enwiki-trwiki category populator
null
USE trwiki_p; SELECT en_page.page_title en_title, tr_page.page_title tr_title FROM enwiki_p.page en_page INNER JOIN wikidatawiki_p.wb_items_per_site wdata3 ON wdata3.ips_site_id = 'trwiki' AND wdata3.ips_site_page = 'Kategori:1984 Yaz Olimpiyatları basketbolcuları' INNER JOIN wikidatawiki_p.wb_items_per_site wd...
{"runningtime": "0.44", "resultsets": [{"rowcount": 5, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 3, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]}
null
قائمة المستخدمين الأكثر مراجعةً للتعديلات في يوم ويكيبيديا العربية السادس عشر
null
USE arwiki_p; select CONCAT('[[مستخدم:',user_name,'|',user_name,']]'), COUNT(*) from logging inner join user on user.user_id = logging.log_user where log_timestamp BETWEEN 20180714000000 AND 20180715000000 and log_action = "approve" and log_namespace = 0 group by logging.log_user having COUNT(*)>1 ORDER BY COUNT(*) DES...
{"runningtime": "4.00", "resultsets": [{"rowcount": 16, "headers": ["User", "User Group"]}]}
null
قائمة المستخدمين الأكثر مراجعةً للمقالات في يوم ويكيبيديا العربية السادس عشر
null
use arwiki_p; select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*) from logging INNER JOIN actor ON logging.log_actor = actor.actor_id LEFT JOIN page ON log_title = page_title where log_timestamp between 20190713000000 and 20190714000000 and log_action = "approve-i" and log_namespace = 0 and page_is_redi...
{"connection_id": 2629376}
null
enwiki-trwiki category populator
null
USE trwiki_p; SELECT en_page.page_title en_title, tr_page.page_title tr_title FROM enwiki_p.page en_page INNER JOIN wikidatawiki_p.wb_items_per_site wdata3 ON wdata3.ips_site_id = 'trwiki' AND wdata3.ips_site_page = 'Kategori:Kurgusal olmayan kitaplar' INNER JOIN wikidatawiki_p.wb_items_per_site wdata4 ON wdat...
{"connection_id": 3897971}
null
Przekierowanie z przestrzeni głównej do przestrzeni dyskusja (plwiki)
https://pl.wikipedia.org/w/index.php?title=Wikipedia:Kawiarenka/Kwestie_techniczne&diff=60381946&oldid=60378708
use plwiki_p; select page_title from page inner join redirect on page_id = rd_from where page_namespace = 0 and rd_namespace = 1;
{"runningtime": "17.75", "resultsets": [{"rowcount": 2524, "headers": ["page_title", "page_len"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"connection_id": 4820265}
null
قائمة المستخدمين الأكثر مراجعةً للمقالات في يوم ويكيبيديا العربية السادس عشر
null
use arwiki_p; select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*) from logging INNER JOIN actor ON logging.log_actor = actor.actor_id LEFT JOIN page ON log_title = page_title where log_timestamp between 20200711000000 and 20200712000000 and log_action = "approve-i" and log_namespace = 0 and page_is_redi...
{"runningtime": "215.86", "resultsets": [{"rowcount": 17, "headers": ["USU\u00c1RIOS", "ANO_REG"]}]}
null
قائمة المستخدمين الأكثر مراجعةً للتعديلات في يوم ويكيبيديا العربية السادس عشر
null
USE arwiki_p; select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*) from logging INNER JOIN actor ON logging.log_actor = actor.actor_id where log_timestamp BETWEEN 20200711000000 AND 20200712000000 and log_action = "approve" and log_namespace = 0 group by actor_name having COUNT(*)>1 ORDER BY COUNT(*) DES...
{"runningtime": "2.92", "resultsets": [{"rowcount": 16, "headers": ["USU\u00c1RIOS", "ANO_REG"]}]}
null
Oberflächenadmin-Aktionen
Letzte Aktion der Oberflächenadmins
USE dewiki_p; SELECT user_name, (SELECT COUNT(maxR.rev_id) FROM revision_userindex AS maxR, page AS maxP WHERE (maxP.page_content_model IN ('css', 'javascript') AND (maxP.page_title NOT LIKE CONCAT(REPLACE(user_name, ' ', '_'), '/%') ...
{"runningtime": "160.44", "resultsets": [{"rowcount": 96, "headers": ["actor_name", "count(rev_actor)"]}]}
null
Oberflächenadmin-Aktionen
Letzte Aktion der Oberflächenadmins
USE dewiki_p; SELECT user_name, (SELECT COUNT(maxR.rev_id) FROM revision_userindex AS maxR, page AS maxP WHERE (maxP.page_content_model = 'javascript' AND (maxP.page_title NOT LIKE CONCAT(REPLACE(user_name, ' ', '_'), '/%') ...
{"runningtime": "1551.59", "resultsets": [{"rowcount": 78, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}]}
null
قائمة المستخدمين الأكثر إنشاءً للمقالات في يوم ويكيبيديا العربية الخامس عشر
قائمة المستخدمين الأكثر إنشاءً للمقالات في يوم ويكيبيديا العربية الثالث عشر.
use arwiki_p; SELECT concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", COUNT(*) AS "عدد المقالات" FROM revision r INNER JOIN actor ON r.rev_actor = actor.actor_id INNER JOIN page p on r.rev_page = p.page_id WHERE p.page_namespace =0 and p.page_is_redirect =0 and r.rev_timestamp between 20200711000000 an...
{"connection_id": 5152716}
null
قائمة المستخدمين الأكثر مراجعةً للتعديلات في يوم ويكيبيديا العربية السادس عشر
null
USE arwiki_p; select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*) from logging INNER JOIN actor ON logging.log_actor = actor.actor_id where log_timestamp BETWEEN 20200711000000 AND 20200712000000 and log_action = "approve" and log_namespace = 0 group by actor_name having COUNT(*)>1 ORDER BY COUNT(*) DES...
{"connection_id": 5152844}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "3.21", "resultsets": [{"rowcount": 10, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "p...
null
Titles with colon followed by a number
null
SHOW TABLES FROM metawiki_p;
{"runningtime": "1391.39", "resultsets": [{"rowcount": 100, "headers": ["page_title", "el_to"]}]}
null
Archive DLI book links from proper page 0 ns
Get archive book links from page 0 ns
USE tewiki_p; SELECT el_id,el_from,el_to,CONCAT("[[",page_title,"]]") as page_title_link FROM externallinks JOIN page ON page_id = el_from WHERE (page_namespace=0) AND (el_to LIKE '%archive.org/details/in.ernet.dli.%' );
{"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["Title", "user", "comment"]}]}
null
5th Parliament Wikipedia Edit Count in Time Frame
This query was used to determine participants with the highest Wikipedia edit count in the 5th Parliament of Ghana Challenge that run from 1 July 2020 UTC to 12 July 2020 UTC. See: http://bit.ly/GOIF_3rd_Contest
select actor_name, count(*) as edits from enwiki_p.revision_userindex r join enwiki_p.actor a on r.rev_actor = a.actor_id join enwiki_p.page p on r.rev_page = p.page_id where actor_name in ( "Masssly", "Shahadusadik", "Celestinesucess", "Nana yaa series", "Sunkanmi12", "Oladipupo193", "Kinvidia", "Malak10", "Abdul2274"...
{"connection_id": 7901287}
null
5th Parliament Wikidata Edit Count in Time Frame
This query was used to determine participants with the highest Wikidata edit count in the 5th Parliament of Ghana Challenge that run from 1 July 2020 UTC to 12 July 2020 UTC. See: http://bit.ly/GOIF_3rd_Contest
select actor_name, count(*) as edits from wikidatawiki_p.revision_userindex r join wikidatawiki_p.actor a on r.rev_actor = a.actor_id join wikidatawiki_p.page p on r.rev_page = p.page_id where actor_name in ( "Masssly", "Shahadusadik", "Celestinesucess", "Nana yaa series", "Sunkanmi12", "Oladipupo193", "Kinvidia", "Mal...
{"runningtime": "994.84", "resultsets": [{"rowcount": 315522, "headers": ["file"]}]}
null
nlwiki brokenimages
null
USE nlwiki_p; SELECT page_namespace, page_title, il_to FROM imagelinks JOIN page on page_id = il_from WHERE # Not an image on the local wiki... NOT EXISTS (SELECT * FROM image WHERE img_name = il_to) # Not an image on commons... AND NOT EXISTS (SELECT * FROM commonswiki_p.image WHERE img_name = il_to) # Not a re...
{"runningtime": "9.86", "resultsets": [{"rowcount": 2, "headers": ["page_title"]}]}
null
nlwiki brokenimages with wikilinks
null
USE nlwiki_p; SELECT CONCAT('[[{{ns:', page_namespace, '}}:', page_title, ']]') as `from`, CONCAT('[[:file:', il_to, ']]') as `to` FROM imagelinks JOIN page on page_id = il_from WHERE # Not an image on the local wiki... NOT EXISTS (SELECT * FROM image WHERE img_name = il_to) # Not an image on commons... AND NOT ...
{"runningtime": "398.30", "resultsets": [{"rowcount": 100, "headers": ["page_title"]}]}
null
Ավազարկղից հիմնական տեղափոխություններ
null
USE hywiki_p; SELECT log_title, page_title, actor_name, log_timestamp FROM logging JOIN comment ON log_comment_id = comment_id JOIN actor ON log_actor = actor_id JOIN page ON page_id = log_page WHERE log_type = 'move' AND log_namespace ...
{"connection_id": 9189578}
null
all revisions hebrew12
null
USE hewiki_p; SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title #pagelinks.pl_title # revision.rev_minor_edit, revision.rev_deleted, # page.page_namespace, FROM revision JOIN page ON revision.rev_page=page.page_id #RIGHT JOIN pagelinks ON revision.rev_page=p...
{"runningtime": "14.89", "resultsets": [{"rowcount": 1, "headers": ["ss_total_edits"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}, {"rowcount": 808, "headers": ["userid", "name", "editcount", "admin", "bot"]}]}
null
zhwiki redirects to disambiguation pages
null
USE zhwiki_p; SELECT REPLACE(CONCAT("[[",page_title,"]]"), "_", " ") Title FROM page WHERE page_title like "%消歧[義义]%" AND page_namespace = 0 AND page_is_redirect = 1 LIMIT 5000
{"runningtime": "21.94", "resultsets": [{"rowcount": 25, "headers": ["page_namespace", "page_title"]}]}
null
Rose cultivars in Category:Roses at Roseraie de Bagatelle
This query makes the assumption that any category starting with "Rosa_'" is a rose cultivar category. This is true at the moment, but could concievably become false. Also, if any cultivars don't use this scheme, it will fail. Some of the results are also Wikimedia category QIDs rather than rose cultivar QIDs directly;...
use commonswiki_p; SELECT DISTINCT categorylinks.cl_to, page_props.pp_value FROM categorylinks INNER JOIN page ON categorylinks.cl_to = page.page_title INNER JOIN page_props ON page_props.pp_page = page.page_id WHERE categorylinks.cl_from IN ( SELECT page.page_id FROM categorylinks INNER JOIN page ON categorylink...
{"runningtime": "720.45", "resultsets": [{"rowcount": 731, "headers": ["rev_actor", "actor_name", "user_editcount", "user_registration", "Last edit", "edit_count", "gender"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"connection_id": 11000990}
null
2017 հունիսի 21-ից հետո ստեղծված անաղբյուր հոդվածներ
null
use hywiki_p; select page_title, page_len, rev_timestamp from page join revision on page_id = rev_page join categorylinks on cl_from = page_id where rev_parent_id = 0 and page_namespace = 0 and page_is_redirect = 0 and rev_timestamp > 20170621000000 and cl_to = 'Անաղբյուր_և_լրացուցիչ_աղբյուրների_կարիք_ունեցող_հոդ...
{"runningtime": "2.12", "resultsets": [{"rowcount": 1, "headers": ["AVG(page_len)"]}]}
null
jawiktから名詞を抽出するサンプル
null
use jawiktionary_p; /* SELECT GROUP_CONCAT(cl_to) FROM categorylinks cl, page p WHERE cl.cl_from = p.page_id AND p.page_id = 12345 GROUP by cl.cl_from ; */ SELECT p.page_title FROM categorylinks cl, page p WHERE TRUE AND p.page_namespace = 0 AND p.page_is_redirect = 0 AND cl.cl_from = p.page_id AND ( SELECT GROUP_CO...
{"runningtime": "0.30", "resultsets": [{"rowcount": 7, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]}
null
Run tributaries
Titles probably needing " tributary" before close paren
select page_title from page where page_namespace=0 and page_is_redirect=0 and (page_title like '%Run_(%') and ((page_title like '%Creek)') or (page_title like '%River)'))
{"runningtime": "14.18", "resultsets": [{"rowcount": 19, "headers": ["page_namespace", "page_title"]}]}
null
ja: colors
null
use jawiktionary_p; SELECT p.page_title FROM categorylinks cl, page p WHERE TRUE AND p.page_namespace = 0 AND p.page_is_redirect = 0 AND cl.cl_from = p.page_id AND cl.cl_to = "日本語_色名" ORDER BY page_random LIMIT 1000; use jawiki_p; SELECT p.page_title FROM categorylinks cl, page p WHERE TRUE AND p.page_namespace = 0 ...
{"runningtime": "5.36", "resultsets": [{"rowcount": 89, "headers": ["ips_item_id", "ips_site_page"]}]}
null
wikidata: interface-admin activity
Letzte Aktion der Oberflächenadmins
USE wikidatawiki_p; SELECT user_name, ( SELECT COUNT(maxR.rev_id) FROM revision_userindex AS maxR, page AS maxP WHERE ( maxP.page_content_model IN ('css', 'javascript') AND ( maxP.page_title NOT LIKE CONCAT(REPLACE(user_na...
{"connection_id": 13869387}
null
Images in certain category by the time of their upload
null
SELECT I.img_name, A.actor_name, I.img_timestamp 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 = "Images_from_Wiki_Loves_Ea...
{"connection_id": 13891460}
null
HebrewPageRevisionsDetailsByPageTitleAndTimeRange
Investigate the revisions of a page by it's title. returns relevant details of a page revisions, by page title. including revisers' usernames, revision comment, and text?
USE hewiki_p; SELECT revision.rev_id, revision.rev_parent_id, actor.actor_name, comment.comment_text, revision.rev_timestamp, slots.slot_content_id, content.content_address # , revision.rev_actor FROM revision JOIN page ON revision.rev_page=page.page_id JOIN actor ON revision.rev_actor=actor.actor_id JOIN comme...
{"runningtime": "1327.38", "resultsets": [{"rowcount": 12, "headers": ["page_title", "pl_title", "page_latest"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "13.02", "resultsets": [{"rowcount": 7, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]}
null
Templates on huwiki without or with only 1 interwiki link
null
USE huwiki_p; SELECT page_title FROM page LEFT JOIN langlinks ON ll_from = page_id WHERE page_namespace = 10 AND ll_from IS NULL AND page_title NOT LIKE '%/doc';
{"connection_id": 18332923}
null
wikidata: deleted items that were created by User:Infovarius
null
USE wikidatawiki_p; SELECT archive.ar_title AS item, archive.ar_timestamp AS item_creation_timestamp FROM archive JOIN actor_archive ON archive.ar_actor=actor_archive.actor_id WHERE archive.ar_namespace=0 AND archive.ar_parent_id=0 AND actor_archive.actor_name='Infovarius' ORDER BY archive.ar_timestam...
{"runningtime": "1.43", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]}
null
Bearcat protections I
null
USE enwiki_p; SELECT * FROM logging INNER JOIN page ON log_page = page_id #INNER JOIN page_restrictions on pr_page = page_id WHERE log_timestamp >= '20180101010101' AND log_actor = 273 AND # User:Bearcat log_type = 'protect' AND log_params LIKE '%/[edit=sysop/]%' escape '/' # page_len >= 100 AND # log...
{"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["Table", "Non_unique", "Key_name", "Seq_in_index", "Column_name", "Collation", "Cardinality", "Sub_part", "Packed", "Null", "Index_type", "Comment", "Index_comment"]}]}
null
Bearcat protections II
null
USE enwiki_p; SELECT * FROM logging_userindex WHERE log_timestamp >= '20180101010101' AND # 2018 or later log_actor = 273 AND # User:Bearcat log_type = 'protect' AND log_params LIKE '%/[edit=sysop/]%' escape '/';
{"runningtime": "0.10", "resultsets": [{"rowcount": 1, "headers": ["lag"]}]}
null
All_articles_with_unsourced_statements
null
SELECT page_title, page_id FROM page INNER JOIN categorylinks ON cl_from = page.page_id AND categorylinks.cl_to = "All_articles_needing_additional_references" WHERE page.page_namespace = 0
{"runningtime": "0.16", "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"]}]}
null
Statistics of editing MediaWiki JS/CSS in ruwiki per month
null
USE ruwiki_p; SELECT FLOOR(rev_timestamp / 100000000) as edit_month, count(*) as edit_count FROM revision JOIN page ON page_id = rev_page WHERE rev_timestamp >= "20150101" AND page_namespace = 8 AND (page_title LIKE '%.css' OR page_title LIKE '%.js') GROUP BY edit_month ORDER BY edit_month DESC...
{"runningtime": "49.61", "resultsets": [{"rowcount": 11894, "headers": ["page_title", "GROUP_CONCAT(cl_to)"]}]}
null
Statistics of editing MediaWiki JS/CSS in ruwiki (users)
null
USE ruwiki_p; SELECT actor_name, COUNT(actor_name), page_title, -- и где, rev_timestamp -- и когда, -- если много - отображается случайная FROM revision JOIN page ON page_id = rev_page JOIN actor ON rev_actor = actor_id WHERE rev_timestamp >= "20190701" AND page_namespace = 8 AND (page_tit...
{"runningtime": "0.10", "resultsets": [{"rowcount": 10, "headers": ["page_title", "page_namespace"]}]}
null
Statistics of editing MediaWiki JS/CSS in ruwiki (users)
null
USE ruwiki_p; SELECT actor_name, COUNT(actor_name), page_title, -- и где, rev_timestamp -- и когда, -- если много - отображается случайная FROM revision JOIN page ON page_id = rev_page JOIN actor ON rev_actor = actor_id WHERE rev_timestamp >= "20190701" AND page_namespace = 8 AND (page_tit...
{"runningtime": "0.13", "resultsets": [{"rowcount": 6, "headers": ["page_title", "page_namespace"]}]}
null
Template count in enwiki
null
use mlwiki_p; select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"runningtime": "7.72", "resultsets": [{"rowcount": 96, "headers": ["Title", "user", "comment"]}]}
null
HebrewPagesRevisionsInTimeRange
Returns all non-redirect pages revisions in Hebrew wikipedia within a time range.
USE hewiki_p; SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title, revision.rev_minor_edit, revision.rev_deleted FROM revision JOIN page ON revision.rev_page=page.page_id WHERE ( page.page_namespace = 0 # main / articles #AND revision.rev_minor_edit = 0 # o...
{"runningtime": "4.10", "resultsets": [{"rowcount": 0, "headers": ["Title", "user", "comment"]}]}
null
HebrewPagesRevisionsInTimeRange
Returns all non-redirect pages revisions in Hebrew wikipedia within a time range.
USE hewiki_p; SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title, revision.rev_minor_edit, revision.rev_deleted FROM revision JOIN page ON revision.rev_page=page.page_id WHERE ( page.page_namespace = 0 # main / articles #AND revision.rev_minor_edit = 0 # o...
{"runningtime": "5.85", "resultsets": [{"rowcount": 0, "headers": ["Title", "user", "comment"]}]}
null
Items I created that were deleted
null
USE dewiki_p; SELECT archive.ar_title AS item, archive.ar_timestamp AS item_creation_timestamp, comment.comment_text as reason FROM archive JOIN actor_archive ON archive.ar_actor=actor_archive.actor_id JOIN logging on archive.ar_title=logging.log_title JOIN comment on logging.log_com...
{"runningtime": "175.62", "resultsets": [{"rowcount": 1000, "headers": ["user_name", "creates"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "508.80", "resultsets": [{"rowcount": 1, "headers": ["timestamp"]}, {"rowcount": 1000, "headers": ["wpage"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "1.09", "resultsets": [{"rowcount": 29, "headers": ["cat_title", "cat_pages"]}]}
null
HebrewPagesRevisionsInTimeRange
Returns all non-redirect pages revisions in Hebrew wikipedia within a time range.
USE hewiki_p; SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title, revision.rev_minor_edit, revision.rev_deleted FROM revision JOIN page ON revision.rev_page=page.page_id WHERE ( page.page_namespace = 0 # main / articles #AND revision.rev_minor_edit = 0 # o...
{"runningtime": "10.40", "resultsets": [{"rowcount": 3050, "headers": ["base_id", "id", "page_title"]}]}
null
HebrewPagesRevisionsInTimeRange
Returns all non-redirect pages revisions in Hebrew wikipedia within a time range.
USE hewiki_p; SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title, revision.rev_minor_edit, revision.rev_deleted FROM revision JOIN page ON revision.rev_page=page.page_id WHERE ( page.page_namespace = 0 # main / articles #AND revision.rev_minor_edit = 0 # o...
{"runningtime": "230.17", "resultsets": [{"rowcount": 64, "headers": ["page_title"]}]}
null
X2 speedy deletions
This is a list of X2 speedy deletions, code shamelessly stolen from Cryptic.
SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp, log_title, comment_text FROM logging JOIN comment_logging ON comment_id = log_comment_id WHERE log_type = 'delete' AND log_action = 'delete' AND log_namespace = 0 AND comment_text RLIKE '\\bX2\\b' ORDER BY log_id DESC LIMIT 1000;
{"runningtime": "1095.25", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 1, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["tl_title"]}, {"ro...
null
JournoMonth 2020 UkWiki
List of articles created for the Investigative Journalism Week on UkWiki
USE ukwiki_p; SET SESSION group_concat_max_len = 10000; SELECT @rownum := @rownum + 1 AS rank, IFNULL(actor_name, 'Всього'), created, total_len, articles FROM ( SELECT CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name, COUNT(1) AS created, SUM(article.page_len) as...
{"runningtime": "98.48", "resultsets": [{"rowcount": 1, "headers": ["timestamp"]}, {"rowcount": 286, "headers": ["wikipage"]}]}
null
WikiDaheim 2020 media by date
null
USE commonswiki_p; 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_...
{"runningtime": "0.18", "resultsets": [{"rowcount": 21, "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", ...
null
WikiDaheim 2019 media out of date
null
USE commonswiki_p; SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(rev_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, page.page_title FROM image, page, revision, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title and revision.rev_page = page.page_id ...
{"runningtime": "805.00", "resultsets": [{"rowcount": 32, "headers": ["LEFT(rev_timestamp, 8)", "COUNT(*)"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "1.50", "resultsets": [{"rowcount": 286, "headers": ["REGEXP_SUBSTR(el_to, 'Q[0-9]*')", "P18", "CONCAT(\"\\\"\", REPLACE(page_title, \"_\", \" \"), \"\\\"\")"]}]}
null
Most used templates on bnwikisource and their protection level
Most used templates on mrwikisource and their protection level
use bnwikisource_p; SELECT CASE WHEN LEFT(tl_title, 1) <= 'z' THEN CONCAT('Template:', tl_title) ELSE CONCAT('টেমপ্লেট:', tl_title) END AS template, pr_level, COUNT(*) AS freq FROM templatelinks JOIN page ON tl_title = page_title AND page_namespace = 10 LEFT JOIN page_restrictions ON pr_page = pa...
{"runningtime": "0.46", "resultsets": [{"rowcount": 168, "headers": ["user_name"]}]}
null
nl DAB pages reveiving links
null
USE nlwiki_p; SELECT DISTINCT CONCAT ('# [[',page_title,']]'),COUNT(pl_from) FROM pagelinks JOIN page ON pl_title=page_title WHERE page_is_redirect=0 AND page_namespace=0 AND page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation' ) AND pl_from IN ( SELECT page_id FROM page WHERE pa...
{"runningtime": "0.11", "resultsets": [{"rowcount": 10, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}]}
null
Commons administrators with lowest edit counts
Truncate list a3,000 edits.
USE commonswiki_p; SELECT user_name AS Name, user_editcount AS EditCount FROM user_groups LEFT JOIN user ON ug_user = user_id WHERE ug_group = 'sysop' AND user_editcount<10000 ORDER BY user_editcount;
{"runningtime": "144.23", "resultsets": [{"rowcount": 25, "headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"]}]}
null
Template count
null
use itwikisource_p; select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"runningtime": "370.03", "resultsets": [{"rowcount": 1, "headers": ["files"]}]}
null
Books with no corresponding article
List of books where there is no article with the same title. Many of these are about non-notable topics.
SELECT page_title FROM page WHERE page_namespace = 108 AND page_is_redirect = 0 AND NOT page_title in (SELECT page_title FROM page WHERE page_namespace = 0)
{"runningtime": "579.48", "resultsets": [{"rowcount": 1000, "headers": ["user_name", "count"]}]}
null
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": "0.11", "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"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "0.38", "resultsets": [{"rowcount": 122, "headers": ["ctd_name"]}]}
null
tawiki temple orphan pages
null
USE tawiki_p; SELECT '[[',page_title,']]' FROM page LEFT JOIN pagelinks ON pl_title = page_title AND pl_namespace = page_namespace WHERE pl_namespace IS NULL AND (page_is_redirect = 0 AND page_title LIKE "%கோயில்");
{"runningtime": "0.22", "resultsets": [{"rowcount": 0, "headers": ["cat_title", "cat_pages"]}]}
null
Get all living persons without talk pages
Gets all pages with the category Living persons which don't have a talk page
USE arwiki_p; SELECT CONCAT('نقاش:',page.page_title) AS page_title FROM page INNER JOIN categorylinks ON categorylinks.cl_from = page.page_id WHERE categorylinks.cl_to = "أشخاص_على_قيد_الحياة" and page.page_namespace = "0" and NOT EXISTS (SELECT NULL FROM page p2 WHERE p2.page_namespace = "1" and p2.page_title =...
{"runningtime": "0.22", "resultsets": [{"rowcount": 1, "headers": ["cat_title", "cat_pages"]}]}
null
Redirections de catégories sur WP:FR
null
USE frwiki_p; SELECT CONCAT("{{a-redir-simple|:Catégorie:", page_title, "}}") AS sortie FROM page WHERE page_namespace = 14 AND page_is_redirect = 1
{"runningtime": "620.87", "resultsets": [{"rowcount": 167, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "82.80", "resultsets": [{"rowcount": 50, "headers": ["CONCAT(\"Category:\",page_title,\"\")"]}]}
null
WLM-UA Photo Competition participants 2012-2019
WLM-UA Photo Competition participants 2019
use commonswiki_p; SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") 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_2012_in_Ukra...
{"runningtime": "406.14", "resultsets": [{"rowcount": 6566, "headers": ["Affiliated Username", "Affiliates Group"]}]}
null
Category pages with both commonscat and wikidatacommons templates
null
USE huwiki_p; SELECT page.page_title#, wdcat.tl_title, ccat.tl_title FROM page #inner join templatelinks as ccat #on ccat.tl_from = page.page_id #inner join templatelinks as wdcat #on wdcat.tl_from = page.page_id #WHERE page.page_namespace = 14 #and wdcat.tl_title = 'Wikidatacommons' #and (ccat.tl_title = 'Commonscat' ...
{"runningtime": "0.11", "resultsets": [{"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}]}
null
Településkategóriák felesleges kategóriákkal
null
USE huwiki_p; SELECT page.page_title FROM category as cat inner join page on page.page_title = cat.cat_title inner join categorylinks as cl_telep on cl_telep.cl_from = page.page_id and cl_telep.cl_to = 'Települések_kategóriái' inner join categorylinks as cl_other on cl_other.cl_from = page.page_id and cl_other.cl_to !=...
{"runningtime": "101.31", "resultsets": [{"rowcount": 176, "headers": ["count(*)", "tl_title"]}]}
null
Active patrollers
On wikispecies, though pretty easy to change the wiki
SET @days = 90; # How many days to examine use specieswiki_p; SELECT COUNT(log.log_id) AS 'patrols', a.actor_name FROM logging log JOIN actor a ON log.log_actor = a.actor_id WHERE log.log_timestamp > (DATE_FORMAT((NOW() - INTERVAL @days DAY),'%Y%m%d%H%i%S')) AND log.log_type = 'patrol' AND log.log_action = 'patrol' GR...
{"runningtime": "825.46", "resultsets": [{"rowcount": 45, "headers": ["page_title", "cl_to"]}]}
null
Lonely Content Translations in Wikidata (arwiki)
null
use arwiki_p; select concat("[[",page_title,"]]") AS "المقالة", CONCAT("[[:d:",pp_value,"]]") AS "عنصر ويكي بيانات", REPLACE(comment_text, 'أُنشئَت بترجمة الصفحة' , '' ) AS "المقالة المُترجمة" from revision inner join comment on comment_id = rev_comment_id inner join page on page_id = rev_page LEFT JOIN langlinks ...
{"connection_id": 263863881}
null
Accounts matching "%Κουτσουβέλης"
Accounts matching "%Κουτσουβέλης%"
USE centralauth_p; SELECT gu_name as Username, gu_registration AS regdate FROM globaluser WHERE gu_name like "%Turner%" ORDER BY gu_registration DESC;
{"runningtime": "390.94", "resultsets": [{"rowcount": 20, "headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"]}]}
null
Number of autoconfirmed users (urwiki)
null
use urwiki_p; #describe user; select count(*) from user where user_editcount >= 50 and user_registration between 20040708000000 and (select now() - 60*60*24*4); #use enwiki_p; #select count(*) from user where user_editcount >= 10 #and user_registration between 20010114000000 and (select now() - 60*60*24*4);
{"runningtime": "1355.60", "resultsets": [{"rowcount": 30, "headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"]}]}
null
Alive and born in 1910s
null
use fawiki_p; select page_title from page join categorylinks c1 on c1.cl_from = page_id and c1.cl_to = 'افراد_زنده' join categorylinks c2 on c2.cl_from = page_id and c2.cl_to LIKE CONCAT( 'زادگان_', '۱۹۱', '%_(میلادی)' )
{"runningtime": "1489.38", "resultsets": [{"rowcount": 30, "headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"]}]}
null
Editors with more than 5 edits in last 30 days (arwiki)
Results order by there edits count in the same period.
USE nlwiki_p; select actor_name, count(rev_actor) from revision JOIN actor ON actor_id = rev_actor where rev_timestamp > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND actor_name IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'editor') AND actor_name NOT IN (SELECT user_name...
{"runningtime": "387.57", "resultsets": [{"rowcount": 172, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null
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": "0.14", "resultsets": [{"rowcount": 16, "headers": ["ar_title", "ar_id", "ar_namespace", "pl_title", "pl_namespace"]}]}
null
Alive people without a birth or death year
null
use fawiki_p; select distinct page_title from page join categorylinks c1 on page_id = c1.cl_from and c1.cl_to = 'افراد_زنده' left join categorylinks c2 on page_id = c2.cl_from and c2.cl_to like 'درگذشتگان_%' left join categorylinks c3 on page_id = c3.cl_from and c3.cl_to like 'زادگان_%' where page_namespa...
{"runningtime": "0.09", "resultsets": [{"rowcount": 5, "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", "pl_from", "pl_namespace", "pl_title", ...
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "219.99", "resultsets": [{"rowcount": 5264, "headers": ["title", "gt_page_id", "gt_lat", "gt_lon"]}]}
null
Total bytes added/removed from mainspace, "The R"*
Sum of edit deltas of live edits in to pages currently in the main namespace by users with names starting "The R". For [[WP:VPT#Amount of content added/subtracted]] circa 22 July 2020.
SELECT actor_name, SUM(b.rev_len - COALESCE(a.rev_len, 0)) FROM revision_userindex b LEFT JOIN revision a ON a.rev_id = b.rev_parent_id JOIN actor_revision on actor_id = b.rev_actor JOIN page ON page_id = a.rev_page WHERE page_namespace = 0 AND actor_name LIKE 'The R%' GROUP BY actor_name;
{"runningtime": "7.07", "resultsets": [{"rowcount": 5, "headers": ["page_title", "GROUP_CONCAT(CONCAT(rev_timestamp, '\\t', comment_text, '\\t', actor_name) SEPARATOR '\\n')"]}]}
null
Extraneous home page links (enwiki [[Z*]])
goal: find extraneous external links like in "[http://example.com/page foo] on [http://example.com/ example site]" - without parsing dumps, but with reasonably few false positives
USE enwiki_p; SET @language = 'en'; SELECT CONCAT('https://', @language , '.wikipedia.org/wiki/' ,page_title, '?action=edit&veswitched=1#:~:text=', rooturl) AS page_edit_link, # try to highlight homepage URL in source wikitext rooturl, SUM(IF( url=rooturl, 1, 0) ) AS rootlinks, SUM(1) AS alllinks FROM ( SELECT ...
{"runningtime": "6.36", "resultsets": [{"rowcount": 5, "headers": ["page_title", "GROUP_CONCAT(CONCAT(rev_timestamp, '\\t', comment_text, '\\t', actor_name) SEPARATOR '\\n')"]}]}
null
Tool Labs metadata database
Content of the metadata database; see https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database#Metadata_database for more information.
use meta_p; SELECT * FROM wiki;
{"connection_id": 269496405}
null
de_wiki: red links count gt 120
output for https://de.wikipedia.org/wiki/Wikipedia:Fehlende_Artikel
use dewiki_p; SET sql_mode='PIPES_AS_CONCAT'; select '- [['||REPLACE(pl_title, '_', ' ')||']] <!-- '|| c ||' Links -->' as output from (select pl_title , count(*) as c , pl_namespace from pagelinks where pl_from_namespace=0 and pl_namespace=0 group by pl_title, pl_namespace having count(*)>1) a...
{"connection_id": 269778222}
null
Files_with_PermissionOTRS_template_but_without_P6305_SDC_statement
null
use commonswiki_p; select concat("File:",page_title), page_links_updated, page_touched FROM page JOIN categorylinks c1 ON page_id=c1.cl_from AND c1.cl_to='Items_with_OTRS_permission_confirmed' join templatelinks on page_id=tl_from and tl_namespace = 10 AND (tl_title="PermissionOTRS" OR tl_title="OTRS") WHERE page_n...
{"runningtime": "1255.15", "resultsets": [{"rowcount": 3584, "headers": ["page_title", "GROUP_CONCAT(CONCAT(rev_timestamp, '\\t', comment_text, '\\t', actor_name) SEPARATOR '<br />\\n')"]}]}
null
Articles possibly about a human without birth/date/alive categories
null
use fawiki_p; select distinct page_title from page join categorylinks c1 on page_id = c1.cl_from and c1.cl_to like '%_اهل_%' left join categorylinks c2 on page_id = c2.cl_from and ( c2.cl_to = 'افراد_زنده' or c2.cl_to like 'زادگان_%' or c2.cl_to like 'درگذشتگان_%' or c2.cl_to like 'گروه%_اهل_%' ...
{"runningtime": "0.10", "resultsets": [{"rowcount": 3, "headers": ["page_title", "page_len"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["ss_active_users"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "0.13", "resultsets": [{"rowcount": 1, "headers": ["ss_users"]}]}
null
IA uploads by Fæ
This count based purely on filename and uploader, a handy guide to size of the total size uploads.
USE commonswiki_p; SELECT COUNT(img_name) AS Count FROM image WHERE img_timestamp > 20200508000000 AND img_timestamp <= 20200508235959;
{"connection_id": 274252596}
null
Pages without external links
Get all pages from page 0 ns which do not use external link
USE tewiki_p; SELECT p.page_title FROM page p WHERE (p.page_namespace=0 AND p.page_is_redirect=0);
{"runningtime": "111.37", "resultsets": [{"rowcount": 109, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}]}
null
Potentially extraneous homepage links (dewiki <= M)
goal: find extraneous external links like in "[http://example.com/page foo] on [http://example.com/ example site]" - without parsing dumps, but with reasonably few false positives
USE dewiki_p; SET @language = 'de'; SELECT CONCAT('https://', @language , '.wikipedia.org/wiki/' ,page_title, '?action=edit&veswitched=1#:~:text=', rooturl) AS page_edit_link, # try to highlight homepage URL in source wikitext rooturl, SUM(IF( url=rooturl, 1, 0) ) AS rootlinks, SUM(1) AS alllinks FROM ( SELECT ...
{"runningtime": "33.71", "resultsets": [{"rowcount": 433, "headers": ["CONCAT('# [[', page_title, ']]')"]}]}
null
IA automatically retried and successful uploads
IA document uploads with 2 or more retries needed
USE commonswiki_p; SELECT CAST(LEFT(SUBSTR( comment_text, INSTR(comment_text,'(retry ') + 6, LENGTH(comment_text) - INSTR(comment_text,') (batch') - 2), 3) AS INT) AS Tries, ROUND(img_size/(1024*1024)) AS Size_MB, img_name AS Document FROM image JOIN page ON page_title = img_name JOIN revision_userindex ON page_i...
{"runningtime": "75.26", "resultsets": [{"rowcount": 1000, "headers": ["page_title"]}]}
null
Pages without external links
Get 500 pages from page 0 ns which do not use external link
USE tewiki_p; SELECT p.page_title as page_title FROM page p WHERE (p.page_namespace=0 AND p.page_is_redirect=0 AND p.page_title NOT IN ( SELECT DISTINCT page_title FROM externallinks JOIN page ON page_id = el_from WHERE ( page_namespace=0 AND page_is_redirect=0) )) LIMIT 500;
{"runningtime": "2.68", "resultsets": [{"rowcount": 1000, "headers": ["page_title"]}]}
null
Список избирателей
Участники со стажем не менее 3 месяцев, сделавшие не менее 500 правок, и не менее 100 правок за последние полгода.
USE ruwiki_p; SELECT user_name, user_registration, user_editcount, COUNT(rev_id) FROM (SELECT * FROM (SELECT user_id, user_name, user_registration, user_editcount FROM user WHERE ((user_registration IS NULL) OR (user_registration < DATE_FORMAT(DATE_SUB("2020-07-20", INTERVAL 3 MONTH), "%Y%m%d%H%i%s"))) ...
{"runningtime": "169.48", "resultsets": [{"rowcount": 18063, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "comment_id", "comment_hash", "comment_text", "comment_data"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "26.22", "resultsets": [{"rowcount": 1, "headers": ["concat (\"\u0646\u0642\u0627\u0634:\",page_title)"]}]}
null
Commons files with FindAGrave links
null
use commonswiki_p; SELECT DISTINCT page.page_title, externallinks.el_to FROM externallinks INNER JOIN page ON externallinks.el_from = page.page_id WHERE (externallinks.el_to LIKE "http://www.findagrave.com/cgi-bin/fg.cgi%" OR externallinks.el_to LIKE "https://www.findagrave.com/cgi-bin/fg.cgi%" OR externallinks...
{"runningtime": "2.89", "resultsets": [{"rowcount": 908, "headers": ["dbname", "lang", "name", "family", "url", "size", "slice", "is_closed", "has_echo", "has_flaggedrevs", "has_visualeditor", "has_wikidata", "is_sensitive"]}]}
null
A magyar Wikipédia mérete
https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete
USE huwiki_p; /* Real data */ SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)' FROM page WHERE page_namespace = 0 AND page_is_redirect = 0; /* With redirects */ SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page...
{"runningtime": "210.15", "resultsets": [{"rowcount": 7, "headers": ["pl_from", "pl_title"]}]}
null
990501 mp1 # of DAB pages with direct link (pages)
null
USE fawiki_p; SELECT COUNT(DISTINCT(page_title)) FROM pagelinks JOIN page WHERE page_is_redirect=0 AND page_namespace=0 AND page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation') AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redirect=0) AND pl_title=page_title AND pl_nam...
{"runningtime": "185.36", "resultsets": [{"rowcount": 0, "headers": ["pl_from", "pl_title"]}]}
null
990501 mp1 # of direct links to DAB pages (pages)
null
USE fawiki_p; SELECT COUNT(page_id) FROM pagelinks JOIN page WHERE page_is_redirect=0 AND page_namespace=0 AND page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation' ) AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redirect=0 ) AND pl_title=page_title AND pl_namespace ...
{"runningtime": "77.47", "resultsets": [{"rowcount": 0, "headers": ["pl_from", "pl_title"]}]}
null
990501 mp1 # of DAB pages
null
USE fawiki_p; SELECT COUNT(page_title) FROM page WHERE page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation');
{"runningtime": "7.94", "resultsets": [{"rowcount": 132, "headers": ["concat('\u0160ablona:', replace(page_title, '_', ' '))"]}]}
null
990501 # of fa articles
null
USE fawiki_p; SELECT COUNT(page_id) FROM page WHERE page_is_redirect = 0 AND page_namespace = 0;
{"runningtime": "7.56", "resultsets": [{"rowcount": 143, "headers": ["rc_title", "concat('https://cs.wikipedia.org/w/index.php?title=', rc_title, '&diff=', rc_this_oldid, '&oldid=', rc_last_oldid)"]}]}
null
990501 mp1 # of redirected links to DAB pages (pages)
null
USE fawiki_p; SELECT COUNT(pl_title) FROM pagelinks LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title LEFT JOIN redirect ON page_id = rd_from WHERE page_is_redirect = 1 AND page_namespace = 0 AND rd_namespace = 0 AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redirect=0 AND ...
{"runningtime": "309.92", "resultsets": [{"rowcount": 166, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null
990501 mp1 # of DAB pages with redirected link (pages)
null
USE fawiki_p; SELECT COUNT(DISTINCT(page_title)) FROM pagelinks LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title LEFT JOIN redirect ON page_id = rd_from WHERE page_is_redirect = 1 AND page_namespace = 0 AND rd_namespace = 0 AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redir...
{"runningtime": "10.75", "resultsets": [{"rowcount": 33, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null