title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Список ботів
null
SELECT `user`.user_name, 'bot' FROM `user` JOIN user_groups ON user_groups.ug_user = `user`.user_id WHERE `user_groups`.ug_group = 'bot'
{"resultsets": [{"headers": ["Maddeler"], "rowcount": 0}], "runningtime": "0.05"}
eswiki_p
Робили редагування минулого місяця
null
SELECT actor.actor_name, count(rev_id) cnt FROM revision JOIN page on page.page_id = revision.rev_page JOIN actor ON revision.rev_actor = actor.actor_id WHERE page.page_namespace = 0 GROUP BY rev_actor HAVING cnt > 1000 ORDER BY cnt DESC
{"resultsets": [{"headers": ["Maddeler"], "rowcount": 0}], "runningtime": "0.05"}
eswiki_p
Templates about KSA without WP:KSA banner (arwiki)
null
use arwiki_p; select concat('* [[:قالب:',page_title,']]') from page where page_namespace=10 and page_is_redirect=0 and (page_title like "%السعودية%" or page_title like "%سعودي%" or page_title like "%حائل%" ...
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 60}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 8}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 16}], "runningtime": "0.55"}
arwiki
Files on ml.wiki NOT in spec categories (no license)
null
#USE viwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file, actor_name #, GROUP_CONCAT(c.cl_from SEPARATOR ' ¤¤¤ ') FROM templatelinks JOIN page ON tl_from = page_id JOIN image ON img_name = page_title AND page_namespace = 6 JOIN actor_image ON img_actor = actor_id AND page_is_redirect=0 AND NOT EXISTS( SELE...
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 204}], "runningtime": "16.87"}
mlwiki_p
Ranges /24 per number of open proxy blocks
null
SET STATEMENT max_statement_time = 600 FOR WITH proxy_blocks AS ( SELECT ip24, c FROM ( SELECT ip24, count(*) AS c FROM ( SELECT DISTINCT ipb_address, REGEXP_REPLACE(ipb_address, '\.[0-9]+(/[0-9]+)?$', '.0/24') AS ip24 FROM ipblocks ...
{"resultsets": [{"headers": ["@from", "@to"], "rowcount": 1}, {"headers": ["count(rev_id)"], "rowcount": 1}], "runningtime": "0.14"}
enwiki_p
Recent reverted /24 ranges per number of IPs
null
SET STATEMENT max_statement_time = 60 FOR SELECT ip24, c FROM ( SELECT CONCAT(ip24, '.0/24') AS ip24, count(*) AS c FROM ( SELECT DISTINCT actor_name, REGEXP_REPLACE(actor_name, '\.[0-9]+$', '') AS ip24 FROM recentchanges_userindex AS recentcha...
{"resultsets": [{"headers": ["@from", "@to"], "rowcount": 1}, {"headers": ["count(rev_id)"], "rowcount": 1}], "runningtime": "0.16"}
enwiki_p
zhp.pl on plwiki
null
select concat('pl.wikipedia.org/?curid=', page_id) as page_url, page_namespace as namespace, page_title as title, el_to as external_link from externallinks join page on page_id = el_from where el_index like 'http://pl.zhp%';
{"resultsets": [{"headers": ["afh_id", "afh_filter", "afh_user", "afh_user_text", "afh_timestamp", "afh_pattern", "afh_comments", "afh_flags", "afh_public_comments", "afh_actions", "afh_deleted", "afh_changed_fields", "afh_group"], "rowcount": 100}], "runningtime": "0.72"}
plwiki
zhp.pl on enwiki
null
select concat('en.wikipedia.org/?curid=', page_id) as page_url, page_namespace as namespace, page_title as title, el_to as external_link from externallinks join page on page_id = el_from where el_index like 'https://pl.zhp%' limit 200;
{"resultsets": [{"headers": ["afh_id", "afh_filter", "afh_user", "afh_user_text", "afh_timestamp", "afh_pattern", "afh_comments", "afh_flags", "afh_public_comments", "afh_actions", "afh_deleted", "afh_changed_fields", "afh_group"], "rowcount": 17}], "runningtime": "0.70"}
enwiki
Tewiki:AP Village pages without census data
null
SELECT page_title,page_len FROM page,categorylinks where page_id=cl_from and (cl_to = 'ఆంధ్రప్రదేశ్_గ్రామాలు' OR cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'ఆంధ్రప్రదేశ్_గ్రామాలు' and cl_type = 'subcat' ) OR cl_to IN (select page_titl...
{"resultsets": [{"headers": ["il_to"], "rowcount": 1298}], "runningtime": "2.37"}
tewiki
Redirects created to articles at AfD
This query lists pages which redirect to articles at AfD but were recently of article length. Such pages risk deletion per G8 along with the AfD candidate, losing a potentially useful history. Ps is the redirect's source page (beginning #REDIRECT); Pd is its destination (the endangered article). rfn=redirect from na...
SET STATEMENT max_statement_time = 100 FOR SELECT Ps.page_namespace AS rfn, Ps.page_title AS redirect, Pd.page_title AS article, actor_name AS redirector, rc_timestamp FROM linktarget JOIN templatelinks ON tl_from_namespace = 0 AND tl_target_id = lt_id JOIN page Pd ON Pd.page_id = tl_from JOIN redirect ON rd_title = P...
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 557}], "runningtime": "5.24"}
enwiki_p
Change tag list
null
SELECT *from change_tag_def
{"resultsets": [{"headers": ["page_title"], "rowcount": 7418}], "runningtime": "34.89"}
enwiki_p
Tewiki: Disambig pages with red links
null
select page_title,count(page_title) redlinksCount from pagelinks pl,page #join page on page_id=pl_from where page_id = pl_from and page_id in (select pp_page from page_props where pp_propname ="disambiguation") and pl_namespace = 0 and page_namespace = 0 and not exists (select page_title ...
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 555}], "runningtime": "4.80"}
tewiki
SHOW TABLES
null
SHOW TABLES;
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 5}], "runningtime": "44.87"}
zhwikiquote
Tewiki:People pages sans Infobox
null
SELECT distinct page_title FROM page p1,categorylinks where p1.page_id not in (select tl_from from templatelinks where tl_from_namespace =0 and tl_namespace =10 and p1.page_is_redirect=0 and (tl_title like "%సమాచారపెట్టె%" or tl_...
{"resultsets": [{"headers": ["user_name", "last_edit"], "rowcount": 163}], "runningtime": "0.23"}
tewiki
Files with EXIF rotation
null
SELECT img_name FROM image WHERE img_metadata LIKE '%Orientation";i:3%' #6 is standard '%Orientation";i:8%' # For files rotated in other ways, run the query with 6 changed to 3 or 8. The value can also be 2 if the file is mirrored, or 4, 5 or 7 if the file is both rotated and mirrored. However, the remaining files with...
{"resultsets": [{"headers": ["page_title"], "rowcount": 398}], "runningtime": "0.39"}
jawiki_p
Very long talk pages with no automatic archiving
null
SELECT DISTINCT talkpage.page_title, talkpage.page_len FROM page talkpage INNER JOIN templatelinks ON templatelinks.tl_from = talkpage.page_id WHERE talkpage.page_namespace = 1 AND talkpage.page_title IN (SELECT pg.page_title FROM page pg WHERE pg.page_namespace = 0) AND talkpage.page_len > 100000 AND talkpage.page_id ...
{"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 200}], "runningtime": "41.78"}
enwiki_p
Files with extension that can't be uploaded anymore
null
SELECT concat("File:", img_name) FROM image WHERE img_name NOT RLIKE "\.([pP][nN][gG]|[jJ][pP][eE]?[gG]|[sS][vV][gG]|[tT][iI][fF]?[fF]|[gG][iI][fF]|[wW][eE][bB][pPmM]|[mM][pP][eE]?[gG]|[mM][iI][dD][iI]?|[oO][gG][gGvVaA]|[mM][pP][3]|[wW][aA][vV]|[xX][cC][fF]|[dD][jJ][vV][uU]|[fF][lL][aA][cC]|[oO][pP][uU][sS]|[pP][dD][fF...
{"resultsets": [{"headers": ["pagina", "enlace"], "rowcount": 18}], "runningtime": "9.38"}
enwiki
উপাত্ত আরবি লেবেল
null
SELECT CONCAT('# [[আলাপ:',page_title,']]') FROM page LEFT JOIN pagelinks ON pl_title = page_title AND pl_namespace = page_namespace WHERE pl_namespace IS NULL AND page.page_namespace =1 AND page.page_is_redirect = 1 ;
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 10}], "runningtime": "0.10"}
bnwiki_p
nlwiki Top 25 manual patrollers of 2022
excluding autopratrol
SELECT ROW_NUMBER() OVER (ORDER BY `count` DESC) AS '#', actor_user AS `user ID`, actor_name AS `user name`, COUNT(actor_id) AS `count` FROM logging, actor WHERE log_timestamp REGEXP '^2022' AND log_type='patrol' AND log_action='patrol' AND log_actor=actor_id GROUP BY actor_id ORDER BY `count` DESC LIMIT 25
{"resultsets": [{"headers": ["db", "count(*)", "sum(img_size)"], "rowcount": 6}], "runningtime": "0.38"}
nlwiki
Reviewer stats (bnwiki)
null
use bnwiki_p; SELECT user_name user, count(*) as review_cnt FROM logging JOIN actor ON log_actor = actor_id JOIN user ON actor_user = user_id WHERE log_type = 'review' AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i') #AND log_timestamp > CONCAT( YEAR( DATE_SUB( NOW(), INTERVAL...
{"resultsets": [{"headers": ["creation_date", "extension_name", "page_creator"], "rowcount": 174}], "runningtime": "0.38"}
bnwiki_p
Most active editors at Gujarati Wikipedia (last 90 days)
null
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -120 DAY), "%Y%m%d%H%i%s")); SELECT COUNT(*) AS 'Edits', actor_name AS `User` FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id WHERE rev_id >= @rev GROUP BY `User` ORDER...
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 10}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 3}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 5}], "runningtime": "0.14"}
simplewiki_p
Linked miscapitalizations
null
SELECT CONVERT(p1.page_title USING utf8), COUNT(*) FROM page AS p1 JOIN categorylinks ON p1.page_id = cl_from JOIN pagelinks ON p1.page_title = pl_title AND pl_namespace = 0 JOIN page AS p2 ON pl_from = p2.page_id AND p2.page_namespace = 0 ...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "2.29"}
enwiki
User name - actor id
null
/* USE trwiki_p; SELECT user_name, user_id FROM user ORDER BY user_id ASC LIMIT 10; */ USE trwiki_p; SELECT user_name, user_id, actor_id FROM actor, user WHERE user_name = actor_name AND user_name = "Vo·cê";
{"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 0}], "runningtime": "0.05"}
trwiki_p
Enwiki user count data
enwiki user analysis
SELECT * from user LIMIT 455;
{"resultsets": [{"headers": ["Page", "Page length", "Re-created at"], "rowcount": 5}], "runningtime": "0.58"}
enwiki
nlwiki Suspicious IMDb links
https://nl.wikipedia.org/wiki/Gebruiker:Bdijkstra/quarry/IMDb Takes a few seconds with recentchanges and ~1 minute without.
SELECT CONCAT('[',el_to,' ',REGEXP_SUBSTR(el_to,'/[a-z]+/.*'),']') AS el_to, CONCAT('[[:',REPLACE(page_title,'_',' '),']]') AS page_title FROM (SELECT DISTINCT rc_cur_id FROM recentchanges WHERE rc_type IN (0,1) AND rc_namespace=0) rc INNER JOIN page ON rc_cur_id=page_id INNER JOIN externallinks ON el_from=rc_cu...
{"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_type", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 1346}], "runningtime": "2.72"}
nlwiki
Most popular individual edited pages
List of a user's top edited pages
SELECT page_namespace, page_title, COUNT(rev_id) AS edits FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id) LEFT JOIN page ON (revision.rev_page = page.page_id) WHERE actor.actor_name = "DHN" GROUP BY page_namespace, page_title ORDER BY edits DESC LIMIT 20;
{"resultsets": [{"headers": ["actor_name"], "rowcount": 0}], "runningtime": "0.06"}
viwiki_p
File pages with extension that can't be uploaded anymore
null
SELECT concat("File:", page_title) AS file FROM page WHERE page_namespace = 6 AND IFNULL(LOWER(CONVERT(SUBSTRING_INDEX(page_title, ".", -1) USING ascii)), '') NOT IN ("png", "jpg", "jpeg", "svg", "tif", "tiff", "gif", "webm", "webp", "mpg", "mpeg", "mid", "midi", "ogg", "ogv", "oga", "mp3", "wav", "xcf", "djvu", "flac"...
{"resultsets": [{"headers": ["Potential untagged #SheSaid articles", "Wikidata item", "Creator", "Date created", "Length"], "rowcount": 7}], "runningtime": "27.73"}
enwiki
h
null
SELECT CONCAT("Template:", lt_title) as tmpl, COUNT(*) as cnt FROM templatelinks JOIN linktarget ON tl_target_id = lt_id WHERE lt_namespace = 10 GROUP BY tl_target_id HAVING cnt > 2000 ORDER BY cnt DESC;
{"resultsets": [{"headers": ["user_talk"], "rowcount": 16329}], "runningtime": "7525.48"}
bnwiki
AfC review counts, last year
Credit to KylieTastic, who I forked this from so I could pull the latest data.
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, count(rc_id) as reviews, actor_name, SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", ...
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 42}], "runningtime": "1.48"}
enwiki
it.wiki files without license
null
SELECT CONCAT('# [[:File:', page_title, ']]') as filename FROM page WHERE page_namespace = 6 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT cl_from FROM categorylinks WHERE cl_to = 'Autorizzate_per_Wikipedia' OR cl_to LIKE 'Copertine_d%' OR cl_to LIKE 'Copyright%' OR cl_to = '...
{"resultsets": [{"headers": ["el_to"], "rowcount": 500}], "runningtime": "0.45"}
itwiki_p
My AfC stats (reviews, accepts, declines...)
null
select count(rev_id) as reviews, SUM(comment_text like "% has been accepted (%") as "accept", SUM(comment_text like "%declined ([[WP:AFCH%") as "decline", SUM(comment_text like "% has been rejected (%") as "reject", concat(round(SUM(comment_text like "% has been accepted (%") * 100 / count(rev_i...
{"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 4761}], "runningtime": "29.57"}
enwiki
Deletion Ratios for one wiki during 2020
Example data for task https://phabricator.wikimedia.org/T246324. Shows ratio of main namespace articles that were created using Content Translation and not using Content Translation and subsequently deleted. This sample works for the Hungarian Wikipedia (huwiki) for 2019.
set @dbname = 'gdwiki'; set @ct_tag_id = ( select ctd_id from change_tag_def where ctd_name = 'contenttranslation' ); set @created_total = ( select count(rev_id) from page, revision where page_id = rev_page and page_namespace = 0 and rev_timestamp like '2022%' and ...
{"resultsets": [{"headers": ["Page", "Page length", "Re-created at"], "rowcount": 270}], "runningtime": "14.35"}
gdwiki_p
Comment search recent (rd)
null
SET STATEMENT max_statement_time = 600 FOR SELECT DISTINCT actor_name, rc_this_oldid, comment_text FROM recentchanges_userindex AS recentchanges INNER JOIN comment_recentchanges AS comment ON recentchanges.rc_comment_id = comment.comment_id INNER JOIN actor_recentchanges AS actor ON recentchanges.rc_actor =...
{"resultsets": [{"headers": ["user_name"], "rowcount": 1580}], "runningtime": "67.93"}
enwiki
lista redaktorów plwikisource z ponad 10 edycjami w ostatnim 3/4 roku
lista redaktorów plwikisource z ponad 10 edycjami w ostatnim roku
USE plwikisource_p; SELECT actor_name FROM (SELECT COUNT(*) AS n, actor_name FROM revision JOIN actor ON rev_actor = actor_id JOIN user_groups ON actor_user = ug_user JOIN page ON page_id = rev_page WHERE ug_group = 'editor' AND rev_timestamp > '20220101000000' AND rev_timestamp < '...
{"resultsets": [{"headers": ["page_title"], "rowcount": 242}], "runningtime": "26.82"}
plwikisource_p
All files on fa.wiki with no license
null
#USE glwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file #, # img_timestamp AS img_creation # ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp. FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN categorylinks ON cl_from = page_id A...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 8746}], "runningtime": "204.26"}
fawiki_p
Query sandbox 2
null
SELECT page_title, rev_timestamp, page_latest, page_len, actor_name, user_editcount, ( SELECT COUNT(*) FROM page WHERE page_namespace = 4 AND page_title = CONCAT('Articles_for_deletion/', p.page_title) -- exclude current AfDs AND page_id NOT IN (SELECT...
{"resultsets": [{"headers": ["Articles with talk page redirects"], "rowcount": 2556}], "runningtime": "75.98"}
enwiki
Cyclone-related usernames on enwiki
null
SELECT `user_name` AS `Name`, IF(ipb_sitewide = 1, "Y", NULL) as `Currently Blocked`, DATE_FORMAT(`user_registration`, '%Y-%m-%d %H:%i:%s') AS `Registration`, `user_editcount` AS `Edit Count` FROM `user` LEFT JOIN ipblocks ON user_id = ipb_user WHERE LCASE(CONVERT(`user_name` USING utf8)) LIKE '%cycl...
{"resultsets": [{"headers": ["CONCAT('# [[:File:', page_title, ']]')"], "rowcount": 6}], "runningtime": "3.27"}
enwiki_p
sandbox
null
SELECT COUNT(*) FROM category;
{"resultsets": [{"headers": ["page_title"], "rowcount": 4}], "runningtime": "0.08"}
enwiki
AfC deleted declined/rejected reviews, last month
As you can no longer see deleted article comments, for those who leave user messages on rejection, find deleted AfC decline/rejects
select SUM(comment_text like "% has been declined (%") + SUM(comment_text like "% has been rejected (%") - SUM(comment_text like "Declining submission:%") - SUM(comment_text like "Rejecting submission:%") as declined_then_deleted, actor_name from recentchanges_userindex left join actor on rc_actor = actor_id left joi...
{"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8371}], "runningtime": "17.88"}
enwiki
Статистика использования стаб-шаблонов
Stub templates in ruwiki by transclusion
SELECT lt.lt_title, count(lt.lt_title) FROM templatelinks AS t LEFT JOIN linktarget AS lt ON lt.lt_id = t.tl_target_id AND lt.lt_namespace = 10 LEFT JOIN page AS p ON p.page_title = lt.lt_title WHERE t.tl_from_namespace = 0 AND EXISTS ( SELECT NULL FROM categorylinks AS c WHERE c...
{"connection_id": 116473312}
ruwiki_p
Most used templates on bnwiki
null
SELECT DISTINCT CONCAT("{{S|",page_title,"}}") AS template, COUNT(DISTINCT tl_from) AS counting, pr_type, pr_level FROM page JOIN templatelinks ON page_title = tl_title AND tl_namespace = 10 AND tl_from_namespace = 0 LEFT JOIN page_restrictions ON pr_page = page_id WHERE page_namespace = 10 AND page_is_redirect = 0 /...
{"runningtime": "0.11", "resultsets": [{"headers": ["ptrt_tag_id", "ptrt_tag_name", "ptrt_tag_desc"], "rowcount": 21}]}
igwiki_p
hewiki most prolific translators
null
use ltwiki_p; SELECT rev_actor, actor_name, count(revision.rev_id) as articles_created FROM change_tag, actor, revision WHERE revision.rev_parent_id = 0 AND ct_tag_id = (select ctd_id from change_tag_def where ctd_name = 'contenttranslation') AND rev_id = ct_rev_id AND rev_actor = actor_id GROUP BY rev_acto...
{"runningtime": "1.51", "resultsets": [{"rowcount": 1000, "headers": ["ptrpt_page_id", "ptrpt_tag_id", "ptrpt_value"]}]}
ltwiki_p
fawiki editors still active after 15 years
null
select distinct rc_actor, actor_name from actor join recentchanges on actor_id = rc_actor and rc_source = 'mw.edit' join user on actor_user = user_id where user_registration < '20060324000000' limit 100
{"runningtime": "5.63", "resultsets": [{"headers": ["page_title"], "rowcount": 28}]}
arwiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "10.27", "resultsets": [{"headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}]}
commonswiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "7.64", "resultsets": [{"rowcount": 188, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
commonswiki_p
Wikidata edits with wikimedia-commons-app tag (change_tag_def)
null
USE wikidatawiki_p; SELECT rev_id, actor_name, page_title FROM change_tag JOIN revision ON rev_id=ct_rev_id JOIN actor ON actor_id=rev_actor JOIN page ON page_id=rev_page WHERE ct_tag_id=( SELECT ctd_id FROM change_tag_def WHERE ctd_name='wikimedia-commons-app' ) AND NOT actor_name IN ('Github-wiki-bot') # This...
{"runningtime": "0.08", "resultsets": [{"rowcount": 3, "headers": ["ug_group"]}]}
wikidatawiki
Most pending changes accepts (last 30 days)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' AND DATEDIFF(NOW(), log_timestamp) < 30 GROUP BY log_actor ORDER BY manual_accept...
{"runningtime": "563.25", "resultsets": [{"rowcount": 220, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lar", "CONCAT('\"',ips_site_page,'\"')"]}]}
enwiki
Current active Wikipedia sysops
null
SELECT user_name, user_editcount, rev_timestamp AS 'Last edit', CONCAT(substr(log_timestamp,1,4),"-",substr(log_timestamp,5,2), "-",substr(log_timestamp,7,2)," ",substr(log_timestamp,9,2)+7,":",substr(log_timestamp,11,2)) as 'Last Log', ug1.ug_group AS 'user_group' FROM `user` LEFT JOIN user_groups ug1 ON user_id =...
{"connection_id": 22504043}
idwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "4.79", "resultsets": [{"headers": ["Edits", "User", "Rights"], "rowcount": 50}]}
enwiki
talk page
null
SELECT page_title FROM page p1 WHERE p1.page_namespace = 0 AND p1.page_is_redirect = 0 AND NOT EXISTS (SELECT NULL FROM categorylinks c1 WHERE c1.cl_from = p1.page_id AND cl_to = "All_disambiguation_pages") AND NOT EXISTS (SELECT NULL FROM page p2 WHERE p2.page_namespace = "1" and p2.page_title = p1.page_title) LIMIT 5...
{"runningtime": "0.17", "resultsets": [{"headers": ["actor_name", "Edits"], "rowcount": 10}]}
enwiki
Long pages not in Special:LongPages
null
-- Generated from siteinfo-namespaces in the dump; -- namespaces.name is the local name, not the canonical name. with namespace(id, name) as ( values (-2, 'Media'), (-1, 'Special'), (0, ''), (1, 'Talk'), (2, 'User'), (3, 'User talk'), (4, 'Wiktionary'), (5, 'Wiktionary talk'), (6, 'F...
{"runningtime": "0.15", "resultsets": [{"rowcount": 10, "headers": ["actor_name", "Edits"]}]}
enwiktionary_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "1438.78", "resultsets": [{"rowcount": 76, "headers": ["tl_title"]}]}
commonswiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "0.08", "resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace"], "rowcount": 3}]}
commonswiki_p
2021 eligible voters for Board elections - v1
null
use satwiki_p; select concat('[[User:', user_name, '|]]'), concat(left(log_timestamp, 4), '-', mid(log_timestamp, 5, 2), '-', mid(log_timestamp, 7, 2)) as acct_created, concat(left(first_timestamp, 4), '-', mid(first_timestamp, 5, 2), '-', mid(first_timestamp, 7, 2)) as first_edit, concat('{{formatnum:', fivehu...
{"runningtime": "52.63", "resultsets": [{"rowcount": 0, "headers": ["wikitext"]}]}
satwiki_p
2021 eligible voters for Board elections - v2
null
-- use hiwiki_p; select concat('[[User:', user_name, '|]]'), concat(left(log_timestamp, 4), '-', mid(log_timestamp, 5, 2), '-', mid(log_timestamp, 7, 2)) as acct_created, concat(left(first_timestamp, 4), '-', mid(first_timestamp, 5, 2), '-', mid(first_timestamp, 7, 2)) as first_edit, concat('{{formatnum:', five...
{"runningtime": "2.62", "resultsets": [{"headers": ["concat('* [[:',page_title,']]')"], "rowcount": 74}]}
hiwiki_p
2021 eligible voters for Board elections - v3
null
use tewiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "0.96", "resultsets": [{"rowcount": 23, "headers": ["\u0645", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u0625\u0646\u0634\u0627\u0621\u0627\u062a"]}]}
tewiki_p
2021 eligible voters for Board elections - FINAL
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use hiwiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "0.16", "resultsets": [{"headers": ["\u0645", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a"], "rowcount": 45}]}
hiwiki_p
2021 PLwiki eligible voters for Board elections
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use plwiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "0.27", "resultsets": [{"headers": ["\u0645", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a"], "rowcount": 75}]}
plwiki_p
2021 itwp eligible voters for Board elections
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use itwiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"connection_id": 20556018}
itwiki_p
2021 eligible voters for Board elections - Russian
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use ruwiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "52.12", "resultsets": [{"rowcount": 10, "headers": ["page_title", "rev_timestamp"]}]}
ruwiki_p
jawp: File names that blacklisted on commons
null
select * from image as I -- https://commons.wikimedia.org/wiki/MediaWiki:Filename-prefix-blacklist where ( I.img_name like "CIMG%" # Casio or I.img_name like "DSC!_%" escape "!" # Nikon or I.img_name like "DSCF%" # Fuji or I.img_name like "DSCN%" # Nikon or I.img_name like "DUW%" # some mobile phones or I.img_name ...
{"runningtime": "5.53", "resultsets": [{"rowcount": 3633, "headers": ["y", "m", "d", "h", "c"]}]}
jawiki_p
Count of user sandbox modules per user on English Wiktionary
null
select user, user_sandbox_module_count, user_id is not null as user_exists from ( select replace( substring_index( right(page_title, length(page_title) - length('User:')), '/', 1 ), '_', ' ' ) as user, c...
{"runningtime": "91.81", "resultsets": [{"rowcount": 29595, "headers": ["y", "m", "d", "h", "c"]}]}
enwiktionary_p
Pages that transclude themselves in English Wiktionary
null
select page_namespace, page_title, tl_namespace, tl_title from templatelinks join page on page_id = tl_from where page_namespace = tl_namespace and page_title = tl_title limit 1000;
{"runningtime": "0.12", "resultsets": [{"rowcount": 5, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]}
enwiktionary_p
2021 eligible voters for Board elections - Korean
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use kowiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "16.78", "resultsets": [{"headers": ["Edits", "User"], "rowcount": 350}]}
kowiki_p
[Duplicate;ja] - 2021 eligible voters for Board elections
Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only.
use jawiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "0.10", "resultsets": [{"headers": ["Edits", "User"], "rowcount": 32}]}
jawiki_p
Deleted X entries on English Wiktionary (mostly snowclones)
See https://en.wiktionary.org/wiki/Appendix:English_snowclones
select replace(log_title, '_', ' ') as title, actor_name as deleter, comment_text as summary, date_format(log_timestamp, '%Y-%m-%d %H:%i:%s') as timestamp from logging join comment on comment_id = log_comment_id join actor on actor_id = log_actor where log_type = 'delete' and log_action = 'delete' and l...
{"runningtime": "1.53", "resultsets": [{"rowcount": 10, "headers": ["Edits", "User"]}]}
enwiktionary_p
2021 eligible voters for Board elections - Bashkir
null
use bawiki_p; select user_name, twofifty.cnt as edits, onefive.cnt as recent_edits from user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits pri...
{"runningtime": "34.45", "resultsets": [{"headers": ["Edits", "User"], "rowcount": 200}]}
bawiki_p
Articles within COVID-19 category in English
null
use enwiki_p; select CONCAT('# [[:Category:',cat_title,']]') as cat_title, cat_pages from category WHERE cat_title LIKE 'COVID-19_pandemic' ORDER BY cat_pages DESC;
{"runningtime": "0.75", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]}
enwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "125.66", "resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 983}]}
enwiki
Most AWB edits past month
null
SELECT page_title, actor_name, r2.rev_timestamp, comment_text FROM revision_userindex r1 JOIN actor_revision ON actor_id = r1.rev_actor LEFT JOIN page ON page_id = r1.rev_page LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id WHERE comment_text LIK...
{"runningtime": "0.20", "resultsets": [{"headers": ["user_name"], "rowcount": 100}]}
nowiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "1.40", "resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 286}]}
enwiki
Get OGL marked images which are possibly not OGL
Finds images tagged as being under the OGL from Defence Imagery but the metadata does not say that the image is under the OGL.
SELECT page_title, img_metadata FROM page INNER JOIN image ON image.img_name = page.page_title INNER JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE categorylinks.cl_to = "Images_from_Defence_Imagery" AND NOT (image.img_metadata LIKE "%Open Government Licence%") AND page_namespace = 6 LIMIT 1
{"runningtime": "0.24", "resultsets": [{"headers": ["Timestamp", "actor_name", "rc_title", "total diff"], "rowcount": 100}]}
commonswiki
Get OGL marked images which are MoD News License
Finds images tagged as being under the MoD News License based on the file metadata but are on commons.
SELECT page_title, img_metadata FROM page INNER JOIN image ON image.img_name = page.page_title INNER JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE categorylinks.cl_to = "Images_from_Defence_Imagery" AND (image.img_metadata LIKE "%MoD News Licence%") AND page_namespace = 6
{"runningtime": "4.80", "resultsets": [{"headers": ["actor_name", "cnt"], "rowcount": 40}]}
commonswiki
Size of uploads by Fæ
This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects.
USE commonswiki_p; SELECT COUNT(img_name) AS Count, ROUND(SUM(img_size/(1<<30))) AS Size_GB FROM image JOIN actor_image ON actor_id = img_actor WHERE actor_name = "Auntof6";
{"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace"]}]}
commonswiki_p
All tel: external links
All external links to the tel: scheme. For [[WP:VPT#tel URI]] circa 22 Jul 2021.
SELECT CONCAT('[[', COALESCE(CONCAT(pl_title, ':'),''), page_title, ']]') AS title, el_to FROM externallinks JOIN page ON page_id = el_from LEFT JOIN pagelinks ON pl_namespace = page_namespace AND pl_from = 67931071 -- [[User:Cryptic/ns]] WHERE el_to LIKE 'tel:%';
{"runningtime": "22.27", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, ...
enwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "6.75", "resultsets": [{"rowcount": 0, "headers": ["wikitext"]}]}
enwiki
Retrieve all articles in Wikiproject Media
null
use enwiki_p; SELECT article.page_title, article.page_id FROM page INNER JOIN page article ON page.page_title=article.page_title INNER JOIN categorylinks ON cl_from = page.page_id AND categorylinks.cl_to = "WikiProject_COVID-19"
{"runningtime": "9.21", "resultsets": [{"headers": ["actor_name", "COUNT(DISTINCT rev_page)"], "rowcount": 100}]}
enwiki
Retrieve all articles in Wikiproject Geography
null
SELECT article.page_title, article.page_id FROM page INNER JOIN page article ON page.page_title=article.page_title INNER JOIN categorylinks ON cl_from = page.page_id AND categorylinks.cl_to = "WikiProject_Biography_articles" WHERE page.page_namespace = 1 AND article.page_namespace = 0
{"runningtime": "7.57", "resultsets": [{"rowcount": 74, "headers": ["CONCAT('* [[:\u062a\u0635\u0646\u064a\u0641:',p.page_title, ']]')"]}]}
enwiki
Retrieve all articles in WikiProject_COVID-19_articles
null
SELECT article.page_title, article.page_id FROM page INNER JOIN page article ON page.page_title=article.page_title INNER JOIN categorylinks ON cl_from = page.page_id AND categorylinks.cl_to = "WikiProject_COVID-19_articles" WHERE page.page_namespace = 1 AND article.page_namespace = 0
{"runningtime": "6.98", "resultsets": [{"rowcount": 100, "headers": ["actor_name", "COUNT(DISTINCT rev_page)"]}]}
enwiki
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["rev_id", "page_title", "page_len"]}]}
commonswiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "4.16", "resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 125}]}
commonswiki_p
كثافة التعديلات خلال كل ساعة في عام 2020
null
SELECT str_to_date(rev_timestamp, "%Y%m%d%H%i%s"), count(*) FROM revision where rev_timestamp like "2020%" and rev_page in (select page_id from page where page_id = rev_page and page_namespace = 0 and page_is_redirect = 0) group by month(str_to_date(rev_timestamp, "%Y%m%d%H%i%s")), day(str_to_date(rev_timestamp, "%Y%...
{"runningtime": "2.33", "resultsets": [{"rowcount": 100, "headers": ["user", "cnt"]}]}
arwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "8.28", "resultsets": [{"rowcount": 190, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
enwiki
Newest pages in category
null
select page_namespace as namespace, replace(page_title, '_', ' ') as title, actor_name as first_editor, comment_text as first_edit_summary, date_format(rev_timestamp, '%Y-%m-%d %H:%i:%s') as first_edit_timestamp from categorylinks join page on page_id = cl_from join revision_userindex on rev_page = cl_...
{"runningtime": "11.51", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, ...
enwiktionary_p
Redirects from Foo to The Foo
This selection is limited to cases where Foo has 100+ incoming wikilinks from mainspace.
SELECT page_title, COUNT(*) AS links FROM redirect JOIN page ON page_id = rd_from AND page_namespace = 0 AND page_title = SUBSTRING(rd_title, 5) JOIN pagelinks ON pl_namespace = 0 AND pl_title = page_title AND pl_from_namespace = 0 WHERE rd_namespace = 0 AND rd_title LIKE "The_%" GROUP BY page_title HAVING links > 100 ...
{"runningtime": "1.16", "resultsets": [{"rowcount": 718, "headers": ["il_to", "page_title"]}]}
enwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "0.59", "resultsets": [{"rowcount": 60, "headers": ["page_title"]}]}
enwiki
Мовні посилання
null
select page.page_title, langlinks.* from langlinks join page on page.page_id = langlinks.ll_from WHERE page.page_title = 'Україна' limit 10
{"runningtime": "0.08", "resultsets": [{"rowcount": 1, "headers": ["'%' + MONTHNAME(CURDATE()) + '_' + YEAR(CURDATE())"]}]}
ukwiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "0.43", "resultsets": [{"headers": ["concat(\"[[\",pl_title,\"]]\")", "concat(\"[[\",page2.page_title,\"]]\")"], "rowcount": 169}]}
enwiki
For a given page, timestamp and page len
null
SELECT rev_timestamp, rev_len FROM revision WHERE rev_page = 66097941; # https://en.wikipedia.org/wiki/2020_United_States_federal_government_data_breach
{"runningtime": "1.50", "resultsets": [{"headers": ["page_title"], "rowcount": 714}]}
enwiki_p
Articles without talk pages on enwiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE enwiki_p; -- Count of all mainspace pages SELECT COUNT(*) FROM page WHERE page_namespace = 0 AND page_is_redirect = 0; -- Count of mainspace pages without corresponding talk pages SELECT COUNT(*) FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_title NOT IN (SELECT page_title FROM page WHERE pa...
{"runningtime": "39.52", "resultsets": [{"rowcount": 16824, "headers": ["page_title", "pl_title"]}]}
enwiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext FROM categorylinks JOIN templatelinks ON tl_from = cl_from JOIN page ON page_id = cl_from WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%' AND cl_type = 'file' AND page_namespace = 6 AND tl_namespace = 10 AND tl_title = 'Cs' ORDER BY page_title; /* SEL...
{"runningtime": "24.07", "resultsets": [{"headers": ["concat(\"[[\",page_title,\"]]\")", "count(page_title)"], "rowcount": 8031}]}
commonswiki_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "1.43", "resultsets": [{"rowcount": 700, "headers": ["page_title"]}]}
enwiki
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "18.22", "resultsets": [{"headers": ["user_name"], "rowcount": 40}]}
enwiki
Links to some Chinese indices on English Wiktionary
null
with prefixes(index_prefix) as ( values ('Chinese Cangjie'), ('Chinese four corner'), ('Chinese Zhuyin'), ('Chinese radical'), ('Chinese total strokes'), ('Mandarin Pinyin'), ('Cantonese Jyutping') ) select index_prefix, source.page_namespace as link_from_namespace, count(*) as link_count, target.page_id ...
{"runningtime": "1.39", "resultsets": [{"rowcount": 670, "headers": ["page_title"]}]}
enwiktionary_p
AfC review counts, July 2021 elimination drive
AfC count, July 2021. Including links
use enwiki_p; select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank, -- count(rc_id) as tot_reviews, count(CASE WHEN comment_text like "Commenting on submission%" then NULL ELSE 1 END) as reviews, concat("[[User:", actor_name, "|", actor_name, "]]") as username, concat("[[Wikipedia:WikiProject_Arti...
{"runningtime": "1619.99", "resultsets": [{"rowcount": 6, "headers": ["qid", "label", "site", "sitelink"]}]}
enwiki
Root page names of index pages that transclude themselves
null
select substring_index(tl_title, '/', 1) as root_page, count(*) as transclusion_count from templatelinks join page on page_id = tl_from where tl_namespace = 104 /* Index */ and page_namespace = tl_namespace and page_title = tl_title group by root_page order by transclusion_count desc;
{"runningtime": "0.20", "resultsets": [{"headers": ["Tables_in_fawiki_p"], "rowcount": 101}]}
enwiktionary_p
Index link count by root page on English Wiktionary
null
select root_page_title, source.page_namespace as link_from_namespace, link_target_exists, count(*) as link_count from ( select substring_index(pl_title, '/', 1) as root_page_title, target.page_id is not null as link_target_exists, pl_from from pagelinks left join page as...
{"runningtime": "0.08", "resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 10}]}
enwiktionary_p
Most locked pages
Pages that had the most locks
SELECT log_namespace AS namespace, log_title AS protected_page, COUNT(log_title) AS occurrences, MAX(log_timestamp) AS latest_occurence FROM logging WHERE log_type = "protect" GROUP BY namespace, protected_page ORDER BY occurrences DESC LIMIT 100;
{"runningtime": "0.54", "resultsets": [{"rowcount": 100, "headers": ["user", "cnt"]}]}
viwiki_p
Most locked page by DHN
null
SELECT log_namespace AS namespace, log_title AS protected_page, COUNT(log_title) AS occurrences, MAX(log_timestamp) AS latest_occurence FROM logging WHERE log_type = "protect" GROUP BY namespace, protected_page ORDER BY occurrences DESC LIMIT 300;
{"runningtime": "0.34", "resultsets": [{"rowcount": 100, "headers": ["user", "cnt"]}]}
viwiki_p
Most popular individual edited pages by DHN
null
SELECT page_namespace, page_title, COUNT(rev_id) AS edits FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id) LEFT JOIN page ON (revision.rev_page = page.page_id) WHERE actor.actor_name = "NguoiDungKhongDinhDanh" GROUP BY page_namespace, page_title ORDER BY edits DESC LIMIT 50;
{"runningtime": "0.12", "resultsets": [{"rowcount": 25, "headers": ["user", "cnt"]}]}
viwiki_p