title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
edited pages
null
use fiwiki_p; select rc_title, linktext, el_to from ( select concat("# [[", replace(rc_title, '_', ' '), "]] ") as rc_title, concat('<small><span class=plainlinks>([https://fi.wikipedia.org/w/index.php?diff=cur&oldid=', min(rc_last_oldid), ' diff])</span></small>') as linktext, group_concat(distinct(IF (el...
{"runningtime": "0.24", "resultsets": [{"rowcount": 27, "headers": ["user_name"]}]}
null
fawiki featured pictures list2
null
use fawiki_p; select distinct il_to from imagelinks join page on il_from=page_id join templatelinks on tl_from = page_id where page_title like '%گزیدن_نگاره_برگزیده%' and il_from_namespace = 4 and page_namespace = 4 and tl_from_namespace = 4 and tl_namespace = 10 and tl_title = 'برگزیده_شد';
{"runningtime": "3.39", "resultsets": [{"rowcount": 0, "headers": ["user_name", "COUNT(*)", "actor_user"]}]}
null
fawiki featured pictures list2
null
use fawiki_p; select distinct il_to from imagelinks join page on il_from=page_id join templatelinks on tl_from = page_id where page_title like '%گزیدن_نگاره_برگزیده%' and il_from_namespace = 4 and page_namespace = 4 and tl_from_namespace = 4 and tl_namespace = 10 and tl_title = 'برگزیده_شد';
{"runningtime": "0.90", "resultsets": [{"rowcount": 0, "headers": ["user_name", "COUNT(*)", "actor_user"]}]}
null
Mainspace article titles with parentheticals
null
SELECT page_title FROM page WHERE page_is_redirect=0 AND page_namespace=0 AND page_title LIKE '%)' AND page_title NOT LIKE '%(disambiguation)'
{"runningtime": "0.57", "resultsets": [{"rowcount": 100, "headers": ["ptrp_page_id", "ptrp_reviewed", "ptrp_deleted", "ptrp_created", "ptrp_tags_updated", "ptrp_reviewed_updated", "ptrp_last_reviewed_by", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "...
null
non-redirect mainspace titles
null
SELECT page_title FROM page WHERE page_is_redirect=0 AND page_namespace=0
{"runningtime": "0.46", "resultsets": [{"rowcount": 100, "headers": ["ptrp_page_id", "page_id", "page_title"]}]}
null
Recent articles categorised as men
null
USE enwiki_p; SELECT DISTINCT(page_title) FROM page JOIN categorylinks ON page_id = cl_from AND page_namespace = 0 AND page_id < 60000000 AND page_id > 59000000 AND cl_to RLIKE "(M|m)ale" AND NOT cl_to RLIKE "(F|f)emale";;
{"runningtime": "49.45", "resultsets": [{"rowcount": 4, "headers": ["rd_from", "TO", "FROM"]}]}
null
Recent articles categorised as women
null
USE enwiki_p; SELECT DISTINCT(page_title) FROM page JOIN categorylinks ON page_id = cl_from AND page_namespace = 0 AND page_id < 60000000 AND page_id > 59000000 AND cl_to RLIKE "(F|f)emale";;
{"runningtime": "0.15", "resultsets": [{"rowcount": 0, "headers": ["cl_from", "# Categories", "page_title"]}]}
null
بوابة من اسم التصنيف
null
use arwiki_p; select page_title, group_concat(distinct SUBSTRING_INDEX(SUBSTRING_INDEX(cl_to, '_في_', 2), '_في_', -1)) from page inner join categorylinks on cl_from = page_id where page_namespace = 0 and page_is_redirect = 0 and page_id in (select cl_from from categorylinks where cl_from = page_id and cl_to = "مقالات_ب...
{"runningtime": "5.69", "resultsets": [{"rowcount": 1, "headers": ["\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u0645\u0642\u0627\u0644\u0627\u062a"]}]}
null
بذرة من اسم التصنيف
null
use arwiki_p; select page_title, group_concat(distinct SUBSTRING_INDEX(SUBSTRING_INDEX(cl_to, '_في_', 2), '_في_', -1)) from page inner join categorylinks on cl_from = page_id where page_namespace = 0 and page_is_redirect = 0 and page_id in (select cl_from from categorylinks where cl_from = page_id and cl_to = "مقالات_ب...
{"runningtime": "4.82", "resultsets": [{"rowcount": 50, "headers": ["\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u0645\u0642\u0627\u0644\u0627\u062a"]}]}
null
namespace 2, page_touched, the oldest
null
USE etwiki_p; SELECT page_title FROM page AS page WHERE page_namespace = 14 AND page_len < 20 LIMIT 100;
{"connection_id": 32220965}
null
Mismatches between category and categorylinks tables on fiwiki
null
use fiwiki_p; select * from ( select cl_to, cat_title, cat_pages, count(*) cl_count from category join categorylinks on cl_to = cat_title group by cl_to, cat_title ) c where cl_count <> cat_pages
{"runningtime": "441.07", "resultsets": [{"rowcount": 0, "headers": ["\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u0645\u0642\u0627\u0644\u0627\u062a"]}]}
null
Європейська весна
null
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": "0.27", "resultsets": [{"rowcount": 50, "headers": ["fp_page_id", "fp_reviewed", "fp_pending_since", "fp_stable", "fp_quality"]}]}
null
Top users of Suggested Edits feature on Android
A leaderboard of top 10 Android editors by number of title description edits *made through the Suggested Edits feature*, including the number of days those edits were made over.
SET STATEMENT max_statement_time = 120 FOR USE wikidatawiki_p; SELECT rev_user_text AS username, COUNT(*) AS n_total_edits, -- not all edits, just total Suggested Edits edits COUNT(DISTINCT LEFT(rev_timestamp, 8)) AS n_days_usage FROM revision_userindex LEFT JOIN `comment` ON revision_userindex.rev_comment_id = `...
{"runningtime": "0.62", "resultsets": [{"rowcount": 17, "headers": ["page_title"]}]}
null
Midreport Sample
List of articles created for STEM Girls context (WMUA), with the user who created them.
USE ukwiki_p; SET SESSION group_concat_max_len = 10000; SELECT @rownum := @rownum + 1 AS rank, IFNULL(actor_name, 'Всього') FROM ( SELECT CONCAT(actor_name) as actor_name, COUNT(1) AS created, SUM(article.page_len) as total_len, GROUP_CONCAT( DISTINCT -- [[Назва статті]] ...
{"connection_id": 34537868}
null
FULLY‌ & INDEFINITELTY PROTECTED TEMPLATES‌ ON‌ COMMONS
fork
USE commonswiki_p; SELECT concat('"',page_title,'",') FROM page JOIN page_restrictions ON page_id = pr_page WHERE pr_type = 'edit' AND pr_level = 'sysop' AND pr_expiry = 'infinity' AND page_namespace = 10 ORDER BY page_title
{"connection_id": 35021767}
null
All templates used on the different Main Pages of Commons
fork
USE commonswiki_p; SELECT CONCAT('"',tl_title,'",') FROM templatelinks LEFT JOIN page ON tl_from = page_id WHERE (page_id=3520421 OR page_id=563300 OR page_id=269886 OR page_id=350219 OR page_id=110865 OR page_id=123978 OR page_id=34606503 OR page_id=9883540 OR page_id=87957 OR page_id=30954802 OR page_id=50271...
{"runningtime": "9.11", "resultsets": [{"rowcount": 29, "headers": ["page_title", "R", "List of redirects", "pr_type", "pr_level"]}]}
null
All templates used on the MediaWiki namespace
fork
USE commonswiki_p; SELECT CONCAT('"',tl_title,'",') FROM templatelinks JOIN page ON tl_from = page_id WHERE page_namespace=8 AND tl_namespace=10 ORDER BY tl_title
{"connection_id": 35498833}
null
wikidata: items edited only by IPs (not working)
null
USE wikidatawiki_p; SELECT page_id, page_title FROM page JOIN revision ON page_id=rev_page JOIN actor_revision ON actor_id=rev_actor WHERE page_namespace=0 GROUP BY page_id, page_title HAVING COUNT(actor_user IS NOT NULL) = 0;
{"runningtime": "0.15", "resultsets": [{"rowcount": 5, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment", "ar_comment_id", "ar_user", "ar_user_text", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"...
null
WikiDaheim correctors 2019 (after first revision)
Count the number of edits on WikiDaheim images after upload. This will include edits on own previously uploaded images as well as edits on images of other users.
USE commonswiki_p; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(revision.rev_parent_id) as edit_count FROM actor, /*user_groups,*/ revision, revision as revision0, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image....
{"runningtime": "8.50", "resultsets": [{"rowcount": 310, "headers": ["CONCAT('[[',p.page_title,']]')", "pp_value"]}]}
null
Investigative Journalism Week
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...
{"connection_id": 36597259}
null
Translators at meta with language, number of translations
For a given prefix of translatable pages, take all translators for the latest versions of translation units (otherwise someone fixing their own typos would look a prolific translator) and order them by language and translation volume.
use metawiki_p; SELECT actor_name as user, substring_index(page_title, '/', -1) AS language, count(*) AS no_translations, CONCAT('* {{target | page = User:', actor_name, ' | site = meta.wikimedia.org}}') AS url FROM page LEFT JOIN -- Take only the latest revision of each translation to simplify revision ON ...
{"connection_id": 36603498}
null
Article creations since 2016 (enwikivoyage)
null
USE enwikivoyage_p; SELECT rev_id, rev_timestamp, page_id, page_title, user_id, actor_name, user_registration, ug_group, FALSE AS archived FROM revision_userindex INNER JOIN actor ON rev_actor = actor_id INNER JOIN page ON rev_page = page_id LEFT JOIN user ON actor_user = user_id LEFT JOIN user_groups ON ug_user = user...
{"connection_id": 38532572}
null
Hewiki multiwiki missing articles
null
use ruwiki_p; select (select count(ll_lang) from langlinks where ll_from = page_id) + 1 as "number", (select ll_title from langlinks where ll_from = page_id and ll_lang = "en") as "name" from page where page_namespace = 0 and (select count(ll_lang) from langlinks where ll_from = page_id) > 1 and exists (select ...
{"runningtime": "119.13", "resultsets": [{"rowcount": 13079, "headers": ["page_title", "el_to"]}]}
null
Errors in French labels
null
USE wikidatawiki_p; SELECT term_full_entity_id, term_text FROM wb_terms WHERE term_type='label' AND term_language='it' AND term_text LIKE 'Appendice:Coniugazioni%' LIMIT 5000
{"runningtime": "0.15", "resultsets": [{"rowcount": 0, "headers": ["revactor_rev", "revactor_actor", "revactor_timestamp", "revactor_page", "actor_id", "actor_user", "actor_name", "rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent...
null
NPP queue with indexed articles
Count of the number of non-redirect articles in the New Page Patrol queue, with an additional count of the number of those that were created more than 90 days ago (meaning that they can now be indexed by search engines).
SELECT UTC_TIMESTAMP() AS npp_timestamp, COUNT(*) AS npp_count, SUM(IF(TIMESTAMPDIFF(DAY, creation_ts, UTC_TIMESTAMP()) >= 90, 1, 0)) AS npp_num_indexable FROM ( SELECT rev_page, MIN(rev_timestamp) AS creation_ts FROM revision WHERE rev_page IN ( SELECT ptrp_page_id FROM pagetriage_page JOIN pa...
{"runningtime": "97.68", "resultsets": [{"rowcount": 611, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"]}]}
null
STEM Girls improve
null
USE ukwiki_p; SET SESSION group_concat_max_len = 10000; SELECT @rownum := @rownum + 1 AS rank, IFNULL(article, 'Всього'), user_number, size_increase, users FROM ( SELECT CONCAT('[[', REPLACE(page_title, '_', ' '), ']]') as article, COUNT(1) AS user_number, SUM(user_size_increase) as si...
{"runningtime": "0.15", "resultsets": [{"rowcount": 1, "headers": ["ufg_user", "ufg_group"]}]}
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": 42699472}
null
actor<->user
null
select ac.* from actor ac where ac.actor_user in ( select u.user_id from user u where u.user_name='Hamish' )
{"runningtime": "0.25", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]}
null
用于查询存废编辑的简单脚本
mw >1.31
USE zhwiki_p; select p.page_title,rc.rc_timestamp,DATE_FORMAT(rc.rc_timestamp,'%Y/%m/%d %H:%i'),rc.rc_id from recentchanges rc inner join revision rv on rc.rc_this_oldid = rv.rev_id inner join page p on rv.rev_page = p.page_id left join revision_actor_temp rat on rat.revactor_rev=rv.rev_id where /*rc.rc_type in ('0',...
{"runningtime": "0.32", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}]}
null
fix football categories
null
select CONCAT('* [[:',ll_title, ']]>') AS cat1 , REPLACE(CONCAT( '[[:' , ll_title , ']]' ) # , 'كرم القدم' , 'كرة القدم' ) AS cat2 #, 'مجموعات' , 'فرق' ) AS cat2 , 'صناديق تصفح صناديق تصفح' , 'صناديق تصفح' ) AS cat2 from page AS p1, langlinks where p1.page_title like "%navigational...
{"runningtime": "25.90", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]}
null
ComingSoonIT (itwiki, ns0) - no tmp ✘
null
use itwiki_p; SELECT CONCAT('# [[', page_title, ']]') FROM externallinks, page WHERE el_to like 'https://www.comingsoon.it/film/%' AND page_namespace = 0 AND page_id = el_from AND NOT EXISTS ( SELECT 1 FROM templatelinks WHERE tl_from = page_...
{"runningtime": "101.17", "resultsets": [{"rowcount": 611, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"]}]}
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": 49339963}
null
Most active non-admins at AN/I
null
SELECT actor_name, COUNT(actor_name) AS edits FROM revision JOIN actor ON rev_actor = actor_id JOIN page ON rev_page = page_id JOIN user_groups ON actor_user = ug_user WHERE rev_page = 5137507 AND rev_timestamp > (NOW() - INTERVAL 1 week) AND ug_user NOT IN (SELECT DISTINCT user_groups.ug_user FROM us...
{"runningtime": "0.12", "resultsets": [{"rowcount": 2, "headers": ["oresc_probability"]}]}
null
zhwiki: patrol log
null
USE zhwiki_p; SELECT * FROM logging WHERE log_type = 'patrol' ORDER BY log_timestamp DESC LIMIT 1000
{"runningtime": "0.08", "resultsets": [{"rowcount": 0, "headers": ["log_actor", "cnt"]}]}
null
dewiki: pages in category "Kategorie:Wikipedia:Schnelllöschen"
null
USE dewiki_p; SELECT * FROM category WHERE cat_title='Wikipedia:Schnelllöschen'; SELECT page_title, page_namespace, cl_timestamp, cl_sortkey FROM categorylinks LEFT JOIN page ON cl_from=page_id WHERE cl_to='Wikipedia:Schnelllöschen'; SELECT cl_from, cl_to, cl_timestamp, cl_sortkey FROM categorylinks LEFT JOIN page O...
{"runningtime": "5.66", "resultsets": [{"rowcount": 226, "headers": ["log_actor", "cnt"]}]}
null
Hewiki multiwiki missing articles
null
use ruwiki_p; select (select count(ll_lang) from langlinks where ll_from = page_id) + 1 as "number", (select ll_title from langlinks where ll_from = page_id and ll_lang = "en") as "name" from page where page_namespace = 0 and (select count(ll_lang) from langlinks where ll_from = page_id) > 3 and exists (select ...
{"runningtime": "139.32", "resultsets": [{"rowcount": 10, "headers": ["CONCAT('[[:Category:', CONVERT(cl_to USING utf8), ']]')", "COUNT(*)"]}]}
null
Hewiki multiwiki missing articles
null
use ruwiki_p; select (select count(ll_lang) from langlinks where ll_from = page_id) + 1 as "number", (select ll_title from langlinks where ll_from = page_id and ll_lang = "en") as "name" from page where page_namespace = 0 and (select count(ll_lang) from langlinks where ll_from = page_id) > 5 and exists (select ...
{"runningtime": "34.83", "resultsets": [{"rowcount": 1215, "headers": ["log_actor", "log_namespace", "log_action", "overall"]}]}
null
Possible ScienceDirect proxies
null
USE enwiki_p; SELECT DISTINCT(SUBSTRING_INDEX(el_to, "/", 3)) AS domain FROM externallinks WHERE el_to LIKE "http://www.sciencedirect.com%" AND el_index NOT LIKE "http://com.sciencedirect.www%" LIMIT 1000;
{"connection_id": 58107632}
null
Commons: find images with spaces before file extension
This query lists all files on commons with extensions before their spaces. For example, "apple .jpg" would be listed whereas "apple.jpg" would not.
select img_name from image where img_name like "%\_.%" or img_name like "_%_.%";
{"runningtime": "36.52", "resultsets": [{"rowcount": 10, "headers": ["page_title", "ll_title"]}]}
null
Most common items on lexeme pages
null
USE `wikidatawiki_p`; SELECT `term_full_entity_id`, `term_text`, COUNT(*) AS `count` FROM `pagelinks` JOIN `wb_terms` ON `pl_title` = `term_full_entity_id` WHERE `pl_from_namespace` = 146 AND `pl_namespace` = 0 AND `term_type` = 'label' AND `term_language` = 'en' GROUP BY `term_full_entity_id`, `term_text` ORDER BY `c...
{"runningtime": "9.74", "resultsets": [{"rowcount": 0, "headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format", "page_id", "page_namespace", "page_title", "page_res...
null
Hewiki multiwiki missing articles
null
use ruwiki_p; select (select count(ll_lang) from langlinks where ll_from = page_id) + 1 as "number", (select ll_title from langlinks where ll_from = page_id and ll_lang = "en") as "name" from page where page_namespace = 0 and (select count(ll_lang) from langlinks where ll_from = page_id) < 50 and exists (select...
{"runningtime": "11.42", "resultsets": [{"rowcount": 499, "headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format", "page_id", "page_namespace", "page_title", "page_...
null
Proofread-Divya-book1-IndiaSamuthayaVaralaril
Change the actor_name and page_title for your search. Choose either validated or proofread line and comment another
use tawikisource_p; SELECT distinct page_title as Title, actor_name as user, comment_text as comment FROM revision join page ON page_id = rev_page join comment on comment_id = rev_comment_id join actor ON rev_actor = actor_id where (comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Proofread%") #...
{"runningtime": "15.54", "resultsets": [{"rowcount": 100, "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
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": 59838747}
null
User pages of non-existent users
(This should in theory show all subpages and also show, if some of these are redirects, where they go (and perhaps exclude those whose targets are user pages of actual users.)
USE etwiki_p; SELECT concat("kasutaja:", page_title) FROM page WHERE page_title REGEXP '^[^/]+$' AND page_namespace=2 AND replace(page_title, '_', ' ') NOT IN (select user_name from user) LIMIT 10;
{"runningtime": "0.19", "resultsets": [{"rowcount": 0, "headers": ["rev_id"]}]}
null
zhwiki: patrol status
null
USE zhwiki_p; SELECT user_name, ug_group, `count` FROM ( SELECT log_actor, COUNT(*) AS `count` FROM logging WHERE log_type = 'patrol' AND log_namespace = 0 AND log_timestamp > 20190701000000 GROUP BY log_actor ) logging LEFT JOIN actor ON log_actor = actor_id LEFT JOIN ( SELECt * FROM user_groups...
{"connection_id": 60841701}
null
zhwiki: patrol log one user
null
USE zhwiki_p; SELECT COUNT(*) FROM logging WHERE log_type = 'patrol' AND log_namespace = 0 AND log_actor = ( SELECT actor_id FROM actor WHERE actor_user = ( SELECT user_id FROM user WHERE user_name = 'AT' ) )
{"connection_id": 60841721}
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": 61205548}
null
fix template title
null
USE arwiki_p; select CONCAT('* [[قالب:',page_title, ']]>') AS cat1 , CONCAT( '[[' , page_title , ']]' ) AS cat2 from page where page_namespace = 10 AND page_title like "%قالب:%" LIMIT 100 ;
{"runningtime": "0.66", "resultsets": [{"rowcount": 0, "headers": ["log_title", "COUNT(*)"]}]}
null
Sample random revisions from big namespaces
null
# http://jan.kneschke.de/projects/mysql/order-by-rand/ # https://stackoverflow.com/questions/249301/simple-random-samples-from-a-sql-database # https://mariadb.com/kb/en/library/data-sampling-techniques-for-efficiently-finding-a-random-row/#case-consecutive-auto_increment-without-gaps-10-rows ### All non-deleted revi...
{"runningtime": "0.20", "resultsets": [{"rowcount": 9, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "ar_content_model", "ar_content_format"...
null
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת
null
use hewiki_p; select user_name, count(page_title) from user join revision_userindex join page join actor on user_id = actor_user and rev_page = page_id and rev_actor = actor_id where page_namespace = 0 and not page_is_redirect and rev_parent_id = 0 and rev_deleted = 0 group by user_name having count(page_title) >= 50 o...
{"runningtime": "0.46", "resultsets": [{"rowcount": 91, "headers": ["Tables_in_tawikisource_p"]}, {"rowcount": 10, "headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"]}]}
null
ANICA (itwiki, ns0) - template
null
use itwiki_p; SELECT CONCAT('# [[', page_title, ']]') FROM externallinks, page JOIN templatelinks ON tl_from = page_id AND tl_title = 'Film' AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = page_id...
{"runningtime": "1684.24", "resultsets": [{"rowcount": 119, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}]}
null
Find a Grave (itwiki, ns0) - template
null
use itwiki_p; SELECT CONCAT('# [[', page_title, ']]') FROM externallinks, page JOIN templatelinks ON tl_from = page_id AND tl_title = 'Bio' AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = page_id ...
{"connection_id": 68901576}
null
Santiebeati (itwiki, ns0) - template
null
use itwiki_p; SELECT CONCAT('# [[', page_title, ']]') FROM externallinks, page JOIN templatelinks ON tl_from = page_id AND tl_title = 'Santo' AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = page_...
{"connection_id": 68901578}
null
Перенаправлення між просторами імен
null
USE ukwiki_p; SELECT page_title FROM page JOIN redirect ON redirect.rd_from = page.page_id WHERE redirect.rd_namespace = 2 and page.page_namespace = 0 ;
{"runningtime": "24.52", "resultsets": [{"rowcount": 283, "headers": ["page_title", "pl_title"]}]}
null
Number of admins to revdelete
null
SELECT COUNT(DISTINCT (log_actor)) FROM logging WHERE log_type="delete" AND log_action="revision" AND log_namespace IN (0, 1, 2, 3);
{"runningtime": "1356.14", "resultsets": [{"rowcount": 52143, "headers": ["actor_name", "c"]}]}
null
GA/FA (candidates) filters
Linked from a specified page, but not from another
SELECT page_title #Faster than just selecting the page title and id, but only those are needed FROM page pg1 WHERE pg1.page_namespace = 0 #Only care about articles AND pg1.page_title IN ( #Where page is linked from a specified other page SELECT pl_title FROM pagelinks WHERE pl_...
{"runningtime": "15.09", "resultsets": [{"rowcount": 41, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 9, "headers": ["linter_cat", "count(*)"]}, {"rowcount": 16, "headers": ["page_namespace", "count(*)"]}]}
null
Pages of a main category's direct subcategories
Find pages in a upper level category , Examples villages in a district, with sub category of mandal
use tewiki_p; SELECT CONCAT("[[",page_title,"]]") as page, cl_to as category FROM page p JOIN categorylinks cl ON p.page_namespace = 0 -- main page AND cl.cl_from = p.page_id AND cl.cl_to in ( SELECT page_title as subcat FROM page p JOIN categorylinks cl ON p.page_namespace = 14 -- Optional namespace check...
{"connection_id": 96029928}
null
Monumental-glam: most active users
Usernames and edit counts with monumental-glam
USE wikidatawiki_p; SELECT actor.actor_name as Username, COUNT(revision.rev_id) AS Edits FROM revision JOIN change_tag ON revision.rev_id=change_tag.ct_rev_id JOIN actor ON revision.rev_actor=actor.actor_id WHERE change_tag.ct_tag_id=604 -- OAuth CID: 1311 GROUP BY actor.actor_name ORDER BY Edits DESC; ...
{"runningtime": "6.79", "resultsets": [{"rowcount": 1, "headers": ["@min := MIN(rev_id)", "@max := MAX(rev_id)"]}, {"rowcount": 35, "headers": ["rev_id", "rev_comment_id", "rev_timestamp", "rev_minor_edit", "rev_parent_id", "rev_len", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "...
null
Monumental-glam: number of users
null
USE wikidatawiki_p; SELECT COUNT(DISTINCT actor.actor_id) as Usercount FROM revision JOIN change_tag ON revision.rev_id=change_tag.ct_rev_id JOIN actor ON revision.rev_actor=actor.actor_id WHERE change_tag.ct_tag_id=604 -- OAuth CID: 1311
{"runningtime": "7.66", "resultsets": [{"rowcount": 1, "headers": ["@min := MIN(rev_id)", "@max := MAX(rev_id)"]}, {"rowcount": 40, "headers": ["rev_id", "rev_comment_id", "rev_timestamp", "rev_minor_edit", "rev_parent_id", "rev_len", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "...
null
Rotlink-Begriffsklärungen
null
use etwiki_p; SELECT p1.page_title AS "Article", tl_title as "Template", pl_title AS "DAB" FROM templatelinks, page AS p1, pagelinks LEFT JOIN page AS p2 ON p2.page_title = pl_title AND p2.page_namespace = pl_namespace WHERE tl_from = p1.page_id AND tl_from_namespa...
{"runningtime": "483.27", "resultsets": [{"rowcount": 159, "headers": ["comment_id", "comment_hash", "comment_text", "comment_data"]}]}
null
দৈর্ঘ্য অনুযায়ী রবিমাসের বইয়ের অসংশোধিত পাতা
null
use bnwikisource_p; select current_date; select concat("পাতা:", page_title), page_len from page join categorylinks on cl_from = page_id where cl_to = replace("মুদ্রণ সংশোধন করা হয়নি", ' ', '_') and page_namespace = 104 and (page_title like replace('গল্পগুচ্ছ (%',' ','_') or page_title like replace('কথা-চতুষ্টয় ...
{"runningtime": "0.53", "resultsets": [{"rowcount": 25, "headers": ["template", "article"]}]}
null
দৈর্ঘ্য অনুযায়ী বাংলা উইকিসংকলনের স্থায়ীভাবে-আপলোডকৃত দেজাভুসমূহ
null
use bnwikisource_p; select img_name as চিত্রের_নাম, round( ( length(img_metadata) - length(replace(img_metadata, "PAGE", "")) ) / length("PAGE") ) as পাতার_সংখ্যা from image where img_minor_mime='vnd.djvu' order by পাতার_সংখ্যা asc;
{"runningtime": "0.19", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}]}
null
Levels of revision deletion
null
#SELECT @min := MIN(rev_id), @max := MAX(rev_id) FROM revision; SELECT rev_deleted, count(*) FROM revision JOIN page ON page.page_id = revision.rev_page #JOIN (SELECT FLOOR(@min + (@max - @min + 1) * RAND(1)) AS rev_id FROM revision LIMIT 1000000) AS random USING (rev_id) #WHERE rev_timestamp >= 20090130081928 AND rev...
{"runningtime": "0.54", "resultsets": [{"rowcount": 100, "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"]}]}
null
Unpatrolled disambiguation pages
null
SELECT ptrp_page_id, page.page_id, page.page_title FROM pagetriage_page LEFT JOIN page ON ptrp_page_id = page_id WHERE page_namespace = 0 AND ptrp_reviewed = 0 AND page_id IN (SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation') LIMIT 100
{"runningtime": "37.89", "resultsets": [{"rowcount": 38, "headers": ["concat(\"\u0645\u0644\u0641:\",page_title)"]}]}
null
Orphaned articles with more than two incoming links
Articles categorized as orphans that have more than two incoming links.
SELECT CONCAT('[[', p.page_title, ']]'), COUNT(link.pl_from) FROM page p INNER JOIN categorylinks c ON p.page_id = c.cl_from AND c.cl_to = "All_orphaned_articles" INNER JOIN pagelinks link ON p.page_title = link.pl_title AND p.page_namespace = link.pl_namespace INNER JOIN page p2 ...
{"connection_id": 48112148}
null
Undercategorized pages with categories
null
SELECT cl_from, COUNT(*) AS '# Categories', page.page_title FROM categorylinks LEFT JOIN page ON cl_from = page.page_id WHERE cl_from IN (SELECT cl_from FROM categorylinks WHERE cl_to LIKE 'Articles_needing_additional_categories_from_%') AND cl_to NOT LIKE 'All_%' AN...
{"runningtime": "34.81", "resultsets": [{"rowcount": 1, "headers": ["concat(\"\u0642\u0627\u0644\u0628:\",page_title)"]}]}
null
Files with unclear extensions
Should be renamed
USE commonswiki_p; SELECT CONCAT('[[:File:', REPLACE(img_name, '_', ' '), ']]') AS FILE FROM image WHERE img_name LIKE '%.png.jpg' OR img_name LIKE '%.svg.jpg' OR img_name LIKE '%.jpg.png' OR img_name LIKE '%.jpg.svg'
{"runningtime": "44.13", "resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}]}
null
MergeHistory revactor_page bug example
null
USE enwiki_p; select * from revision where rev_page = 59675886
{"connection_id": 57551051}
null
Empty dated categories
null
USE enwikinews_p; SELECT pg.page_title FROM categorylinks cl JOIN page pg ON pg.page_id = cl.cl_from WHERE cl.cl_to IN ( SELECT pg2.page_title FROM categorylinks cl2 JOIN page pg2 ON pg2.page_id = cl2.cl_from WHERE cl2.cl_to LIKE '20__' AND cl2.cl_type = 'subcat' ...
{"resultsets": [{"rowcount": 0, "headers": ["rank", "IFNULL(actor_name, '\u0412\u0441\u044c\u043e\u0433\u043e')", "created", "total_len", "articles"]}], "runningtime": "0.51"}
null
Potential main page featured pictures (1)
Used on GA/FA or FAC, former FA, FARC, GAN
SELECT img.il_from AS pageID, img.il_to AS image FROM imagelinks img WHERE img.il_to IN ( # Image hasn't been featured SELECT pg1.page_title FROM page pg1 WHERE pg1.page_namespace = 6 AND pg1.page_id IN ( SELECT c1.cl_from FROM categorylinks c1 WHERE c1.cl_to = 'Featured_pictures_that_have_not_appea...
{"resultsets": [{"rowcount": 0, "headers": ["page_title", "pl_title"]}], "runningtime": "0.13"}
null
Potential main page featured pictures (2)
Used on non-stubs
SELECT img.il_from AS pageID, img.il_to AS image FROM imagelinks img WHERE img.il_to IN ( # Image hasn't been featured SELECT pg1.page_title FROM page pg1 WHERE pg1.page_namespace = 6 AND pg1.page_id IN ( SELECT c1.cl_from FROM categorylinks c1 WHERE c1.cl_to = 'Featured_pictures_that_have_not_appea...
{"resultsets": [{"rowcount": 18264, "headers": ["page_title", "pl_title"]}], "runningtime": "73.52"}
null
Blocks on nl wiki
T231602
USE nlwiki_p; SELECT CASE WHEN ipb_expiry = 'infinity' THEN 'infinity' WHEN ipb_expiry-ipb_timestamp = 1000000 THEN '1 day' WHEN ipb_expiry-ipb_timestamp = 72000000 THEN '3 days' WHEN ipb_expiry-ipb_timestamp IN (7000000, 7000731, 76000000, 83000000) THEN '1 week' WHEN ipb_expiry-ipb_timestamp = 7000731 THEN '1...
{"resultsets": [{"rowcount": 16, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}], "runningtime": "0.19"}
null
New ores rollbacker
null
use ruwiki_p; select rc_title, max(case when oresm_name="damaging" then oresc_probability else 0 end) oresc_prob_damaging, max(case when oresm_name="goodfaith" then oresc_probability else 0 end) oresc_prob_goodfaith, actor_name, rc_this_oldid from recentchanges join ores_classification on oresc_rev=rc_this_oldid jo...
{"resultsets": [{"rowcount": 30, "headers": ["CONCAT('[[\u0645\u0633\u062a\u062e\u062f\u0645:',actor_name,'|',actor_name,']]')", "COUNT(*)"]}], "runningtime": "12.24"}
null
بوابات من بوابات التصانيف
null
use arwiki_p; select p1.page_title, (select group_concat(distinct cl2.pl_title) from categorylinks cl1 inner join page p2 on p2.page_title = cl1.cl_to inner join pagelinks cl2 on cl2.pl_from = p2.page_id ...
{"connection_id": 86937571}
null
Autoconfirmed users who are confirmed in Fawiki
null
use fawiki_p; SELECT concat ("*", user_name) FROM user JOIN user_groups ON ug_user=user_id WHERE ug_group = 'confirmed';
{"resultsets": [{"rowcount": 1, "headers": ["img_name", "img_size", "img_width", "img_height", "img_metadata", "img_bits", "img_media_type", "img_major_mime", "img_minor_mime", "img_description_id", "img_actor", "img_timestamp", "img_sha1"]}], "runningtime": "0.11"}
null
Monumental-glam: count of unique pages edited
null
USE wikidatawiki_p; SELECT COUNT( DISTINCT(r.rev_page) ) as num_pages FROM wikidatawiki_p.revision r JOIN change_tag ON r.rev_id=change_tag.ct_rev_id WHERE change_tag.ct_tag_id=604 -- OAuth CID: 1311
{"resultsets": [{"rowcount": 0, "headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment", "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...
null
Top users of Suggested Edits feature on Android
A leaderboard of top 10 Android editors by number of title description edits *made through the Suggested Edits feature*, including the number of days those edits were made over.
SET STATEMENT max_statement_time = 120 FOR USE wikidatawiki_p; SELECT rev_actor, COUNT(*) AS n_total_edits, -- not all edits, just total Suggested Edits edits COUNT(DISTINCT LEFT(rev_timestamp, 8)) AS n_days_usage, u.user_name as user_name, u.user_editcount as edit_count, a.actor_name as username FROM revis...
{"connection_id": 88638951}
null
Distribution of registration time for users with 5+ edits (huwiki)
See https://quarry.wmflabs.org/query/37312 for enwiki. See https://quarry.wmflabs.org/query/37314 for 25+ edits.
use huwiki_p; SELECT CONCAT(SUBSTR(user_registration, 1, 4), 'q', (SUBSTR(user_registration, 5, 2) - 1) DIV 3 + 1) AS registration_date, -- SUBSTR(user_registration, 1, 6) AS registration_date, count(*) AS new_users FROM ( SELECT user_id, user_registration, count(*) AS recent_edits FROM user JOIN ...
{"resultsets": [{"rowcount": 1, "headers": ["COUNT(pl_title)"]}], "runningtime": "625.65"}
null
Distribution of registration time for users with 25+ edits (huwiki)
See https://quarry.wmflabs.org/query/37313 for 5+ edits.
use huwiki_p; SELECT CONCAT(SUBSTR(user_registration, 1, 4), 'q', (SUBSTR(user_registration, 5, 2) - 1) DIV 3 + 1) AS registration_date, -- SUBSTR(user_registration, 1, 6) AS registration_date, count(*) AS new_users FROM ( SELECT user_id, user_registration, count(*) AS recent_edits FROM user JOIN ...
{"resultsets": [{"rowcount": 1, "headers": ["COUNT(page_title)"]}], "runningtime": "1.59"}
null
Italian surnames from English Wiktionary
Alternative to Wikidata approach https://w.wiki/34s to focus on language rather than nationality
USE enwiktionary_p; SELECT page_title FROM page JOIN categorylinks ON page_id = cl_from AND page_namespace = 0 WHERE cl_to = 'Italian_surnames';
{"resultsets": [{"rowcount": 5, "headers": ["totale", "page_count_error", "weight"]}, {"rowcount": 470, "headers": ["page_id", "page_title", "totale", "linter_params", "ptotale"]}], "runningtime": "2.46"}
null
Commons fawiki featured pictures
null
use commonswiki_p; select distinct concat("File:", page_title) from page join categorylinks on cl_from = page_id where cl_to = 'Featured_pictures_on_Wikipedia,_Persian' and cl_type = 'file';
{"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 798}], "runningtime": "4.85"}
null
Test
null
/* Indiquer le numéro de l'espace de nom cible ci-dessous */ SET @numero_espace_de_nom = 9; /* List des espaces de noms : 0 : (Principal) 1 : Discussion 2 : Utilisateur 3 : Discussion utilisateur 4 : Wikipédia 5 : Discussion Wikipédia 6 : Fichier 7 : Discussion fichier 8 : MediaWiki 9 : Discussion MediaWiki 1...
{"resultsets": [{"headers": ["page_title", "sum(revert_count)"], "rowcount": 30}], "runningtime": "269.28"}
null
zhwiki include Copyvio but not in CV
null
USE zhwiki_p; SELECT page_title FROM ( SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_from_namespace = 0 AND tl_title = 'Copyvio') t1 LEFT JOIN page ON tl_from = page_id LEFT JOIN ( SELECT pl_title, pl_namespace FROM pagelinks WHERE pl_from = 6496 /*AND pl_namespace = 0*/ ) t2 ON pl_t...
{"resultsets": [{"rowcount": 99, "headers": ["page_title"]}], "runningtime": "1.03"}
null
es.wiki's long talk pages
null
USE eswiki_p; SELECT CONCAT('#[[', page_title, ']] - ', page_len) FROM page WHERE page_is_redirect = 0 AND page_namespace = 1 ORDER BY page_len DESC LIMIT 500
{"resultsets": [{"headers": ["page_title", "page_touched"], "rowcount": 300}], "runningtime": "1.95"}
null
Ruwiki inactive users
null
USE ruwiki_p; SELECT actor_name AS username FROM ( SELECT actor_name, MAX(rev_timestamp) last_edit FROM revision_userindex JOIN actor ON rev_actor = actor_id # WHERE actor_user != NULL GROUP BY rev_actor ) users WHERE last_edit <= "20170101000000";
{"resultsets": [{"headers": ["tl_title", "num"], "rowcount": 1654}], "runningtime": "45.44"}
null
Ruwiki user subpages
null
USE ruwiki_p; SELECT page_title FROM page WHERE page_namespace = 2 AND page_content_model = "wikitext" AND page_title LIKE "%/%";
{"resultsets": [{"headers": ["actor_id"], "rowcount": 1}], "runningtime": "0.27"}
null
WikiDaheim users 2019 (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...
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 31}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 6}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 12}], "runningtime": "4.49"}
null
WikiDaheim 2019 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_...
{"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 5}, {"headers": ["page_id", "page_title", "totale", "linter_params", "ptotale"], "rowcount": 450}], "runningtime": "5.24"}
null
WikiDaheim 2019 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_...
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "el_from", "el_to"], "rowcount": 11}], "runningtime": "0.46"}
null
Files with duplicate extensions
Should be renamed
#USE itwiki_p; SELECT img_name FROM image WHERE img_name LIKE '%.png.png' OR img_name LIKE '%.PNG.PNG' OR img_name LIKE '%.jpg.jpg' OR img_name LIKE '%.Jpg.Jpg' OR img_name LIKE '%.JPG.JPG' OR img_name LIKE '%.svg.svg' OR img_name LIKE '%.SVG.SVG' OR img_name LIKE '%.mid.mid' OR img_name LIKE '%.MID.MID' OR img_name LI...
{"resultsets": [{"headers": ["CONCAT('Talk:', page_title)"], "rowcount": 10}], "runningtime": "0.51"}
null
zhwikt Appendix in ns 0
null
USE zhwiktionary_p; SELECT page_id, page_namespace, page_title FROM page WHERE page_title LIKE 'Appendix%' AND page_namespace = 0
{"resultsets": [{"headers": ["CONCAT('# [[:File:', page_title, ']]')"], "rowcount": 62}], "runningtime": "5.24"}
null
Wikisource Page Size Average
null
use hiwikisource_p; select avg(page_len) from page where page_namespace = 0
{"resultsets": [{"headers": ["page_title", "pl_from"], "rowcount": 68}], "runningtime": "2.21"}
null
namespace 2, page_touched, the oldest
null
USE commonswiki_p; SELECT CONCAT("Category:",page_title,"") FROM page AS page WHERE page_namespace = 14 AND page_is_redirect = 1 AND (page_title LIKE "%animat%" OR page_title LIKE "%Animat%" ) LIMIT 1999;
{"resultsets": [{"headers": ["user_name", "DATE_FORMAT(user_registration, \"%D/%M/%Y %H:%i:%s\")"], "rowcount": 12}], "runningtime": "0.13"}
null
Wikinews articles missing items
null
USE enwikinews_p; SELECT REPLACE(page.page_title, '_', ' ') AS 'Title', categorylinks.cl_to AS 'Date' FROM page JOIN categorylinks ON cl_from = page_id WHERE NOT EXISTS ( SELECT 1 FROM page_props WHERE pp_page = page_id AND pp_propname IN ( 'wikibase_item', 'disambiguation' ) ) AND page_namespace = 0 AND page_i...
{"resultsets": [{"headers": ["user_id", "user_name", "user_editcount"], "rowcount": 1}], "runningtime": "0.15"}
null
enwiki inactive special users
null
use enwiki_p; SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', GROUP_CONCAT(ug1.ug_group) AS 'user_groups' FROM `user` LEFT JOIN user_groups ug1 ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop', 'abusefilter', 'abusefilter-helper', 'templateeditor', 'accountcreator', 'bureaucrat'...
{"resultsets": [{"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", "rc_logid", "rc_log_type", "rc_log_acti...
null
Categories to diffuse without sub categories
Shouldn't be tagged
SELECT cl_to FROM categorylinks WHERE cl_to IN ( SELECT page_title FROM page LEFT JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE cl_to = 'Categories_requiring_diffusion') AND cl_to NOT IN ( SELECT DISTINCT cl_to FROM categorylinks WHERE cl_type = '...
{"resultsets": [{"headers": ["log_title", "COUNT(*)"], "rowcount": 3498}], "runningtime": "15.91"}
null
Unpatrolled dab pages
null
SELECT CONCAT( '[[', page_title, ']]' ) FROM page JOIN pagetriage_page ON page_id = ptrp_page_id JOIN page_props ON page_id = pp_page WHERE ptrp_reviewed = 0 AND page_namespace = 0 AND page_is_redirect = 0 AND pp_propname = 'disambiguation' LIMIT 100;
{"connection_id": 116287116}
null
All in Living people
Get all the IDs of the pages in Living people
SELECT cl_from FROM categorylinks WHERE categorylinks.cl_to = "Living_people"
{"connection_id": 1622368}
null
21737 + user
null
use fawiki_p; select page_title, first_ts as created_on, actor_name as created_by from ( select page_id, page_title, min(r1.rev_timestamp) as first_ts from page join revision r1 on page_id = r1.rev_page and page_namespace = 0 and page_is_redirect = 0 group by page_title ) t join re...
{"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage", "commonspage"], "rowcount": 4000}], "runningtime": "90.59"}
null
Top users of Suggested Edits feature on Android
A leaderboard of top 10 Android editors by number of title description edits *made through the Suggested Edits feature*, including the number of days those edits were made over.
SET STATEMENT max_statement_time = 120 FOR USE wikidatawiki_p; SELECT rev_user_text AS username, COUNT(*) AS n_total_edits, -- not all edits, just total Suggested Edits edits COUNT(DISTINCT LEFT(rev_timestamp, 8)) AS n_days_usage FROM revision_userindex LEFT JOIN `comment` ON revision_userindex.rev_comment_id = `...
{"runningtime": "0.24", "resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "pr_page", "pr_type", "pr_level", "pr_cascade", "pr_us...
null