title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Most pending changes accepts (all time)
null
SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank, actor_name, COUNT(log_actor) AS manual_accept_count FROM logging_userindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = 'review' AND log_action = 'approve' GROUP BY log_actor ORDER BY manual_accept_count DESC LIMIT 1000
{"resultsets": [{"headers": ["files"], "rowcount": 100}], "runningtime": "21.94"}
enwiki
Files on fi.wiki NOT in spec categories (no license)
null
#USE fiwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file, CONCAT("[[:User:", actor_name, "]]") as uploader FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN actor_image ON img_actor = actor_id JOIN categorylinks ON cl_from = page_id AND cl_type = "file" #AND cl_to = "No_license" # ENTER THE CATEGORY HERE AND page_is_redirect=0 AND NOT EXISTS( SELECT * FROM categorylinks WHERE page_id=cl_from AND ( # AND (#cl_to LIKE 'Cc-by-%' cl_to LIKE 'Cc-by-%' OR cl_to= "Cc-zero-kuvat" OR cl_to= "GFDL-kuvat" #Files tagged with no license OR cl_to= "GPL-kuvat" #Files tagged with a problem tag OR cl_to= "Kirjojen_kansikuvat" OR cl_to= "Lautapelien_kansikuvat" OR cl_to= "Lehtien_kansikuvat" OR cl_to= "Tietokoneohjelmien_kansikuvat" OR cl_to= "Videotallenteiden_kansikuvat" OR cl_to= "Äänitteiden_kansikuvat" OR cl_to= "Elokuvajulistekuvat" OR cl_to= "Julistekuvat" OR cl_to= "Äänisitaatit" OR cl_to= "Logot" OR cl_to= "Yhdysvalloissa_tekijänoikeuden_alaiset_tiedostot" OR cl_to= "Postimerkkikuvat" OR cl_to= "Ei-vapaat_valokuvat" OR cl_to= "Kuvaohjelmien_kuvakaappaukset" OR cl_to= "Taideteoskuvat" OR cl_to= "Sarjakuvateokset" OR cl_to= "Kuvakaappaukset" OR cl_to= "Kuvaohjelmien_kuvakaappaukset" OR cl_to= "Tietokoneohjelmien_kuvakaappaukset" OR cl_to= "WWW-sivustojen_kuvakaappaukset" OR cl_to= "Vanhat_suomalaiset_valokuvat" OR cl_to= "Vanhat_kuvat" OR cl_to= "Vanhat_italialaiset_valokuvat" OR cl_to= "Epäviralliset_vaakunat" OR cl_to= "Logot,_jotka_eivät_ylitä_teoskynnystä" OR cl_to= "Kuvat,_jotka_eivät_ylitä_teoskynnystä" OR cl_to= "Yhdysvaltain_hallituksen_Public_Domain_-kuvat" OR cl_to= "Public_domain_-kuvat")) GROUP BY img_name ASC
{"resultsets": [{"headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"], "rowcount": 1}], "runningtime": "0.06"}
fiwiki_p
Pages by lint errors
Mainspace pages with most lint errors except for Obsolete HTML tags
select page_title, count(*) as page_count from linter join page on page.page_id = linter.linter_page group by page.page_id order by count(*) desc, page_title asc limit 1000;
{"resultsets": [{"headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"], "rowcount": 1}], "runningtime": "0.06"}
enwiki_p
فارغ
null
null
{"resultsets": [{"headers": ["ll_from", "ll_lang", "ll_title"], "rowcount": 15}], "runningtime": "0.06"}
arwiki_p
Userspace pages of non-existent users (no talk, no subpages)
null
SELECT CONCAT('https://en.wikipedia.org/wiki/User:', p.page_title) AS URL FROM enwiki_p.page p LEFT JOIN enwiki_p.user u ON REPLACE(p.page_title, '_', ' ') = u.user_name WHERE p.page_namespace = 2 AND u.user_id IS NULL AND p.page_is_redirect = 0 AND NOT IS_IPV4(p.page_title) -- Exclude IPv4 AND NOT IS_IPV6(p.page_title) -- Exclude IPv6 AND p.page_title NOT LIKE '%.css' AND p.page_title NOT LIKE '%.cs' AND p.page_title NOT LIKE '%.js' AND p.page_title NOT LIKE '%.charset' AND p.page_title NOT LIKE '%.%.%.xxx' AND p.page_title NOT IN ('Unknown_user', 'Global_rename_script', 'Sec\"\'27\\u00226\\x3ETest_(WMF)') -- Exclude technical user pages AND p.page_id NOT IN ( SELECT cl.cl_from FROM enwiki_p.categorylinks cl WHERE cl.cl_to IN ('User_soft_redirects', 'Wikipedia_doppelganger_accounts', 'Wikipedia_alternative_accounts') -- Exclude these categories ) AND p.page_id NOT IN ( SELECT tl.tl_from FROM enwiki_p.templatelinks tl WHERE tl.tl_target_id IN (32197, 277052, 282063, 115252, 1968835) -- Exclude pages tagged with sockpuppet template ) AND p.page_title NOT LIKE '%/%'
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}], "runningtime": "0.37"}
enwiki_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len FROM page talkpage WHERE talkpage.page_title NOT LIKE '%/%' AND talkpage.page_namespace IN (1,11,15,101,119) AND NOT EXISTS ( SELECT 1 FROM page mainpage WHERE mainpage.page_namespace=talkpage.page_namespace-1 AND mainpage.page_title=talkpage.page_title ) AND NOT EXISTS ( SELECT 1 FROM templatelinks WHERE talkpage.page_id=tl_from AND tl_target_id = 418257 ) LIMIT 100
{"resultsets": [{"headers": ["Kullanici", "KullaniciGrubu", "Sayfa", "DegisiklikSayisi"], "rowcount": 13}, {"headers": ["Sayfa", "DegisiklikSayisi"], "rowcount": 27}], "runningtime": "1291.60"}
enwiki_p
stats of autoreviewed articles and redirects
null
select review_date as date, COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects` from ( select distinct page_id, left(ptrp_reviewed_updated, 8) as review_date, page_is_redirect from pagetriage_page join page on ptrp_page_id=page_id and page_namespace=0 where ptrp_reviewed=3 ) logtemp group by review_date having review_date<left('20230315',8)
{"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8378}], "runningtime": "16.80"}
enwiki
select count(distinct cl_from) from categorylinks
null
select count(distinct cl_from) from categorylinks
{"resultsets": [{"headers": ["Page", "Count"], "rowcount": 0}], "runningtime": "3.46"}
enwiki_p
select count(distinct cl_to) from categorylinks
null
select count(distinct cl_to) from categorylinks
{"resultsets": [{"headers": ["actor_name", "user_registration"], "rowcount": 54}], "runningtime": "44.13"}
enwiki_p
Ruwiki IWRM.js usage → wikitable
null
USE ruwiki_p; SELECT CONCAT('[[User:', actor_name, '|]]') AS User, COUNT(rev_id) AS Edits FROM revision JOIN actor ON rev_actor = actor_id JOIN change_tag ON ct_rev_id = rev_id JOIN change_tag_def ON ct_tag_id = ctd_id WHERE ctd_name = 'iwrm' GROUP BY rev_actor ORDER BY edits DESC;
{"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 0}], "runningtime": "87.81"}
ruwiki_p
Articles with talk pages that have been assigned to WikiProjects
Part of a plan to assign articles to WikiProjects using Naive Bayes. Detects only pages w/talk pages that have been assigned to WikiProjects. Still being worked on. Older version of this query that did 1/100 of the article space: Executed in 78.19 seconds as of Wed, 15 Mar 2023 14:13:29 UTC, Resultset (61075 rows) For 1/10 of the article space: Executed in 634.59 seconds as of Wed, 15 Mar 2023 14:16:55 UTC Resultset (609869 rows) Suggests about 2 hours for the whole article space... let's try it Executed in 5683.80 seconds as of Wed, 15 Mar 2023 14:34:20 UTC. Resultset (6102031 rows) Note that loading the 6102031 row resultset into this web page severely taxes your web browser.
SELECT DISTINCT article.page_title, article.page_id, talk.page_id -- REGEXP_EXTRACT(talkcats.cl_to, '(?WikiProject_|.*_importance_|.*_priority_|Unassessed)(.*)'), -- does not work FROM page AS article INNER JOIN page AS talk ON talk.page_title = article.page_title INNER JOIN categorylinks AS pagecats ON pagecats.cl_from = article.page_id INNER JOIN categorylinks AS talkcats ON talkcats.cl_from = talk.page_id WHERE -- article.page_id % 10 = 2 article.page_namespace = 0 AND talk.page_namespace = 1 AND article.page_is_redirect = 0 AND talk.page_is_redirect = 0 AND ( talkcats.cl_to LIKE "%WikiProject_%" OR talkcats.cl_to LIKE "%-Class_%_articles" OR talkcats.cl_to LIKE "%-importance_%_articles" OR talkcats.cl_to LIKE "%-priority_%_articles" OR talkcats.cl_to LIKE "Unassessed_%_articles" ) AND NOT ( talkcats.cl_to LIKE "%vital%" OR talkcats.cl_to LIKE "%Version%" ) AND NOT (pagecats.cl_to LIKE "%Disambig%" OR pagecats.cl_to LIKE "%disambig%" OR pagecats.cl_to LIKE "%set_index%" OR pagecats.cl_to LIKE "Set_index%") AND NOT (talkcats.cl_to LIKE "%Disambig%" OR talkcats.cl_to LIKE "%disambig%") AND NOT (pagecats.cl_to LIKE "Short_description%" OR pagecats.cl_to LIKE "%_errors%" OR pagecats.cl_to LIKE "CS1_%" OR pagecats.cl_to LIKE "%short_description%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "Articles%" OR pagecats.cl_to LIKE "%pages%" OR pagecats.cl_to LIKE "%disputes%" OR pagecats.cl_to LIKE "Pages%" OR pagecats.cl_to LIKE "Use_dmy_date%" OR pagecats.cl_to LIKE "%Wikipedia%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "%Articles%" OR pagecats.cl_to LIKE "%Wikidata%" OR pagecats.cl_to LIKE "Webarchive%")
{"connection_id": 128340020}
enwiki_p
select cl_from, cl_to from categorylinks where cl_to like "%WikiProject%" limit 1000
null
select cl_from, cl_to from categorylinks where cl_to like "%Class_WikiProject%" limit 1000
{"connection_id": 128312599}
enwiki_p
Most regular editors on frwiki Admin requests (2022-2023)
Liste des éditeurs non-admins les plus réguliers de Wikipédia:Requête aux administrateurs durant l'année 2022-2023
SELECT user.user_name, COUNT(*) AS count FROM revision JOIN page ON revision.rev_page = page.page_id JOIN actor ON revision.rev_actor = actor.actor_id JOIN user ON actor.actor_user = user.user_id LEFT JOIN user_groups ON user.user_id = user_groups.ug_user AND user_groups.ug_group = 'sysop' WHERE page.page_namespace = 4 AND page.page_title = 'Requête_aux_administrateurs' AND rev_timestamp >= DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), '%Y%m%d%H%i%s') AND user_groups.ug_user IS NULL GROUP BY user.user_name ORDER BY count DESC LIMIT 200;
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 516}], "runningtime": "4.97"}
frwiki
Most regular editors on frwiki Admin requests (2022-2023)
Liste des éditeurs les plus réguliers de Wikipédia:Requête aux administrateurs durant l'année 2022-2023
SELECT user.user_name, COUNT(*) AS count FROM revision JOIN page ON revision.rev_page = page.page_id JOIN actor ON revision.rev_actor = actor.actor_id JOIN user ON actor.actor_user = user.user_id WHERE page.page_namespace = 4 AND page.page_title = 'Requête_aux_administrateurs' AND rev_timestamp >= DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), '%Y%m%d%H%i%s') GROUP BY user.user_name ORDER BY count DESC LIMIT 500;
{"resultsets": [{"headers": ["concat(\"File:\", img_name)", "img_timestamp"], "rowcount": 317}], "runningtime": "4.88"}
frwiki
Thanked people for 2022 frwiki per user
null
USE frwiki_p; SELECT log_title, COUNT(log_id) FROM logging_logindex WHERE log_type = "thanks" AND log_timestamp >= "20220000000000" AND log_timestamp <= "20230000000000" GROUP BY log_title ORDER BY 2 DESC
{"resultsets": [{"headers": ["tl_from", "tl_from_namespace", "tl_target_id", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "lt_id", "lt_namespace", "lt_title"], "rowcount": 97}], "runningtime": "0.23"}
frwiki
mies ja naiskäyttäjänimet fiwikissä
null
SELECT "nainen" as category, sum(1) as c, group_concat(user_name SEPARATOR ', ') as names FROM user LEFT JOIN ipblocks ON ipb_user=user_id WHERE user_editcount>0 AND (lower(user_name) like "%nainen") AND ipb_user IS NULL UNION SELECT "mies" as category, sum(1) as c, group_concat(user_name SEPARATOR ', ') as names FROM user LEFT JOIN ipblocks ON ipb_user=user_id WHERE user_editcount>0 AND (lower(user_name) like "%mies") AND ipb_user IS NULL
{"resultsets": [{"headers": ["\u1ecd", "New articles in a period", "Wikidata item", "Creator", "Date created", "Length"], "rowcount": 258}], "runningtime": "0.72"}
fiwiki_p
sites
null
SELECT * FROM sites WHERE site_global_key = 'simplewiki'
{"resultsets": [{"headers": ["WikiQuote updated article in #SheSaid 2022", "Campaign size increase", "Current size", "Last update", "Wikidata item"], "rowcount": 137}], "runningtime": "0.88"}
simplewiki
Most regular editors on frwiki Admin requests (2022-2023)
Liste des éditeurs non-admins les plus réguliers de Wikipédia:Requête aux administrateurs durant l'année 2022-2023
SELECT user.user_name, COUNT(*) AS count FROM revision JOIN page ON revision.rev_page = page.page_id JOIN actor ON revision.rev_actor = actor.actor_id JOIN user ON actor.actor_user = user.user_id LEFT JOIN user_groups ON user.user_id = user_groups.ug_user AND user_groups.ug_group = 'sysop' WHERE page.page_namespace = 4 AND page.page_title = 'Requête_aux_administrateurs' AND rev_timestamp >= DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), '%Y%m%d%H%i%s') AND user_groups.ug_user IS NULL AND ABS(revision.rev_len) > 100 GROUP BY user.user_name ORDER BY count DESC LIMIT 200;
{"resultsets": [{"headers": ["WikiQuote updated article in #SheSaid 2022", "Campaign size increase", "Current size", "Last update", "Wikidata item"], "rowcount": 2}], "runningtime": "0.34"}
frwiki
select count(*) from categorylinks where cl_to like "%WikiProject%"
null
select count(*) from categorylinks where cl_to like "%WikiProject%"
{"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_action", "rc_params"], "rowcount": 1122}], "runningtime": "1.16"}
enwiki_p
100 plwiki articles without ukwiki links
null
SELECT CONCAT('Q', ips.ips_item_id) AS item_id, ips.ips_row_id, COUNT(*) AS links, (SELECT COUNT(*) FROM wb_items_per_site ips_bis WHERE ips_bis.ips_site_id = "ukwiki" AND ips_bis.ips_item_id = ips.ips_item_id) AS ukwiki, (SELECT ips_site_page FROM wb_items_per_site ips_en WHERE ips_en.ips_item_id = ips.ips_item_id AND ips_en.ips_site_id = "plwiki" LIMIT 1) AS ips_site_page, (SELECT COUNT(*) FROM wb_items_per_site ips_bis WHERE ips_bis.ips_site_id = "plwiki" AND ips_bis.ips_item_id = ips.ips_item_id AND ips_bis.ips_site_page NOT REGEXP '^(Kategoria|Szablon|Moduł|MediaWiki|Pomoc|Portal|Wikipedia)') AS plwiki FROM wb_items_per_site ips WHERE ips.ips_site_id LIKE '%wiki' GROUP BY ips.ips_item_id HAVING ukwiki < 1 AND plwiki > 0 ORDER BY links DESC LIMIT 100;
{"resultsets": [{"headers": ["Page", "Count"], "rowcount": 0}], "runningtime": "5.80"}
wikidatawiki_p
nlwiki Current bot accounts & activity
null
SELECT actor_name AS 'username', ug_expiry AS 'bot expiry', MAX(rev_timestamp) AS 'last edit', (UNIX_TIMESTAMP()-UNIX_TIMESTAMP(STR_TO_DATE(MAX(rev_timestamp),'%Y%m%d%H%i%s')))/31556952 AS 'years inactive' FROM user_groups, revision, actor WHERE ug_group='bot' AND rev_actor=actor_id AND actor_user IS NOT NULL AND actor_user=ug_user GROUP BY actor_name HAVING `years inactive`>2.99 # leap days ORDER BY `last edit`
{"resultsets": [{"headers": ["title"], "rowcount": 12577}], "runningtime": "20.29"}
nlwiki
Distinct Wikipedia article subjects (estimation)
Number of Wikidata items with at least one Wikipedia sitelink that does not contain a colon (cf. https://mas.to/@vrandecic/109971782350619380).
SELECT COUNT(DISTINCT ips_item_id) FROM wb_items_per_site WHERE ips_site_id NOT IN ('wikidatawiki') AND ips_site_page NOT LIKE '%:%'
{"resultsets": [{"headers": ["title"], "rowcount": 3050}], "runningtime": "17.72"}
wikidatawiki_p
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"connection_id": 166267329}
commonswiki_p
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"resultsets": [{"headers": ["actor_name", "COUNT(*)"], "rowcount": 25}], "runningtime": "0.41"}
commonswiki_p
Userspace pages of non-existent users (no talk, no subpages)
null
SELECT CONCAT('https://en.wikipedia.org/wiki/User:', p.page_title) AS URL FROM enwiki_p.page p LEFT JOIN enwiki_p.user u ON REPLACE(p.page_title, '_', ' ') = u.user_name WHERE p.page_namespace = 2 AND u.user_id IS NULL AND p.page_is_redirect = 0 AND NOT IS_IPV4(p.page_title) -- Exclude IPv4 AND NOT IS_IPV6(p.page_title) -- Exclude IPv6 AND p.page_title NOT LIKE '%.css' AND p.page_title NOT LIKE '%.cs' AND p.page_title NOT LIKE '%.js' AND p.page_title NOT LIKE '%.charset' AND p.page_title NOT LIKE '%.%.%.xxx' AND p.page_title NOT IN ('Unknown_user', 'Global_rename_script', 'Sec\"\'27\\u00226\\x3ETest_(WMF)') -- Exclude technical user pages AND p.page_id NOT IN ( SELECT cl.cl_from FROM enwiki_p.categorylinks cl WHERE cl.cl_to IN ('User_soft_redirects', 'Wikipedia_doppelganger_accounts', 'Wikipedia_alternative_accounts') -- Exclude these categories ) AND p.page_id NOT IN ( SELECT tl.tl_from FROM enwiki_p.templatelinks tl WHERE tl.tl_target_id IN (32197, 277052, 282063, 115252, 1968835) -- Exclude pages tagged with sockpuppet template ) AND p.page_title NOT LIKE '%/%'
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 31}], "runningtime": "0.89"}
enwiki_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len FROM page talkpage WHERE talkpage.page_title NOT LIKE '%/%' AND talkpage.page_namespace IN (1,11,15,101,119) AND NOT EXISTS ( SELECT 1 FROM page mainpage WHERE mainpage.page_namespace=talkpage.page_namespace-1 AND mainpage.page_title=talkpage.page_title ) AND NOT EXISTS ( SELECT 1 FROM templatelinks WHERE talkpage.page_id=tl_from AND tl_target_id = 418257 ) LIMIT 100
{"resultsets": [{"headers": ["Page", "Count"], "rowcount": 1}], "runningtime": "7.53"}
enwiki_p
Articles created primarily by Lugnuts
This query produces a list of small articles that are created and primarily contain content by Lugnuts. This is currently defined as articles with a page length under 4000 with Lugnuts contributing more than half the content, but can be adjusted. In addition, redirects, lists and disambiguation pages are excluded.
WITH creations as (SELECT page_title, page_id, rev_timestamp, page_len, rev_len FROM revision_userindex JOIN page ON page_id = rev_page WHERE rev_parent_id = 0 AND page_is_redirect = 0 AND rev_actor = 482 AND page_namespace = 0) SELECT page_title, rev_timestamp FROM (SELECT creations.page_title, creations.page_id, creations.page_len, creations.rev_timestamp, SUM(ABS(CAST(childRev.rev_len as SIGNED) - CAST(parentRev.rev_len as SIGNED))) + creations.rev_len as deltas FROM creations LEFT JOIN revision_userindex AS childRev ON page_id = childRev.rev_page AND rev_actor = 482 LEFT JOIN revision AS parentRev ON childRev.rev_parent_id = parentRev.rev_id GROUP BY creations.page_id) AS contributions LEFT JOIN (SELECT creations.page_id, SUM(ABS(CAST(childRev.rev_len as SIGNED) - CAST(parentRev.rev_len as SIGNED))) as deltas FROM creations LEFT JOIN revision_userindex AS childRev ON page_id = childRev.rev_page AND rev_actor != 482 LEFT JOIN revision AS parentRev ON childRev.rev_parent_id = parentRev.rev_id GROUP BY creations.page_id) AS othercontributions ON othercontributions.page_id = contributions.page_id LEFT JOIN categorylinks ON cl_from = contributions.page_id AND ( cl_to = 'Disambiguation_pages' OR cl_to LIKE '%disambiguation_pages' OR cl_to LIKE 'List%') WHERE cl_to IS NULL AND othercontributions.deltas < (contributions.deltas * 2) AND page_len < 5000 AND page_len > 4000
{"resultsets": [{"headers": ["page_title", "linter_errors"], "rowcount": 1000}], "runningtime": "6.81"}
enwiki_p
Lugnuts Olympian Biographies
null
WITH articles AS ( SELECT DISTINCT(Article.page_title), Article.page_id, rev_timestamp, rev_len as "InitialSize", Article.page_len as "CurrentSize" FROM revision_userindex JOIN page AS Article ON Article.page_id = rev_page AND Article.page_namespace = 0 JOIN page AS Talk ON Article.page_title = Talk.page_title AND Talk.page_namespace = 1 JOIN categorylinks AS ArticleCat ON ArticleCat.cl_from = Article.page_id JOIN categorylinks AS TalkCat ON TalkCat.cl_from = Talk.page_id WHERE rev_parent_id = 0 AND Article.page_is_redirect = 0 AND rev_actor = 482 AND ArticleCat.cl_to LIKE '%Olympics' AND TalkCat.cl_to LIKE '%iography%' AND Article.page_len > 4000 AND Article.page_len < 5000 ) SELECT page_title FROM articles
{"resultsets": [{"headers": ["page_title", "linter_errors"], "rowcount": 2000}], "runningtime": "7.72"}
enwiki_p
Page creations by autopatrolled users
Entries in the enwiki page creation log from users that have the autoreviewer user right, since 2022.
SELECT log_timestamp AS timestamp, actor_name AS user, log_namespace AS namespace, log_title AS page, comment_text AS summary FROM logging_userindex JOIN comment_logging ON log_comment_id = comment_id JOIN actor_logging ON log_actor = actor_id JOIN user_groups ON actor_user = ug_user WHERE log_type = 'create' AND ug_group = 'autoreviewer' LIMIT 100
{"resultsets": [{"headers": ["page_title", "linter_errors"], "rowcount": 5000}], "runningtime": "10.43"}
enwiki
Page creations by autopatrolled users that were deleted
Entries in the enwiki page creation log from users that have the autoreviewer user right that also appear in the deletion log.
SELECT * FROM logging_userindex JOIN comment_logging ON log_comment_id = comment_id JOIN actor_logging ON log_actor = actor_id JOIN user_groups ON actor_user = ug_user WHERE (log_type = 'create' OR log_type = 'delete') AND ug_group = 'autoreviewer' LIMIT 100
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.06"}
enwiki
PAWS links to update on Meta
List of pages with PAWS links on Meta that might need updated per https://phabricator.wikimedia.org/T328842
SELECT p.page_namespace AS page_namespace, p.page_title AS page_title, el_from AS paws_link FROM externallinks el INNER JOIN page p ON (el.el_from = p.page_id) WHERE el_to LIKE '%public.paws.wmcloud.org%' ORDER BY page_namespace, page_title
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.05"}
apiportalwiki_p
trwiki kategorisiz maddeler
null
SELECT CONCAT(page_title) AS page_title_formatted FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT p.page_id FROM page p INNER JOIN categorylinks cl ON cl.cl_from = p.page_id INNER JOIN page p2 ON cl.cl_to = p2.page_title AND p2.page_namespace = 14 -- 14 = Category LEFT JOIN page_props pp ON pp.pp_page = p2.page_id AND pp.pp_propname = 'hiddencat' WHERE pp.pp_page IS NULL ) AND page_id NOT IN ( SELECT cl_from FROM categorylinks WHERE cl_to = "Kategorisiz" ) AND page_id NOT IN ( SELECT cl_from FROM categorylinks WHERE cl_to = "Kategorisiz" AND cl_type = "page" ) ORDER BY page_len ASC;
{"resultsets": [{"headers": ["user_talk"], "rowcount": 1571}], "runningtime": "2109.69"}
trwiki_p
Bad disambiguation page titles (eswiki)
Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki).
use eswiki_p; select page_title as main_title from (page join redirect on page_id = rd_from) where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
{"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name", "user_editcount"], "rowcount": 7}, {"headers": ["avg_edits_per_day"], "rowcount": 1}, {"headers": ["edits", "edits_per_day", "actor_name", "user_editcount"], "rowcount": 9}, {"headers": ["avg_edits_per_day"], "rowcount": 1}], "runningtime": "0.24"}
eswiki
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"connection_id": 129676291}
commonswiki_p
Highest edit count (**wiki, last 30 days)
null
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -30 DAY), "%Y%m%d%H%i%s")); SELECT COUNT(*) AS 'Edits', actor_name AS `User`, ug_group AS `Rights`, page_lang AS `Lang` FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id LEFT JOIN user_groups ON ug_user = actor_user LEFT JOIN page ON rev_page = page_id WHERE rev_id >= @rev AND NOT ug_group = 'bot' GROUP BY `User`, `Lang` ORDER BY Edits DESC LIMIT 350;
{"resultsets": [{"headers": ["title", "count"], "rowcount": 16}], "runningtime": "0.08"}
wikidatawiki_p
Controversial pages on enwiki
Main namespace pages that have the template 'Template:Controversial' in their talk page
SELECT page_title FROM linktarget LEFT JOIN templatelinks ON lt_id = tl_target_id LEFT JOIN page ON tl_from = page_id WHERE lt_namespace = 10 -- Template: AND lt_title = 'Controversial' ;
{"resultsets": [{"headers": ["Page", "Count"], "rowcount": 0}], "runningtime": "1.23"}
enwiki
Dab pages with only one link
null
SELECT page_title, pl_title, COUNT(*) as links FROM page JOIN pagelinks ON pl_from = page_id JOIN categorylinks ON page_id = cl_from AND cl_to = "All_disambiguation_pages" WHERE page_namespace = 0 AND page_is_redirect = 0 AND pl_namespace = 0 GROUP BY page_title HAVING links < 2
{"connection_id": 129906002}
enwiki_p
Unreviewed pages whose most recent revision is an undo
null
select page_title as Page, rev_timestamp as Timestamp from (select page_title, max(rev_id) as rev_id, max(rev_timestamp) as rev_timestamp from pagetriage_page join page on ptrp_page_id = page_id join revision on rev_page = page_id where ptrp_reviewed=0 and page_namespace=0 group by rev_page ) x join change_tag on ct_rev_id=rev_id and ct_tag_id=1 order by rev_timestamp;
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 91}], "runningtime": "4.43"}
enwiki
Reviewer stats by time interval (huwiki)
FlaggedRevs reviewer (patroller) stats / ranking based on actions in the last 30 days.
use huwiki_p; SELECT CONCAT(ROW_NUMBER() OVER(ORDER BY count(*) DESC),'.') AS '#', user_name as 'Szerkesztő', count(*) as 'Ellenőrzések száma az időszakban' 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 >= '20230301000000' # előző hónap eleje AND log_timestamp < '20230401000000' # mostani hónap eleje GROUP BY user_name ORDER BY count(*) DESC ;
{"resultsets": [{"headers": ["replace(pl_title,\"_\",\" \")"], "rowcount": 5}, {"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_expires"], "rowcount": 1}], "runningtime": "0.14"}
huwiki_p
Oldest last-edited pages
Pages with the oldest last-edited timestamp, excluding disambiguation and redirects.
SELECT page.page_namespace AS namespace, revision.rev_page AS page, page.page_title AS title, MAX(revision.rev_timestamp) AS latest_edit FROM page LEFT JOIN revision ON (revision.rev_page = page.page_id) WHERE page.page_namespace = 0 AND page.page_is_redirect = 0 AND revision.rev_timestamp like '2019%' GROUP BY page, rev_page ORDER BY latest_edit DESC
{"resultsets": [{"headers": ["comment_text", "COUNT(logging.log_type)"], "rowcount": 1}], "runningtime": "3.13"}
arwiki_p
Articles created by autopatrolled in the last year, deleted as BLPPROD
null
SELECT Lc.log_title AS "Title created", Lc.log_timestamp AS "Time created", actor_name AS "Editor created", Ld.log_title AS "Title deleted", Ld.log_timestamp AS "Time deleted", comment_text AS "Edit summary" FROM user_groups JOIN actor_logging ON actor_user=ug_user JOIN logging_userindex Lc ON Lc.log_actor=actor_id AND Lc.log_type='create' AND Lc.log_action='create' AND Lc.log_namespace=0 /*AND Lc.log_timestamp>='20220318'*/ JOIN logging_logindex Ld ON Ld.log_page=Lc.log_page AND Ld.log_type='delete' AND Ld.log_action='delete' JOIN comment_logging ON comment_id=Ld.log_comment_id AND comment_text LIKE "%BLPPROD%" WHERE ug_group='autoreviewer' ORDER BY Lc.log_timestamp
{"resultsets": [{"headers": ["cnt"], "rowcount": 1}], "runningtime": "3.17"}
enwiki_p
Articles created by autopatrolled in the last year, deleted as BLPPROD
null
SELECT Lc.log_title AS "Title created", Lc.log_timestamp AS "Time created", actor_name AS "Editor created", Ld.log_title AS "Title deleted", Ld.log_timestamp AS "Time deleted", comment_text AS "Edit summary" FROM user_groups JOIN actor_logging ON actor_user=ug_user JOIN logging_userindex Lc ON Lc.log_actor=actor_id AND Lc.log_type='create' AND Lc.log_action='create' AND Lc.log_namespace=0 /*AND Lc.log_timestamp>='20220318'*/ JOIN logging_logindex Ld ON Ld.log_page=Lc.log_page AND Ld.log_type='delete' AND Ld.log_action='delete' JOIN comment_logging ON comment_id=Ld.log_comment_id AND comment_text LIKE "%BLPPROD%" WHERE ug_group='autoreviewer' ORDER BY Lc.log_timestamp
{"resultsets": [{"headers": ["log_title"], "rowcount": 468677}], "runningtime": "395.56"}
enwiki_p
日本語の語彙素編集数(ユーザー別)
null
select actor_name, count(*) c from revision_userindex join page on rev_page=page_id join actor_revision on rev_actor=actor_id JOIN pagelinks ON page.page_id=pagelinks.pl_from where page_namespace = 146 AND pagelinks.pl_title="Q5287" # French group by actor_user order by c desc;
{"resultsets": [{"headers": ["month_year", "user", "No_of_articles", "Bytes"], "rowcount": 15}], "runningtime": "0.13"}
wikidatawiki_p
wikidata
null
SELECT * FROM wbt_property_terms LIMIT 1000
{"resultsets": [{"headers": ["editor", "accepts", "recent_edits", "Blocked"], "rowcount": 277}], "runningtime": "10.11"}
wikidatawiki_p
test query for xref
Part of a plan to assign articles to WikiProjects using Naive Bayes. This fork is a probe query for debugging the parent query.
SELECT pagecats.cl_to, talkcats.cl_to, -- REGEXP_EXTRACT(talkcats.cl_to, '(?WikiProject_|.*_importance_|.*_priority_|Unassessed)(.*)'), -- does not work COUNT(*) AS my_count FROM page AS article INNER JOIN page AS talk ON talk.page_title = article.page_title INNER JOIN categorylinks AS pagecats ON pagecats.cl_from = article.page_id INNER JOIN categorylinks AS talkcats ON talkcats.cl_from = talk.page_id WHERE talkcats.cl_to LIKE "%iography_%" -- HACK! AND pagecats.cl_to = "Living_people" -- HACK! AND article.page_namespace = 0 AND talk.page_namespace = 1 AND article.page_is_redirect = 0 AND talk.page_is_redirect = 0 AND ( talkcats.cl_to LIKE "%WikiProject_%" OR talkcats.cl_to LIKE "%-Class_%_articles" OR talkcats.cl_to LIKE "%-importance_%_articles" OR talkcats.cl_to LIKE "%-priority_%_articles" OR talkcats.cl_to LIKE "Unassessed_%_articles" ) AND NOT ( talkcats.cl_to LIKE "%vital%" OR talkcats.cl_to LIKE "%Version%" ) AND NOT (pagecats.cl_to LIKE "%Disambig%" OR pagecats.cl_to LIKE "%disambig%" OR pagecats.cl_to LIKE "%set_index%" OR pagecats.cl_to LIKE "Set_index%") AND NOT (talkcats.cl_to LIKE "%Disambig%" OR talkcats.cl_to LIKE "%disambig%") AND NOT (pagecats.cl_to LIKE "Short_description%" OR pagecats.cl_to LIKE "%_errors%" OR pagecats.cl_to LIKE "CS1_%" OR pagecats.cl_to LIKE "%short_description%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "Articles%" OR pagecats.cl_to LIKE "%pages%" OR pagecats.cl_to LIKE "%disputes%" OR pagecats.cl_to LIKE "Pages%" OR pagecats.cl_to LIKE "Use_dmy_date%" OR pagecats.cl_to LIKE "%Wikipedia%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "%Articles%" OR pagecats.cl_to LIKE "%Wikidata%" OR pagecats.cl_to LIKE "Webarchive%") GROUP BY pagecats.cl_to, talkcats.cl_to ORDER BY my_count DESC, pagecats.cl_to, talkcats.cl_to -- LIMIT 10000
{"resultsets": [{"headers": ["pl_title", "COUNT(*)"], "rowcount": 35}], "runningtime": "0.18"}
enwiki_p
WikiProject to page category cross-reference, 1% scan
Part of a plan to assign articles to WikiProjects using Naive Bayes. Still being worked on. Limited to just a few pages, for testing purposes. Sorting by all three result columns to make output more compressible later. Now using modulo arithmetic to sub-sample the page table more uniformly. 1/1000 of the table ~= 6700 articles page_id % 1000 = 77: Executed in 251.52 seconds as of Tue, 07 Mar 2023 08:21:01 UTC. Resultset (296041 rows) page_id % 1000 = 78: Executed in 265.67 seconds as of Tue, 07 Mar 2023 08:28:22 UTC. Resultset (316077 rows) page_id % 1000 = 392: Executed in 256.58 seconds as of Tue, 07 Mar 2023 09:22:56 UTC. Resultset (310016 rows) page_id % 1000 = 816: Executed in 269.80 seconds as of Tue, 07 Mar 2023 09:31:37 UTC. Resultset (295323 rows) trying chunkier... page_id % 500 = 61: Executed in 548.59 seconds as of Tue, 07 Mar 2023 08:42:24 UTC. Resultset (572651 rows) ...not significantly more efficient trying finer... page_id % 2000 = 72: running... Executed in 149.02 seconds as of Tue, 07 Mar 2023 08:54:04 UTC. Resultset (156369 rows) ... slightly less efficient? With 1/1000 scan, jsonl file is about 30 Mbytes in size, but bz2's to about 1.3 Mbytes. Next step: Toolforge:
SELECT pagecats.cl_to, talkcats.cl_to, -- REGEXP_EXTRACT(talkcats.cl_to, '(?WikiProject_|.*_importance_|.*_priority_|Unassessed)(.*)'), -- does not work COUNT(*) AS my_count FROM page AS article INNER JOIN page AS talk ON talk.page_title = article.page_title INNER JOIN categorylinks AS pagecats ON pagecats.cl_from = article.page_id INNER JOIN categorylinks AS talkcats ON talkcats.cl_from = talk.page_id WHERE article.page_id % 100 = 81 -- NOTE THIS ONLY PROBES A TINY PART OF ARTICLE SPACE AND article.page_namespace = 0 AND talk.page_namespace = 1 AND article.page_is_redirect = 0 AND talk.page_is_redirect = 0 AND ( talkcats.cl_to LIKE "%WikiProject_%" OR talkcats.cl_to LIKE "%-Class_%_articles" OR talkcats.cl_to LIKE "%-importance_%_articles" OR talkcats.cl_to LIKE "%-priority_%_articles" OR talkcats.cl_to LIKE "Unassessed_%_articles" ) AND NOT ( talkcats.cl_to LIKE "%vital%" OR talkcats.cl_to LIKE "%Version%" ) AND NOT (pagecats.cl_to LIKE "%Disambig%" OR pagecats.cl_to LIKE "%disambig%" OR pagecats.cl_to LIKE "%set_index%" OR pagecats.cl_to LIKE "Set_index%") AND NOT (talkcats.cl_to LIKE "%Disambig%" OR talkcats.cl_to LIKE "%disambig%") AND NOT (pagecats.cl_to LIKE "Short_description%" OR pagecats.cl_to LIKE "%_errors%" OR pagecats.cl_to LIKE "CS1_%" OR pagecats.cl_to LIKE "%short_description%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "Articles%" OR pagecats.cl_to LIKE "%pages%" OR pagecats.cl_to LIKE "%disputes%" OR pagecats.cl_to LIKE "Pages%" OR pagecats.cl_to LIKE "Use_dmy_date%" OR pagecats.cl_to LIKE "%Wikipedia%" OR pagecats.cl_to LIKE "%articles%" OR pagecats.cl_to LIKE "%Articles%" OR pagecats.cl_to LIKE "%Wikidata%" OR pagecats.cl_to LIKE "Webarchive%") GROUP BY pagecats.cl_to, talkcats.cl_to ORDER BY my_count DESC, pagecats.cl_to, talkcats.cl_to -- LIMIT 10000
{"resultsets": [{"headers": ["file"], "rowcount": 209}], "runningtime": "0.63"}
enwiki_p
Leere Kategorien (Chatgtp)
null
SELECT page_title FROM page WHERE page_namespace = 14 -- 14 ist der Namespace für Kategorien in Mediawiki AND NOT EXISTS ( SELECT cl_from FROM categorylinks WHERE cl_to = page_title )
{"resultsets": [{"headers": ["User", "Registered", "Edit count", "Last edit", "Filter trip count", "Last filter trip"], "rowcount": 43}], "runningtime": "54.96"}
zuwiki_p
مقالات بدون عنصر ويكي بيانات
null
use arwiki_p; select page_title,page_id from page where page_namespace = 0 and page_is_redirect = 0 and page_title not like "%/%" and page_id not in(select pp_page from page_props where pp_page = page_id and pp_propname = "wikibase_item") /*أضف السطر التالي إذا كنت تود استثناء صفحات التوضيح أيضًا*/ /*and page_id not in (select cl_from from categorylinks where cl_to like "%صفحات_توضيح%" and cl_from = page_id)*/ order by page_id asc;
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 92}], "runningtime": "2.01"}
arwiki_p
Sanity check re Biographical articles without WP Biography tag
sanity check on parent query
SELECT CONCAT("* [[",article.page_title, "]]") -- , talk.page_id AS talk_page_id FROM page AS article LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE -- article.page_id % 10 = 2 article.page_namespace = 0 AND article.page_is_redirect = 0 AND NOT article.page_title RLIKE "^(Lists?_of|[0-9]{4})_.*$" -- no dated events or lists AND EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = article.page_id and -- (cl_to = "Living_people" cl_to RLIKE ("^(Date|Year)_of_(birth|death)_(missing|unknown).*$") ) AND ( (talk.page_id IS NULL) OR ((talk.page_id IS NOT NULL) AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = talk.page_id and (cl_to LIKE "%Biography_articles" OR cl_to LIKE "%biography_articles" OR cl_to LIKE "%WikiProject_Biography%")))) ORDER BY article.page_title
{"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 0}], "runningtime": "0.26"}
enwiki_p
R3s probably invalid due to moves
null
set @months = 4; set @decrementby = @months * 100000000; select replace(concat("[[:{{subst:ns:",log_namespace,"}}:",replace(log_title,"_"," "),"]]"),":{{subst:ns:0}}:",":") as 'Page', (select actor_name from actor_logging where actor_id=log_actor) as "Deleting admin", comment_text as "Edit summary", log_timestamp as "Timestamp" from logging_logindex curdel join comment_logging on comment_id=log_comment_id where log_type="delete" and log_action="delete" and (comment_text like "%A10%" or comment_text like "%R3%") and exists ( select 1 from logging_logindex move where move.log_type = "move" and move.log_namespace=0 and move.log_title=curdel.log_title and move.log_timestamp < curdel.log_timestamp -- TODO Make this not mainspace-only and exists (select 1 from revision join page on rev_page=page_id where page_namespace=0 and page_title=REPLACE(REGEXP_REPLACE(move.log_params,".*4::target\";s:[0-9]+:\"(.*?)\";s:.*","\\1")," ","_") and rev_timestamp < IF((curdel.log_timestamp - @decrementby - 100000000) % 10000000000 > 1200000000, curdel.log_timestamp - @decrementby - 8800000000, curdel.log_timestamp - @decrementby))) and log_timestamp like "202303%";
{"resultsets": [{"headers": ["name", "none", "approve", "approve2", "approve2-i", "unapprove", "unapprove2", "total"], "rowcount": 3}], "runningtime": "10.61"}
enwiki_p
نقاش ويكيبيديا:مشروع ويكي الصيانة/بدون إنترويكي (نسخة أولية)
null
SELECT comment.comment_text AS "deleted_page", revision_userindex.rev_timestamp AS "date_of_delete", wb_items_per_site.ips_site_page AS "name_of_page" FROM (SELECT page_id, page_title FROM page WHERE page_namespace = 0) AS page JOIN revision_userindex ON page.page_id = revision_userindex.rev_page JOIN comment ON comment.comment_id = revision_userindex.rev_comment_id JOIN wb_items_per_site ON wb_items_per_site.ips_item_id = REPLACE(page.page_title, "Q", "") WHERE comment.comment_text LIKE "%clientsitelink-remove%" AND comment.comment_text LIKE "%enwiki%" #AND rev_timestamp > (NOW() - INTERVAL 1 MONTH) AND year(rev_timestamp) in (2023,2022,2021) AND wb_items_per_site.ips_site_id = "arwiki" AND comment.comment_text NOT LIKE "%Template%" AND comment.comment_text NOT LIKE "%Category%"
{"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "60.26"}
wikidatawiki_p
Peek one record from the page table
null
#select * from page p #join revision r on p.page_latest = r.rev_id # 1140660562; #where page_title ="Virat_Kohli" and page_namespace=0; /*select * from page p join revision r on p.page_latest=r.rev_id where p.page_title='History_of_Afghanistan' and p.page_namespace=0;*/ select p.page_title, group_concat(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_title='History_of_Afghanistan' and p.page_namespace=0 ; #select * from categorylinks c #where c.cl_from=13813 /*# pages revised older than 2020 with page_len > 1000 select count(*) from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' and p.page_len > 1000 limit 100;*/ /*select count(*) from page p where p.page_namespace=0 and p.page_is_redirect=0;*/ /*select count(*) from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000'; */ /*select * from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' limit 5;*/ #select * from page p #join revision r on p.page_latest = r.rev_id # 1140660562; #where r.rev_timestamp < '20190318030012' #and #p.page_touched < '20190318030012' #limit 5; # left coast #select * from page p #; #join revision r on p.page_latest = r.rev_id #1127822228 #where p.page_id = 1131728; #select * from revision r #where r.rev_page = 1131728 #order by rev_timestamp desc; #select * from page p #where p.page_touched < 20190318030012 limit 5;
{"connection_id": 131308284}
enwiki
Categories for United States television
null
select cat_id, cat_title from category where cat_title like 'Television%United%States%' order by cat_title;
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 36}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 13}], "runningtime": "0.52"}
enwiki
Inconsistent page language and page suffix
List all pages which have a page content language different from subpage name which should be the explicit language code. v2
SELECT t1.page_lang, t1.page_namespace, t1.page_title, SUBSTRING_INDEX(t1.page_title, '/', -1) AS suffix, -- last subpage name LEFT(t1.page_title, CHAR_LENGTH(t1.page_title) - LOCATE('/', REVERSE(t1.page_title))) AS base, -- page name without suffix revtag.rt_page FROM page AS t1 LEFT JOIN revtag ON t1.page_id = revtag.rt_page LEFT JOIN ( SELECT page_title, rt_page FROM page LEFT JOIN revtag ON page_id = rt_page ) AS t2 ON base = t2.page_title AND t1.page_namespace = t2.page_namespace WHERE revtag.rt_page IS NULL -- not handled by Translate extension (excludes translatable pages and translation units, but not translation pages) AND t2.rt_page IS NULL AND t1.page_title LIKE '%/%' HAVING ( suffix = 'fr' ) AND t1.page_title NOT LIKE CONCAT('%/', IFNULL(t1.page_lang, 'en')) LIMIT 1
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.05"}
metawiki_p
jvws - Most edited pages on Kompetisi Wikisource 2023
Number of edits in page namespace.
# https://jv.wikisource.org/wiki/Wikisumber:Kompetisi_Wikisumber_2023 SELECT rc_title AS irah_irahan, COUNT(*) AS gunggung FROM recentchanges WHERE rc_namespace = 250 # Mandhala aran: "Kaca:" AND rc_timestamp BETWEEN '20230306000000' AND '20230320000000' GROUP BY 1 ORDER BY 2 DESC LIMIT 50;
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.05"}
jvwikisource_p
jvws - Most active editors on Kompetisi Wikisource 2023
Number of edits in page namespace.
# https://jv.wikisource.org/wiki/Wikisumber:Kompetisi_Wikisumber_2023 SELECT actor.actor_name AS naraguna, COUNT(actor.actor_name) AS gunggung FROM page JOIN revision ON page.page_id=revision.rev_page JOIN actor ON revision.rev_actor=actor.actor_id WHERE page.page_namespace=250 # Mandhala aran: "Kaca:" AND revision.rev_timestamp BETWEEN '20230306000000' AND '20230320000000' GROUP BY actor.actor_name ORDER BY gunggung DESC;
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.03"}
jvwikisource_p
Edit Warring Selected
null
WITH reverts AS ( SELECT DISTINCT(rev_actor), page_title, rev_id, rev_parent_id, page_id, LEFT(rev_timestamp, 8) AS date FROM page JOIN revision_userindex ON page_id = rev_page LEFT JOIN change_tag ON ct_rev_id = rev_id AND (ct_tag_id = 1 OR ct_tag_id = 539) WHERE rev_timestamp > 20200000000000 AND ct_tag_id IS NOT NULL AND page_namespace = 0 AND rev_actor IN (22260,17777971,141,2385,38036,9049,96,550504,94872,16955,16082,34574,211395073,63683) ), revert_count AS ( SELECT reverts.rev_actor, page_title, date, COUNT(*) AS occurrence FROM reverts JOIN revision ON revision.rev_id = reverts.rev_parent_id WHERE reverts.rev_actor != revision.rev_actor GROUP BY reverts.rev_actor, page_id, date ) SELECT actor_name, page_title, date, occurrence FROM revert_count JOIN actor ON actor_id = rev_actor WHERE occurrence > 1
{"resultsets": [{"headers": ["rev_actor", "rev_page", "page_title", "count(r.rev_id)"], "rowcount": 23743}], "runningtime": "24.60"}
enwiki_p
Edit count Eastern Europe and Balkans articles summary
null
WITH RECURSIVE get_name_dabs (page_title, page_id, page_namespace, inc, parent_title, parent_namespace) AS ( ( SELECT page_title, page_id, page_namespace, 1, page_title, page_namespace FROM page WHERE page_title IN ("Eastern_Europe", "Balkans") AND page_namespace = 14 ) UNION ( SELECT child.page_title, child.page_id, child.page_namespace, inc + 1, parent.page_title, parent.page_namespace FROM page AS child JOIN categorylinks as childLinks ON child.page_id = childLinks.cl_from JOIN get_name_dabs AS parent ON childLinks.cl_to = parent.page_title LEFT JOIN page_props ON childLinks.cl_from = pp_page AND pp_propname = "hiddencat" WHERE (child.page_namespace = 14 OR child.page_namespace = 0) AND parent.page_namespace = 14 AND pp_propname IS NULL AND inc < 4 ) ), counts AS (SELECT edits, reverted_edits, user_editcount AS total_edits FROM user RIGHT JOIN (SELECT actor_user, actor_name, COUNT(*) AS edits, COUNT(ct_tag_id) AS reverted_edits FROM get_name_dabs JOIN revision ON page_id = rev_page JOIN actor ON actor_id = rev_actor LEFT JOIN change_tag ON ct_rev_id = rev_id AND (ct_tag_id = 582 OR ct_tag_id = 590) WHERE rev_timestamp > 20220000000000 AND page_namespace = 0 GROUP BY actor_id) editors ON actor_user = user_id), sums AS (SELECT SUM(edits) as "AllEdits", SUM(reverted_edits) as "AllReverts", SUM(CASE WHEN total_edits > 499 THEN edits ELSE 0 END) as "EXCEdits", SUM(CASE WHEN total_edits > 499 THEN reverted_edits ELSE 0 END) as "EXCReverts", SUM(CASE WHEN total_edits < 500 THEN edits ELSE 0 END) as "nonEXCEdits", SUM(CASE WHEN total_edits < 500 THEN reverted_edits ELSE 0 END) as "nonEXCReverts", SUM(CASE WHEN total_edits > 9 THEN edits ELSE 0 END) as "AutoEdits", SUM(CASE WHEN total_edits > 9 THEN reverted_edits ELSE 0 END) as "AutoReverts", SUM(CASE WHEN total_edits < 10 THEN edits ELSE 0 END) as "nonAutoEdits", SUM(CASE WHEN total_edits < 10 THEN reverted_edits ELSE 0 END) as "nonAutoReverts", SUM(CASE WHEN total_edits > 9 AND total_edits < 500 THEN edits ELSE 0 END) as "AutoAndNonEXCEdits", SUM(CASE WHEN total_edits > 9 AND total_edits < 500 THEN reverted_edits ELSE 0 END) as "AutoAndNonEXCReverts" FROM counts) SELECT AllEdits, AllReverts, AllReverts / AllEdits AS "% reverts all", EXCEdits, EXCReverts, EXCReverts / EXCEdits AS "% reverts EXC", nonEXCEdits, nonEXCReverts, nonEXCReverts / nonEXCEdits AS "% reverts non-EXC", AutoEdits, AutoReverts, AutoReverts / AutoEdits AS "% reverts auto", nonAutoEdits, nonAutoReverts, nonAutoReverts / nonAutoEdits AS "% reverts non-auto", AutoAndNonEXCEdits, AutoAndNonEXCReverts, AutoAndNonEXCReverts / AutoAndNonEXCEdits AS "% reverts auto, non-EXC", EXCEdits / AllEdits AS "% EXC edits", AutoEdits / AllEdits AS "% Auto edits" FROM sums
{"resultsets": [{"headers": ["rev_actor", "rev_page", "page_title", "count(r.rev_id)"], "rowcount": 2034830}], "runningtime": "1830.21"}
enwiki_p
روابط شقيقة
null
select (page_title) from page inner join page_props on pp_page = page_id where page_id not in (select tl_from from templatelinks where tl_from = page_id and tl_from_namespace = 0 and tl_title like "%كومنز%") and page_id not in (select tl_from from templatelinks where tl_from = page_id and tl_from_namespace = 0 and tl_title like "%شقيق%") and page_id not in (select cl_from from categorylinks where cl_to like "صفحات_توضيح%" and cl_from = page_id) and page_namespace =0 and page_is_redirect = 0 and pp_propname = "wikibase_item" and TRIM(LEADING 'Q' FROM pp_value) in (select wikidatawiki_p.wb_items_per_site.ips_item_id from wikidatawiki_p.wb_items_per_site where wikidatawiki_p.wb_items_per_site.ips_item_id = TRIM(LEADING 'Q' FROM pp_value) and wikidatawiki_p.wb_items_per_site.ips_site_id like "commonswiki" );
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.05"}
arwiki_p
名称含U+2500(制表符)之页面
null
SELECT page.page_namespace as 命名空间编号, REPLACE(page.page_title, '_', ' ') as 页面名称 FROM page WHERE page.page_title like '%_─_%';
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 0}], "runningtime": "0.04"}
zhwiki_p
名称含U+2212(减号)之页面
null
SELECT page.page_namespace as 命名空间编号, REPLACE(page.page_title, '_', ' ') as 页面名称 FROM page WHERE page.page_title like '%_−_%';
{"resultsets": [{"headers": ["user_name", "count(log_id)"], "rowcount": 338}], "runningtime": "1.05"}
zhwiki_p
名称含U+2500(制表符)之页面
null
SELECT page.page_namespace as 命名空间编号, REPLACE(page.page_title, '_', ' ') as 页面名称 FROM page WHERE page.page_title like '%_―_%';
{"resultsets": [{"headers": ["actor_name", "log_title", "log_timestamp", "comment_text"], "rowcount": 67}], "runningtime": "1.59"}
zhwiki_p
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 1}], "runningtime": "0.06"}
commonswiki_p
Which languages have the most terms with redundant head parameter
null
select language, count as redundant_head_parameter_page_count, entry_count, round(cast(count as float) / cast(entry_count as float), 2) as fraction from ( select language, count(*) as count from ( select substring(cl_to, 1, instr(cl_to, '_terms_with_redundant_head_parameter') - 1) as language from categorylinks where cl_to like '%\_terms\_with\_redundant\_head\_parameter' ) as category_appearances group by language order by count desc ) as languages left join ( select entry_language, count(*) as entry_count from ( select substring(cl_to, 1, coalesce(nullif(instr(cl_to, '_lemmas'), 0), instr(cl_to, '_non-lemma_forms')) - 1) as entry_language, cl_from from categorylinks where cl_to like '%\_lemmas' or cl_to like '%\_non-lemma\_forms' group by cl_from, entry_language ) as entries group by entry_language ) as entries on entry_language = language;
{"resultsets": [{"headers": ["declined_then_deleted", "actor_name"], "rowcount": 172}], "runningtime": "20.63"}
enwiktionary
Which languages have the most terms with redundant head parameter
null
select language, count as redundant_head_parameter_page_count, lemma_count, nonlemma_count, round(cast(count as float) / cast(coalesce(lemma_count, 0) + coalesce(nonlemma_count, 0) as float), 2) as fraction from ( select language, count(*) as count from ( select substring(cl_to, 1, instr(cl_to, '_terms_with_redundant_head_parameter') - 1) as language from categorylinks where cl_to like '%\_terms\_with\_redundant\_head\_parameter' ) as category_appearances group by language order by count desc ) as languages left join ( select lemma_language, count(*) as lemma_count from ( select substring(cl_to, 1, instr(cl_to, '_lemmas') - 1) as lemma_language, cl_from from categorylinks where cl_to like '%\_lemmas' group by cl_from ) as lemmas group by lemma_language ) as lemmas on lemma_language = language left join ( select nonlemma_language, count(*) as nonlemma_count from ( select substring(cl_to, 1, instr(cl_to, '_non-lemma_forms') - 1) as nonlemma_language, cl_from from categorylinks where cl_to like '%\_non-lemma\_forms' group by cl_from ) as nonlemmas group by nonlemma_language ) as nonlemmas on nonlemma_language = language;
{"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.25"}
enwiktionary
Redirects to disambiguation pages that are not dab pages
null
#SELECT concat( "[https://en.wikipedia.org/w/index.php?title={{urlencode:", # p.page_title, "}}&redirect=no", p.page_title, "]" ) SELECT p.page_title AS "Redirects to disambiguation pages that aren't disambiguation pages" FROM redirect r INNER JOIN page p ON p.page_id = r.rd_from #FROM categorylinks INNER JOIN categorylinks c ON p.page_id = c.cl_from #LEFT JOIN page p ON (cl_from = p.page_id) #WHERE cl_to = "Redirects_for_discussion_with_talk_page_redirects" WHERE c.cl_to = "Redirects_to_disambiguation_pages" #AND p.page_title NOT IN (SELECT p.page_title # FROM categorylinks # INNER JOIN page p ON p.page_id = cl_from # WHERE cl_to = "All_disambiguation_pages") ORDER by p.page_title LIMIT 200;
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 107}], "runningtime": "6.06"}
enwiki
Redirects to disambiguation page where target is not a dab
null
SELECT Pf.page_namespace as "Fns", Pf.page_title AS "FromTitle", Pt.page_namespace as "Tns", Pt.page_title AS "ToTitle" FROM linktarget JOIN templatelinks ON tl_target_id=lt_id JOIN redirect ON rd_from=tl_from JOIN page Pt ON Pt.page_namespace=rd_namespace AND Pt.page_title=rd_title JOIN page Pf ON Pf.page_id=tl_from WHERE lt_namespace=10 AND lt_title="R_to_disambiguation_page" AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from=Pt.page_id AND cl_to REGEXP "disambiguation_pages|[Gg]iven_names|[Ss]urnames|[Ss]et_index_articles|[Ll]ists") ORDER BY Fns, Tns, FromTitle, ToTitle
{"resultsets": [{"headers": ["URL"], "rowcount": 0}], "runningtime": "31.98"}
enwiki_p
Peek one record from the page table
null
select p.page_title, group_concat(c.cl_to), r.rev_timestamp from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' group by p.page_title; #limit 2; /*select p.page_title, group_concat(c.cl_to) from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and p.page_title='History_of_Afghanistan' group by p.page_title limit 50;*/ #select * from page limit 1; /*select p.page_title, count(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' limit 5;*/ #select * from page p #join revision r on p.page_latest = r.rev_id # 1140660562; #where page_title ="Virat_Kohli" and page_namespace=0; /*select * from page p join revision r on p.page_latest=r.rev_id where p.page_title='History_of_Afghanistan' and p.page_namespace=0;*/ /*select p.page_title, count(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_title='History_of_Afghanistan' and p.page_namespace=0 ;*/ /*select p.page_title, group_concat(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_title='History_of_Afghanistan' and p.page_namespace=0 ;*/ #select * from categorylinks c #where c.cl_from=13813 /*# pages revised older than 2020 with page_len > 1000 select count(*) from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' and p.page_len > 1000 limit 100;*/ /*select count(*) from page p where p.page_namespace=0 and p.page_is_redirect=0;*/ /*select count(*) from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000'; */ /*select * from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' limit 5;*/ #select * from page p #join revision r on p.page_latest = r.rev_id # 1140660562; #where r.rev_timestamp < '20190318030012' #and #p.page_touched < '20190318030012' #limit 5; # left coast #select * from page p #; #join revision r on p.page_latest = r.rev_id #1127822228 #where p.page_id = 1131728; #select * from revision r #where r.rev_page = 1131728 #order by rev_timestamp desc; #select * from page p #where p.page_touched < 20190318030012 limit 5;
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 0}], "runningtime": "97.48"}
warwiki
Thanks for 2022 simplewiki
Most thanked people in 2022 on simplewiki (based on 1234qwer's script that ran for 2021)
USE simplewiki_p; SELECT log_title, COUNT(log_id) FROM logging_logindex WHERE log_type = "thanks" AND log_timestamp >= "20220000000000" AND log_timestamp <= "20230000000000" GROUP BY log_title ORDER BY 2 DESC
{"resultsets": [{"headers": ["num", "Page title"], "rowcount": 40075}], "runningtime": "31.27"}
simplewiki
Vital 5 articles w/o short description
Pages not in [[Category:Articles with short description]] whose talk page is in [[Category:All Wikipedia level-5 vital articles]]. For [[WP:RAQ#Level-5 Vital Articles lacking short descriptions]] circa 1 June 2022.
SELECT main.page_namespace, main.page_title FROM page AS talk JOIN categorylinks AS v5 ON v5.cl_from = talk.page_id AND v5.cl_to = 'All_Wikipedia_level-5_vital_articles' JOIN page AS main ON main.page_namespace = talk.page_namespace - 1 AND main.page_title = talk.page_title LEFT JOIN categorylinks AS sdesc ON sdesc.cl_from = main.page_id AND sdesc.cl_to = 'Articles_with_short_description' WHERE sdesc.cl_from IS NULL;
{"resultsets": [{"headers": ["num", "Page title"], "rowcount": 295997}], "runningtime": "293.95"}
enwiki_p
เหตุผลการลบที่ใช้บ่อยที่สุดในวิกิพีเดียภาษาไทยในช่วง 1 ปีที่ผ่านมา
null
SELECT comment_text as reason, COUNT(log_id) as "counter" FROM logging JOIN comment ON log_comment_id = comment_id WHERE log_type = 'delete' AND log_action = 'delete' # AND comment_text like '\[\[WP:CSD#%\|%\]\]%' AND log_timestamp > ( NOW() - INTERVAL 12 MONTH ) GROUP BY comment_text ORDER BY COUNT(log_id) desc LIMIT 50
{"resultsets": [{"headers": ["IP talkpage"], "rowcount": 1000}], "runningtime": "1999.93"}
thwiki_p
Year-title articles not assigned to WikiProjects
Detects articles WITH YEAR-LIKE TITLES that are not assigned to any Wikiprojects, regardless of whether or not they have talk pages.
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE article.page_namespace = 0 AND article.page_title RLIKE "^(AD_|BC_)?[0-9]+(_AD|_BC)?$" AND pp_page IS NULL AND article.page_is_redirect = 0 AND NOT (article.page_title LIKE "List_of_%") AND NOT (article.page_title LIKE "Lists_of_%") AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE article.page_id = cl_from AND ( cl_to IN ( "Temporary_maintenance_holdings", "Candidates_for_speedy_deletion", "Requested_RD1_redactions" ) OR cl_to LIKE "%_names" OR cl_to LIKE "%_surnames" OR cl_to LIKE "Lists_of_%" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = article.page_id AND lt_namespace = 10 AND ( lt_title IN ( "Wi", "Surname", "Given_name", "Animal_common_name", "Plant_common_name", "Nickname", "Dmbox" ) OR lt_title LIKE "%index%" OR lt_title LIKE "%redirect%" ) ) AND ( (talk.page_id IS NULL) OR ( (talk.page_id IS NOT NULL) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE talk.page_id = cl_from AND ( cl_to LIKE "%WikiProject_%" OR cl_to LIKE "%-Class_%_articles" OR cl_to LIKE "%-importance_%_articles" OR cl_to LIKE "%-priority_%_articles" OR cl_to LIKE "Unassessed_%_articles" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = talk.page_id AND lt_namespace = 10 AND (lt_title LIKE "%WikiProject_%") ) ) ) ORDER BY article.page_title
{"connection_id": 131879720}
enwiki_p
Single-character title articles not assigned to WikiProjects
Detects articles WITH SINGLE-CHARACTER TITLES that are not assigned to any Wikiprojects, regardless of whether or not they have talk pages. Hopefully this database treats "character" as meaning "Unicode code point", or there's not much point to this; this; https://mariadb.com/kb/en/pcre/#unicode-character-properties suggests it probably does.
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE article.page_namespace = 0 AND article.page_title RLIKE "^.$" AND pp_page IS NULL AND article.page_is_redirect = 0 AND NOT (article.page_title LIKE "List_of_%") AND NOT (article.page_title LIKE "Lists_of_%") AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE article.page_id = cl_from AND ( cl_to IN ( "Temporary_maintenance_holdings", "Candidates_for_speedy_deletion", "Requested_RD1_redactions" ) OR cl_to LIKE "%_names" OR cl_to LIKE "%_surnames" OR cl_to LIKE "Lists_of_%" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = article.page_id AND lt_namespace = 10 AND ( lt_title IN ( "Wi", "Surname", "Given_name", "Animal_common_name", "Plant_common_name", "Nickname", "Dmbox" ) OR lt_title LIKE "%index%" OR lt_title LIKE "%redirect%" ) ) AND ( (talk.page_id IS NULL) OR ( (talk.page_id IS NOT NULL) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE talk.page_id = cl_from AND ( cl_to LIKE "%WikiProject_%" OR cl_to LIKE "%-Class_%_articles" OR cl_to LIKE "%-importance_%_articles" OR cl_to LIKE "%-priority_%_articles" OR cl_to LIKE "Unassessed_%_articles" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = talk.page_id AND lt_namespace = 10 AND (lt_title LIKE "%WikiProject_%") ) ) ) ORDER BY article.page_title
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 47}], "runningtime": "1.76"}
enwiki_p
Numeric-title articles not assigned to WikiProjects
Detects articles WITH NUMBER-LIKE TITLES that are not assigned to any Wikiprojects, regardless of whether or not they have talk pages.
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE article.page_namespace = 0 AND article.page_title RLIKE "^[-+0-9.,_]+$" AND pp_page IS NULL AND article.page_is_redirect = 0 AND NOT (article.page_title LIKE "List_of_%") AND NOT (article.page_title LIKE "Lists_of_%") AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE article.page_id = cl_from AND ( cl_to IN ( "Temporary_maintenance_holdings", "Candidates_for_speedy_deletion", "Requested_RD1_redactions" ) OR cl_to LIKE "%_names" OR cl_to LIKE "%_surnames" OR cl_to LIKE "Lists_of_%" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = article.page_id AND lt_namespace = 10 AND ( lt_title IN ( "Wi", "Surname", "Given_name", "Animal_common_name", "Plant_common_name", "Nickname", "Dmbox" ) OR lt_title LIKE "%index%" OR lt_title LIKE "%redirect%" ) ) AND ( (talk.page_id IS NULL) OR ( (talk.page_id IS NOT NULL) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE talk.page_id = cl_from AND ( cl_to LIKE "%WikiProject_%" OR cl_to LIKE "%-Class_%_articles" OR cl_to LIKE "%-importance_%_articles" OR cl_to LIKE "%-priority_%_articles" OR cl_to LIKE "Unassessed_%_articles" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = talk.page_id AND lt_namespace = 10 AND (lt_title LIKE "%WikiProject_%") ) ) ) ORDER BY article.page_title
{"resultsets": [{"headers": ["IP talkpage"], "rowcount": 1}], "runningtime": "7.71"}
enwiki_p
Redirects created and only edited by a given actor
null
SELECT page_title FROM page JOIN revision_userindex AS main ON main.rev_page = page_id LEFT JOIN revision AS others ON others.rev_page = page_id AND others.rev_actor != 223547206 WHERE page_is_redirect = 1 AND main.rev_actor = 223547206 AND main.rev_parent_id = 0 AND others.rev_actor IS NULL AND page_latest != main.rev_id ORDER BY page_title ASC
{"resultsets": [{"headers": ["user_name", "page_len", "page_id"], "rowcount": 2}], "runningtime": "6.93"}
enwiki_p
Redirects to disambiguation pages that are not dab pages
null
#SELECT concat( "[https://en.wikipedia.org/w/index.php?title={{urlencode:", # p.page_title, "}}&redirect=no", p.page_title, "]" ) SELECT concat("[https://en.wikipedia.org/w/index.php?title={{ns:", Pf.page_namespace, "}}:{{urlencode:", Pf.page_title, "}}&redirect=no {{ns:", Pf.page_namespace, "}}:", Pf.page_title, "]") AS "FromTitle", Pt.page_namespace as "Tns", Pt.page_title AS "ToTitle" FROM linktarget JOIN templatelinks ON tl_target_id=lt_id JOIN redirect ON rd_from=tl_from JOIN page Pt ON Pt.page_namespace=rd_namespace AND Pt.page_title=rd_title JOIN page Pf ON Pf.page_id=tl_from WHERE lt_namespace=10 AND lt_title="R_to_disambiguation_page" AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from=Pt.page_id AND cl_to REGEXP "disambiguation_pages|[Gg]iven_names|[Ss]urnames|[Ss]et_index_articles|[Ll]ists") ORDER BY Tns, FromTitle, ToTitle
{"resultsets": [{"headers": ["YEAR(cl_timestamp)", "COUNT(DISTINCT(cl_from))"], "rowcount": 8}], "runningtime": "120.28"}
enwiki
All non-redirect, non-new page titles
null
SELECT page_title FROM page WHERE page_is_redirect = 0 AND page_is_new = 0 AND page_namespace = 0;
{"resultsets": [{"headers": ["year", "num_files"], "rowcount": 8}], "runningtime": "8.43"}
enwiki
Unique participants to @ISA on Commons (all years)
null
SELECT actor_name, COUNT(*) AS count FROM revision JOIN comment_revision ON rev_comment_id=comment_id JOIN page ON rev_page=page_id JOIN actor_revision ON rev_actor=actor_id JOIN change_tag ON rev_id=ct_rev_id JOIN change_tag_def ON ct_tag_id=ctd_id WHERE (ct_tag_id=414 OR ct_tag_id=593) AND rev_timestamp BETWEEN 20180101000000 AND 20231231999999 AND comment_text RLIKE 'campaign[0-9]+@ISA' GROUP BY rev_actor ORDER BY count DESC
{"resultsets": [{"headers": ["lt_title"], "rowcount": 112}], "runningtime": "9.81"}
commonswiki_p
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"connection_id": 132475769}
commonswiki_p
Stale pages
null
select p.page_id, p.page_title, p.page_latest, r.rev_id, r.rev_timestamp from page p join revision r on p.page_latest=r.rev_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' #limit 5;
{"resultsets": [{"headers": ["Reviewer", "Redirect Reviews"], "rowcount": 8}], "runningtime": "6.12"}
mywiki
Linter template error report
Create linter template errors report with total per template and pages in error using the template
SELECT linter_template, COUNT( * ) AS pages_using_template, SUM( linter_errors ) AS total_errors FROM ( SELECT linter_template, COUNT( linter_page ) AS linter_errors FROM linter WHERE linter_template != '' AND linter_template != 'multi-part-template-block' GROUP BY linter_template, linter_page ) subset GROUP BY linter_template ORDER BY total_errors DESC LIMIT 10 ;
{"resultsets": [{"headers": ["actor_name", "edits"], "rowcount": 1}], "runningtime": "2.48"}
test2wiki_p
Short-title articles not assigned to WikiProjects
Detects articles WITH SHORT TITLES that are not assigned to any Wikiprojects, regardless of whether or not they have talk pages.
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE article.page_namespace = 0 AND article.page_title RLIKE "^..?.?$" -- since {,n} construct does not seem to work properly AND pp_page IS NULL AND article.page_is_redirect = 0 AND NOT (article.page_title LIKE "List_of_%") AND NOT (article.page_title LIKE "Lists_of_%") AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE article.page_id = cl_from AND ( cl_to IN ( "Temporary_maintenance_holdings", "Candidates_for_speedy_deletion", "Requested_RD1_redactions" ) OR cl_to LIKE "%_names" OR cl_to LIKE "%_surnames" OR cl_to LIKE "Lists_of_%" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = article.page_id AND lt_namespace = 10 AND ( lt_title IN ( "Wi", "Surname", "Given_name", "Animal_common_name", "Plant_common_name", "Nickname", "Dmbox" ) OR lt_title LIKE "%index%" OR lt_title LIKE "%redirect%" ) ) AND ( (talk.page_id IS NULL) OR ( (talk.page_id IS NOT NULL) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE talk.page_id = cl_from AND ( cl_to LIKE "%WikiProject_%" OR cl_to LIKE "%-Class_%_articles" OR cl_to LIKE "%-importance_%_articles" OR cl_to LIKE "%-priority_%_articles" OR cl_to LIKE "Unassessed_%_articles" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = talk.page_id AND lt_namespace = 10 AND (lt_title LIKE "%WikiProject_%") ) ) ) ORDER BY article.page_title
{"resultsets": [{"headers": ["actor_name", "edits"], "rowcount": 1}], "runningtime": "0.38"}
enwiki_p
Unusual-prefix articles not assigned to WikiProjects
Detects articles WITH TITLES THAT START WITH UNUSUAL CHARACTERS that are not assigned to any Wikiprojects, regardless of whether or not they have talk pages.
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' LEFT JOIN page AS talk ON talk.page_title = article.page_title AND talk.page_namespace = 1 AND talk.page_is_redirect = 0 WHERE article.page_namespace = 0 AND article.page_title RLIKE "^[^A-Z0-9].*$" AND pp_page IS NULL AND article.page_is_redirect = 0 AND NOT (article.page_title LIKE "List_of_%") AND NOT (article.page_title LIKE "Lists_of_%") AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE article.page_id = cl_from AND ( cl_to IN ( "Temporary_maintenance_holdings", "Candidates_for_speedy_deletion", "Requested_RD1_redactions" ) OR cl_to LIKE "%_names" OR cl_to LIKE "%_surnames" OR cl_to LIKE "Lists_of_%" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = article.page_id AND lt_namespace = 10 AND ( lt_title IN ( "Wi", "Surname", "Given_name", "Animal_common_name", "Plant_common_name", "Nickname", "Dmbox" ) OR lt_title LIKE "%index%" OR lt_title LIKE "%redirect%" ) ) AND ( (talk.page_id IS NULL) OR ( (talk.page_id IS NOT NULL) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE talk.page_id = cl_from AND ( cl_to LIKE "%WikiProject_%" OR cl_to LIKE "%-Class_%_articles" OR cl_to LIKE "%-importance_%_articles" OR cl_to LIKE "%-priority_%_articles" OR cl_to LIKE "Unassessed_%_articles" ) ) AND NOT EXISTS ( SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = talk.page_id AND lt_namespace = 10 AND (lt_title LIKE "%WikiProject_%") ) ) ) ORDER BY article.page_title
{"connection_id": 132884855}
enwiki_p
Find pages without recent revisions: my
null
select p.page_title as 'Title', group_concat(c.cl_to) as 'Categories', r.rev_timestamp as 'Last edit date', concat('https://my.wikipedia.org/wiki/', p.page_title) as 'URL' from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' group by p.page_title; #limit 2;
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 31}], "runningtime": "2.33"}
mywiki
Find pages without recent revisions: sw
null
select p.page_title as 'Title', group_concat(c.cl_to) as 'Categories', r.rev_timestamp as 'Last edit date', concat('https://sw.wikipedia.org/wiki/', p.page_title) as 'URL' from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' group by p.page_title; #limit 2;
{"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 11146}], "runningtime": "17.04"}
swwiki
Find pages without recent revisions: arz
null
select p.page_title as 'Title', group_concat(c.cl_to) as 'Categories', r.rev_timestamp as 'Last edit date', concat('https://arz.wikipedia.org/wiki/', p.page_title) as 'URL' from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' group by p.page_title; #limit 2;
{"resultsets": [{"headers": ["page_id"], "rowcount": 4}], "runningtime": "36.85"}
arzwiki
WhatLinksHere
null
SELECT page.page_namespace, page.page_title FROM enwikisource_p.page page INNER JOIN enwikisource_p.pagelinks pagelinks ON page.page_id = pagelinks.pl_from WHERE pagelinks.pl_title LIKE 'Love_Songs/%' GROUP BY page.page_title
{"resultsets": [{"headers": ["Number of articles"], "rowcount": 1}, {"headers": ["Number of issues"], "rowcount": 1}], "runningtime": "0.07"}
enwikisource_p
A small sample from the thanks log
null
SELECT logging.*, page_namespace, page_title, actor_name, comment_text FROM logging LEFT JOIN page ON page_id=log_page JOIN actor ON actor_id=log_actor LEFT JOIN `comment` ON comment_id=log_comment_id WHERE log_timestamp>'20230322' AND log_type='thanks' LIMIT 10;
{"resultsets": [{"headers": ["timestamp", "concat(\"\",log_title)", "comment_text", "actor_name"], "rowcount": 48}], "runningtime": "186.24"}
enwiki_p
WStaஈரோடுமாவட்டவரலாறு
This Query will provide the list of users who did edit on given book with its all pages.
Use tawikisource_p; SET @w:=0; select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book WHERE rev_page IN (select page_id from page where page_title like "ஈரோடு_மாவட்ட_வரலாறு.pdf%") group by actor_name) as tt order by edits desc LIMIT 100;
{"resultsets": [{"headers": ["cl_to"], "rowcount": 15}], "runningtime": "0.06"}
tawikisource_p
WLM-UA participants FILM
null
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line FROM revision r_prev join categorylinks on rev_page = cl_from join actor on rev_actor = actor_id and actor_user is not null WHERE rev_parent_id = 0 and cl_to IN ( "Wiki Loves Monuments in Ukraine 2022 - Film" ) GROUP BY actor_name
{"resultsets": [{"headers": ["cl_to", "count(*)"], "rowcount": 382}], "runningtime": "0.44"}
commonswiki_p
链入最少的电子游戏条目 (zhwiki)
null
WITH pages_vg AS ( WITH pages_vg_talk AS ( SELECT page.page_namespace, page.page_title FROM page JOIN categorylinks ON cl_to IN ( '极高重要度电子游戏条目', '高重要度电子游戏条目', '中重要度电子游戏条目', '低重要度电子游戏条目', '未知重要度电子游戏条目' ) AND cl_type = 'page' AND cl_from = page.page_id ) SELECT page.page_id, page.page_title FROM page JOIN pages_vg_talk ON page.page_title = pages_vg_talk.page_title AND page.page_namespace + 1 = pages_vg_talk.page_namespace ), page_linked AS ( SELECT pages_vg.page_title, COUNT(*) AS links FROM pages_vg JOIN pagelinks ON pages_vg.page_title = pagelinks.pl_title AND pagelinks.pl_namespace = 0 AND pagelinks.pl_from_namespace = 0 GROUP BY pages_vg.page_title ) SELECT CONCAT( '* [[:', REPLACE(page_title, '_', ' '), ']] <small>[', FORMAT(links, 'N'), ']</small>' ) AS result FROM page_linked ORDER BY links ASC, page_title ASC;
{"resultsets": [{"headers": ["basepage_title"], "rowcount": 105}], "runningtime": "0.33"}
zhwiki_p
Wikhttps://quarry.wmcloud.org/i Loves Folklore 2023 in Ukraine Participants
null
SELECT A.actor_name, COUNT(1) as files FROM commonswiki_p.image I JOIN commonswiki_p.page P ON I.img_name = P.page_title JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from JOIN commonswiki_p.actor A ON I.img_actor = A.actor_id WHERE P.page_namespace = 6 AND CL.cl_to = "Images_from_Wiki_Loves_Folklore_2023_in_Ukraine" GROUP BY A.actor_name ORDER BY files DESC
{"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 3}], "runningtime": "87.22"}
commonswiki_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len FROM page talkpage WHERE talkpage.page_title NOT LIKE '%/%' AND talkpage.page_namespace IN (1,11,15,101,119) AND NOT EXISTS ( SELECT 1 FROM page mainpage WHERE mainpage.page_namespace=talkpage.page_namespace-1 AND mainpage.page_title=talkpage.page_title ) AND NOT EXISTS ( SELECT 1 FROM templatelinks WHERE talkpage.page_id=tl_from AND tl_target_id = 418257 ) LIMIT 100
{"resultsets": [{"headers": ["Usertalk", "page_title", "linter_errors"], "rowcount": 2500}], "runningtime": "28.78"}
enwiki_p
مستخدمين اليوم
null
/* #select CONCAT('"',log_title,'",') select log_title from logging where log_type in ("newusers") and log_timestamp > DATE_SUB(NOW(), INTERVAL 1 day) and log_title not in ( select page.page_title from categorylinks inner join page on page.page_id = categorylinks.cl_from where cl_to like "أسماء_مستخدمين_مخالفة_مرشحة_للمنع" and cl_type in ("page") ) and log_title not in ( select replace(user.user_name," ","_") as "user_name_temp" from ipblocks inner join user on ipblocks.ipb_user = user.user_id ) */ select log_title as "q_log_title" from logging where log_type in ("newusers") and log_timestamp BETWEEN 20221207000000 AND 20230322235959 and log_title not in ( select page.page_title from categorylinks inner join page on page.page_id = categorylinks.cl_from where cl_to like "أسماء_مستخدمين_مخالفة_مرشحة_للمنع" and cl_type in ("page") ) and log_title not in ( select replace(user.user_name," ","_") as "user_name_temp" from ipblocks inner join user on ipblocks.ipb_user = user.user_id )
{"resultsets": [{"headers": ["page_title"], "rowcount": 55}], "runningtime": "6.76"}
arwiki_p
Uploaded while editing page on fi.wikipedia.org
null
SELECT rc_timestamp, rc_title, rc_user_text, rc_comment FROM recentchanges_compat WHERE rc_comment LIKE "%fi.wikipedia.org%" AND rc_source="mw.log" ORDER BY rc_timestamp ;
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 1}], "runningtime": "98.01"}
commonswiki_p
All orphan no-licensed and non-free files on sq.wiki
null
#USE sqwiki_p; SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from LEFT JOIN imagelinks i ON p.page_title = i.il_to #AND (i.il_from_namespace = 0) #LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.cl_to = "All_orphaned_non-free_use_Wikipedia_files" #WHERE c1.cl_to = "All_non-free_media" #WHERE c1.cl_to = "All_Wikipedia_files_with_a_different_name_on_Wikimedia_Commons" #WHERE c1.cl_to = "Non_Licensed_Images" #WHERE c1.cl_to = "All_free_media" WHERE c1.cl_to = "Files_with_no_machine-readable_source" AND i.il_from IS NULL #AND c2.cl_from IS NULL AND p.page_namespace = 6
{"resultsets": [{"headers": ["title", "count"], "rowcount": 4}], "runningtime": "0.06"}
sqwiki_p
Find pages without recent revisions: ilo
null
select p.page_title as 'Title', group_concat(c.cl_to) as 'Categories', r.rev_timestamp as 'Last edit date', concat('https://ilo.wikipedia.org/wiki/', p.page_title) as 'URL' from page p join revision r on p.page_latest=r.rev_id join categorylinks c on c.cl_from=p.page_id where p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp<'20200101000000' group by p.page_title; #limit 2;
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 10}], "runningtime": "0.06"}
ilowiki
Explicit deletions at midnight
null
select distinct substring(log_timestamp, 1, 8) from logging_userindex join actor on log_actor = actor_id where actor_name = "Explicit" and log_type = "delete" and log_action = "delete" and log_timestamp like "20______0000%" order by log_timestamp desc;
{"resultsets": [{"headers": ["user_name", "+\u0628\u0648\u062a", "+\u0625\u062f\u0627\u0631\u064a"], "rowcount": 4}], "runningtime": "0.19"}
enwiki
Top Wikipedia User by Bytecounts (This month)
Verify each user's contribution here : https://quarry.wmflabs.org/query/54879
select * /*sum(tdif)*/ from (select actor_name, sum( cast(rc_new_len as int) - cast(rc_old_len as int)) tdif from recentchanges_userindex left join actor on rc_actor = actor_id where rc_timestamp >= 20230301000000 and rc_timestamp <= 20230325000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') group by actor_name) a where tdif >= 30000 order by tdif desc
{"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "2.40"}
idwiki_p
Wikidata stats
null
select rc_timestamp, rc_user_text, rc_source, count(distinct(rc_this_oldid)) as c, sum(rc_source="mw.edit") as edits, sum(rc_source="mw.new") as creation, count(distinct(user_id*(user_editcount>99))) as uc100, count(distinct(user_id*(user_editcount>10)))-count(distinct(user_id*(user_editcount>100))) as uc10, count(distinct(user_id*(user_editcount>0)))-count(distinct(user_id*(user_editcount>10))) as uc1 from user, wb_items_per_site, page, recentchanges_compat where ips_site_id="fiwiki" and concat("Q", ips_item_id)=page_title AND page_namespace=0 AND rc_cur_id=page_id AND rc_source IN ('mw.edit', 'mw.new') AND rc_bot=0 AND rc_user=user_id;
{"resultsets": [{"headers": ["p", "p\u0422\u041c\u041f1", "p\u0422\u041c\u041f2", "new_text"], "rowcount": 1}], "runningtime": "0.06"}
wikidatawiki_p