title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Kategori bazlı kırmızı bağlantı
Belirlenmiş kategorideki sayfalardan kırmızı bağlantıları listeler. "Marvel_Sinematik_Evreni_dizileri" kategorisini istediğiniz kategoriyle değiştirip limiti de ihtiyacınız olan şekilde ayarlayın.
USE trwiki_p; # Kırmızı bağlantının hangi sayfada olduğunu görmek istiyorsan; SELECT page_title AS "Sayfa", CONCAT('* [[',pl_title,']]') AS "Kırmızı bağlantı" # (Dikkat! Bu durumda farklı sayfalardaki kırmızı bağlantılar tekrar eder.) # Aksi halde # SELECT DISTINCT CONCAT('# [[',pl_title,']]') AS "Kırmızı bağlantı"...
{"resultsets": [{"headers": ["page_id", "title", "rev_count", "first_rev_id", "first_rev_timestamp"], "rowcount": 189}], "runningtime": "2.89"}
trwiki_p
nlwiki Anomalous "hoofdbetekenis" constructs
<term>_(hoofdbetekenis) redirects to rd_title1 but "<term>" redirects to rd_title2
SELECT p1.page_title AS page_title1, r1.rd_title AS rd_title1, r2.rd_title AS rd_title2 FROM page p1 INNER JOIN redirect r1 ON p1.page_id=r1.rd_from LEFT JOIN page p2 ON r1.rd_namespace=p2.page_namespace AND LEFT(p1.page_title,LENGTH(p1.page_title)-17)=p2.page_title LEFT JOIN redirec...
{"resultsets": [{"headers": ["page_title"], "rowcount": 10}], "runningtime": "0.07"}
nlwiki
Contributors to INSERT PAGE NAME
null
SELECT user_name, user_editcount, COUNT(*) AS page_edits FROM enwiki_p.revision JOIN enwiki_p.actor ON actor_id=rev_actor JOIN enwiki_p.user ON user_id=actor_user WHERE rev_page=(SELECT page_id FROM enwiki_p.page WHERE page_namespace=5 AND page_title='Talk_pages_project') GROUP BY user_name;
{"resultsets": [{"headers": ["pl_from", "pl_from_namespace", "pl_namespace", "pl_title"], "rowcount": 10}], "runningtime": "0.05"}
enwiki_p
Template richiesti su Wikiquote
null
USE itwikiquote_p; SELECT CONCAT('# [[Template:', tl_title, ']] (', COUNT(*), ' collegamenti)') FROM templatelinks LEFT JOIN page ON ((page_namespace = tl_namespace) AND (page_title = tl_title)) WHERE (page_title IS NULL) AND tl_namespace = '10' AND tl_from IN (SELECT page_id FROM page WHERE page_namespace = '0' OR pag...
{"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 38}], "runningtime": "2.17"}
itwikiquote
Redirect a discussioni su Wikiquote
null
USE itwikiquote_p; SELECT CONCAT('# [[{{ns:', page_namespace, '}}:', page_title, ']]') FROM page AS p1 WHERE page_is_redirect = 1 AND page_namespace IN (1, 11, 15, 101, 103) AND NOT EXISTS (SELECT * FROM pagelinks JOIN page AS p2 ON pl_from = p2.page_id WHERE pl_title = p1.page_title AND pl_namespac...
{"connection_id": 123174715}
itwikiquote_p
Categorie che sono redirect su Wikiquote
null
USE itwikiquote_p; SELECT CONCAT("# [[:Categoria:", page_title, "]]") FROM page WHERE page_namespace = 14 AND page_is_redirect = 1 ORDER BY page_title;
{"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 11}], "runningtime": "2.63"}
itwikiquote_p
Tewiki:All time Top 100 users by bytes added in NS0
null
USE tewiki_p; SELECT actor_name, actor_user, count(actor_name) as Edit_count, SUM(abs(CAST(rev.rev_len as signed)-if(rev.rev_parent_id=0,0,CAST(parent.rev_len as signed)))) AS Gross_byte_count, SUM(CAST(rev.rev_len as signed)-if(rev.rev_parent_id=0,0,CAST(parent.rev_len as signed))) AS nett_byte_count FROM r...
{"resultsets": [{"headers": ["actor_name", "edit_count"], "rowcount": 1208}], "runningtime": "1.23"}
tewiki
nlwiki Probably missing category sort key
Pages without an explicit category sort key in categories where more than 90% of them contain a comma.
SELECT page_namespace AS ns, page_title, page_is_redirect AS rd, REPLACE(REGEXP_REPLACE(page_title, '_\\(.*\\)$', ''),'_',' ') AS name, cf.cl_to AS cat, cf.commas FROM page, ( # fraction of pages in a category having a comma in the sortkey SELECT cl_to, (COUNT(*) / (cat_pages-cat_subcats)) A...
{"resultsets": [{"headers": ["month_year", "user", "No_of_articles", "Bytes"], "rowcount": 378}], "runningtime": "0.41"}
nlwiki
Locked users with global permissions
null
SELECT gu_id, gu_name, gug_group FROM globaluser JOIN global_user_groups ON gug_user=gu_id WHERE gu_locked = 1
{"connection_id": 78090726}
centralauth_p
Tewiki: Stubs created in 2020
null
use tewiki_p; select -- actor_name, p.page_title, p.page_len -- rev_timestamp as creation_date -- concat(mid(rev_timestamp,1,4),"-",mid(rev_timestamp,5,2),"-",mid(rev_timestamp,7,2)) as creation_date from page p where -- page_id=rev_page -- and r.rev_parent_id = 0 -- and actor_id=rev_actor ...
{"resultsets": [{"headers": ["actor_name", "days"], "rowcount": 1}], "runningtime": "62.18"}
tewiki_p
Number of patrol actions (alltime) by user (hrwiki)
null
select actor.actor_name, count(*) from logging_userindex join actor on log_actor = actor_id and log_type = "patrol" and not log_action = "autopatrol" group by actor.actor_name order by count(*) desc
{"resultsets": [{"headers": ["up_user", "up_property", "up_value"], "rowcount": 0}], "runningtime": "0.04"}
hrwiki_p
hrwiki Self-referencing categories
null
SELECT cl_to AS cat FROM categorylinks, page WHERE cl_from=page_id AND page_namespace=14 AND cl_to=page_title
{"resultsets": [{"headers": ["up_property", "up_value", "c"], "rowcount": 60}], "runningtime": "0.52"}
hrwiki_p
SHWiki: Broken redirects
null
SELECT rd.page_title#, rd_namespace, rd_title FROM redirect JOIN page rd ON rd_from = rd.page_id LEFT JOIN page target ON target.page_namespace = rd_namespace AND target.page_title = rd_title WHERE rd.page_namespace = 0 AND target.page_id IS NULL AND rd_interwiki = "" AND rd_namespace = 0 # >= 0
{"connection_id": 80123797}
shwiki_p
DPLA upload metrics breakdown by hub
null
SELECT REPLACE(REPLACE(REPLACE(cl_to, "_", " "), "Media contributed by the ", ""), "Media contributed by ", "") AS "Institution", FORMAT(COUNT(img_name), 'N0') AS "File count", FORMAT(COUNT(DISTINCT REGEXP_REPLACE(REGEXP_REPLACE(img_name, '^.*DPLA_-_', ''), '[\.|_].*$', '')), 'N0') AS "Item count", ROUND(SUM(img_...
{"connection_id": 71298164}
commonswiki_p
nlwiki Red links that appear to have a namespace prefix
Column 'sp' = whether a space can be inserted after the colon to make the red link blue. Executes in ~3-6 min.
SELECT fp.page_namespace AS fn, fp.page_title AS ft, pl_namespace AS tn, pl_title AS tt, MIN(rev_timestamp) AS created, MAX(rev_timestamp) AS 'last-mod', EXISTS (SELECT * FROM page WHERE page_namespace=pl_namespace AND page_title=REGEXP_REPLACE(pl_title, ':+', ':_')) AS sp FROM pagelinks, ...
{"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 12}], "runningtime": "0.05"}
nlwiki
Climate-change content on enwiki
Get all climate-change-related articles from English Wikipedia based on tagging by WikiProject Climate Change (https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Climate_change)
SELECT pa_page_id AS page_id, page_title AS page_title, pa_class AS quality_class, pa_importance AS importance_class FROM page_assessments INNER JOIN page_assessments_projects ON (pap_project_id = pa_project_id AND pap_project_title = 'Climate change') INNER JOIN page ON (pa_page_id = page_id AN...
{"resultsets": [{"headers": ["p"], "rowcount": 0}], "runningtime": "0.06"}
enwiki_p
nlwiki Anomalous talk page redirects
Talk page redirects where the corresponding content page exists, but isn't also a redirect.
SELECT s.page_namespace AS subject_ns, t.page_namespace AS talk_ns, s.page_title AS title, pp_propname<=>'disambiguation' AS disambig FROM `page` t INNER JOIN `page` s ON (s.page_namespace=(t.page_namespace-1) AND s.page_title=t.page_title) LEFT JOIN page_props ON (s.page_id=pp_page AND pp_propname...
{"resultsets": [{"headers": ["Page Title", "Size (bytes)"], "rowcount": 0}], "runningtime": "0.04"}
nlwiki
ruwiki 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.ip...
{"resultsets": [{"headers": ["page_title", "page_id", "talk_id"], "rowcount": 756}], "runningtime": "397.90"}
wikidatawiki_p
nlwiki Anomalies with "IJ"
1. Finds red links that start with "Ij" while a blue link exists with "IJ". 2. Finds pages that start with "IJ", without a redirect to it(s target) that start with "Ij" TODO: use pagelinks to find actual links.
/*SELECT page_namespace AS 'src-ns', page_title AS 'src-title', pl_namespace AS 'tgt-ns', pl_title AS 'tgt-title' FROM `pagelinks`, `page` ps WHERE pl_namespace NOT IN (2,3) AND # no links to user namespaces pl_title REGEXP '^Ij' AND # target title starts with 'Ij' NOT EXISTS ( # target page doesn't exi...
{"resultsets": [{"headers": ["page_title"], "rowcount": 447}], "runningtime": "0.78"}
nlwiki
Links from Olympic games to Disambiguation pages , de
null
SELECT pl_from, pl_title FROM page , categorylinks as cl1, categorylinks as cl2, pagelinks Where cl2.cl_to = 'Begriffsklärung' AND cl2.cl_from= page_id AND pl_title=page_title AND pl_from_namespace = 0 AND pl_namespace = 0 AND cl1.cl_to like '%lympisch%' AND cl1.cl_to not like '%eilnehmer%' AN...
{"resultsets": [{"headers": ["actor_name", "count"], "rowcount": 437}], "runningtime": "13.09"}
dewiki_p
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 20, "headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"]}], "runningtime": "0.13"}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 2, "headers": ["page_title"]}], "runningtime": "0.12"}
null
Gender of editors to specific page
null
use dewiki_p; select distinct actor_name as "username", (select up_value from user_properties where up_user=actor_user and up_property="gender") as "gender" from revision join actor on rev_actor=actor_id where rev_page= (select page_id from page where page_namespace=4 and page_title="Vandalismusmeldung")
{"connection_id": 816470899}
null
Users by Registration Year
null
USE dewiki_p; SELECT SUM(IF(up_value = "male", 1, 0)) as male, SUM(IF(up_value = "female", 1, 0)) as female, YEAR(user_registration) as Jahr FROM (SELECT user_id, user_registration, up_value, up_property FROM user INNER JOIN user_properties ON up_user=user_id) AS joined WHERE up_property = "gender" GRO...
{"resultsets": [{"rowcount": 6, "headers": ["wikitext"]}], "runningtime": "347.27"}
null
Distribution of registration time for users with 5+ edits (enwiki)
null
SELECT SUBSTR(user_registration, 1, 6) AS registration_date, count(*) AS new_users GROUP BY registration_date;
{"resultsets": [{"rowcount": 1000, "headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"]}], "runningtime": "41.24"}
null
Users of dewiki by year of registration
null
use dewiki_p; SELECT year(user_registration), Count (user_registration) as "Neue" FROM dewiki_p.user Group by YEAR(user_registration);
{"runningtime": "304.55", "resultsets": [{"headers": ["wikitext"], "rowcount": 2}]}
null
Registration year of dewiki users
See https://quarry.wmflabs.org/query/37312 for enwiki. See https://quarry.wmflabs.org/query/37314 for 25+ edits.
use enwiki_p; SELECT CONCAT(SUBSTR(user_registration, 1, 4)) AS registration_date, -- SUBSTR(user_registration, 1, 6) AS registration_date, count(*) AS new_users FROM user GROUP BY registration_date ORDER BY registration_date ;
{"resultsets": [{"rowcount": 7185, "headers": ["img_name"]}], "runningtime": "19.79"}
null
Expiring drafts with revision count
null
SELECT DISTINCT CONCAT("Draft:",page_title), (select rev_timestamp from revision where rev_page=page_id order by rev_timestamp desc limit 1) as rev_timestamp_, (select COUNT(rev_timestamp) from revision where rev_page=page_id) as revision_count FROM page WHERE page_namespace = 118 AND page_is_redirect = 0 AND (sele...
{"resultsets": [{"rowcount": 24, "headers": ["page_title"]}], "runningtime": "31.32"}
null
Count of G13able drafts
null
SELECT COUNT(page_title) FROM page WHERE page_namespace = 118 AND page_is_redirect = 0 AND (select rev_timestamp from revision where rev_page=page_id order by rev_timestamp desc limit 1) < (NOW() - INTERVAL 6 MONTH);
{"connection_id": 285109122}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 10, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey...
null
Ebay-Links
null
USE dewiki_p; SELECT CONCAT('[[', REPLACE(page_title, '_', ' '), ']]') AS 'Page', CONCAT('[https://web.archive.org/web/*/', el_to, ' Archive]') AS 'Archive', el_to AS 'Link' FROM page, externallinks WHERE el_from = page_id AND page_namespace = 0 AND (el_to LIKE "https://www.ebay.de%" OR el_to LIK...
{"resultsets": [{"rowcount": 310, "headers": ["page_title", "el_to"]}], "runningtime": "874.48"}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 0, "headers": ["time", "user", "namespace", "page", "comment"]}], "runningtime": "0.08"}
null
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৮ জানু ২০২০
USE bnwiki_p; SELECT CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম, COUNT(rev_id) AS মোট_নিবন্ধ FROM actor INNER JOIN revision ON revision.rev_actor = actor.actor_id JOIN page ON page.page_id = revision.rev_page WHERE page_is_redirect = 0 AND rev_parent_id = 0 AND page_namespace = 0 AND rev...
{"runningtime": "0.15", "resultsets": [{"headers": ["from_ns", "from_title", "to_title"], "rowcount": 0}]}
null
ניסיון לעדכון השאילתא של שרי אלפים וכו'
נכתב ע"י יגאל
use hewiki_p; select concat(page, "{{כ}} ([[", disambig, "]])") from replace(p2.page_title, "_", " ") as disambig, (select distinct disambig, page, ns from select user_name, count(page_title) from user join revision_userindex join page join actor on user_id = actor_user and rev_page = page_id and rev_acto...
{"runningtime": "1069.41", "resultsets": [{"headers": ["concat(year(rev_timestamp), \"-\", month(rev_timestamp))", "count(*)"], "rowcount": 36}]}
null
Editors with more than 5 edits in last 30 days (arwiki)
Results order by there edits count in the same period.
USE arwiki_p; select actor_name, count(rev_actor) from revision JOIN actor ON actor_id = rev_actor where rev_timestamp > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND actor_name IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'editor') AND actor_name NOT IN (SELECT user_name...
{"resultsets": [{"rowcount": 0, "headers": ["page_title", "tcount"]}], "runningtime": "38.88"}
null
Editors with more than 200 edits in last 180 days (plwiktionary)
Results order by there edits count in the same period.
USE plwiktionary_p; select actor_name, count(rev_actor) from revision JOIN actor ON actor_id = rev_actor where rev_timestamp > DATE_SUB(NOW(), INTERVAL 6 MONTH) AND actor_name NOT IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'bot') group by rev_actor having count(rev_...
{"resultsets": [{"rowcount": 81, "headers": ["page_title"]}], "runningtime": "0.83"}
null
Articles without talk pages on eswiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE eswiki_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...
{"resultsets": [{"rowcount": 335765, "headers": ["afl_user_text", "cnt"]}], "runningtime": "959.86"}
null
Articles without talk pages on dewiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE dewiki_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...
{"resultsets": [{"rowcount": 2, "headers": ["page_id", "page_title", "page_len"]}, {"rowcount": 0, "headers": ["page_id", "page_title", "page_len"]}, {"rowcount": 0, "headers": ["page_id", "page_title", "page_len"]}], "runningtime": "1.22"}
null
Articles without talk pages on huwiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE huwiki_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...
{"resultsets": [{"rowcount": 35, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 13, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 12, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.98"}
null
Articles without talk pages on thwiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE thwiki_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...
{"resultsets": [{"rowcount": 3662, "headers": ["user_name", "ug_group"]}], "runningtime": "11.66"}
null
Articles without talk pages on arwiki
Number of all mainspace pages and number of mainspace pages without corresponding talk pages on the English Wikipedia.
USE arwiki_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": "2.28", "resultsets": [{"headers": ["user_name", "ug_group"], "rowcount": 765}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 3662, "headers": ["user_name"]}], "runningtime": "10.03"}
null
Random draw for 2020 Best GA award on fawiki
null
use fawiki_p; select page_random from page where page_title = 'جایزه_مقاله_سال/۲۰۲۱/قرعه'
{"resultsets": [{"rowcount": 100, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortke...
null
Wikimarathon 2021 for UKWP
List of articles created for the Investigative Journalism Week on UkWiki
USE ukwiki_p; SET SESSION group_concat_max_len = 10000; SELECT @rownum := @rownum + 1 AS rank, IFNULL(actor_name, 'Всього'), created, total_len, articles FROM ( SELECT CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name, COUNT(1) AS created, SUM(article.page_len) as...
{"connection_id": 823092866}
null
All editors on German Wikipedia by registration date 2019+, 25+ edits 2021
null
USE dewiki_p; SELECT user_name, edits_after, user_registration FROM user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" GROUP BY edit_username ) AS ...
{"connection_id": 289426259}
null
All bot editors on German Wikipedia by registration date 2019+, 25+ edits 2021+
null
USE dewiki_p; SELECT user.user_name, edits_after, ug_group FROM user_groups JOIN user ON user.user_id = user_groups.ug_user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" ...
{"connection_id": 823342385}
null
All editors on German Wikipedia by registration date 2019+, 50+ edits 2021
null
USE dewiki_p; SELECT user_name, edits_after, user_registration FROM user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" GROUP BY edit_username ) AS ...
{"runningtime": "0.08", "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": 0}]}
null
All editors on German Wikipedia by registration date 2001–2004, 1+ edits 2021+
null
USE dewiki_p; SELECT user_name, edits_after FROM user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" GROUP BY edit_username ) AS last_edits ...
{"resultsets": [{"rowcount": 10, "headers": ["ll_from", "ll_lang", "ll_title"]}], "runningtime": "0.09"}
null
All editors on German Wikipedia by registration date 2001–2003, 1+ edits 2021+
null
USE dewiki_p; SELECT user_name, edits_after FROM user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" GROUP BY edit_username ) AS last_edits ...
{"resultsets": [{"rowcount": 16, "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", "cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey...
null
*.js-Seiten von infinite gesperrten Benutzern
null
USE dewiki_p; SELECT ipb_address, GROUP_CONCAT(CONCAT('[[Benutzer:', page_title, ']]') SEPARATOR ', ') FROM page STRAIGHT_JOIN ipblocks WHERE ipb_expiry = 'infinity' /* AND ipb_timestamp BETWEEN '20201110000000' AND '20210000000000' */ AND page_content_model = 'javascript' AND page_namespace = 2 AND page...
{"resultsets": [{"rowcount": 66, "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", "cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey...
null
All "Sichter" editors on German Wikipedia, 1+ edit 2021+
null
USE dewiki_p; SELECT user.user_name, edits_after, ug_group FROM user_groups JOIN user ON user.user_id = user_groups.ug_user INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" ...
{"resultsets": [{"rowcount": 10, "headers": ["page_id", "page_title"]}, {"rowcount": 1, "headers": ["ll_from", "ll_lang", "ll_title"]}], "runningtime": "0.18"}
null
اكثر المستخدمين انشاء للمقالات
null
USE arwiki_p; SELECT concat(actor_name) AS "المستخدم", COUNT(*) AS "عدد المقالات" FROM revision r INNER JOIN actor ON r.rev_actor = actor.actor_id INNER JOIN page p on r.rev_page = p.page_id WHERE p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp between 2021021400000 and 20210221...
{"resultsets": [{"rowcount": 0, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}], "runningtime": "0.08"}
null
enwiki bot stats3
enwiki bots
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit' FROM `user` LEFT JOIN user_groups ugbot ON user_id = ugbot.ug_user AND ugbot.ug_group = 'bot' JOIN actor ON actor_user = user_id JOIN revision_userindex ON rev_id = (SELECT rev_id FROM revision_userindex WHERE actor_id...
{"runningtime": "6.57", "resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 819}]}
null
Editors with more than 5 edits in last 30 days (arwiki)
Results order by there edits count in the same period.
USE mswiki_p; select actor_name, count(rev_actor) from revision JOIN actor ON actor_id = rev_actor where rev_timestamp > DATE_SUB(NOW(), INTERVAL 3 MONTH) AND actor_name IN (SELECT user_name FROM users INNER JOIN user ON user_id = ug_user WHERE ug_group = 'users') AND actor_name NOT IN (SELECT user_name FROM u...
{"connection_id": 824906226}
null
How many images were uploaded to Commons between October 22nd 2019 to January 31st 2021
null
use commonswiki_p; SELECT count(*) FROM image WHERE img_media_type IN ('BITMAP') AND img_timestamp BETWEEN '20191022' AND '20210131999999'
{"resultsets": [{"rowcount": 439, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "actor_id", "actor_user", "actor_name"]}], "runningtime": "2.78"}
null
Personen mit Klammerlemma
Personen mit Klammerlemma in der DEWP Stand 17. Februar 2021
USE dewiki_p; SELECT page_title FROM page, templatelinks WHERE page_namespace = 0 AND page_title like '%\_(%)' AND tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Personendaten'
{"resultsets": [{"rowcount": 25, "headers": ["actor_name", "antal"]}], "runningtime": "0.28"}
null
ruwiki: Convenient Discussions script usage: total number of edits (edits with summary only)
null
use ruwiki_p; select count(*) from comment join revision on comment_id = rev_comment_id where # having CD link in an edit summary comment_text like "%JWBTH/CD%"
{"runningtime": "1.11", "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": 50}]}
null
ruwiki: Convenient Discussions script usage: number of edits with summary after Nov 2020
null
use ruwiki_p; select count(*) from comment join revision on comment_id = rev_comment_id where rev_timestamp > "20201201000000" and # having CD link in an edit summary comment_text like "%JWBTH/CD%"
{"runningtime": "11.75", "resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 819}]}
null
test query
enwiki bots
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit' FROM `user` LEFT JOIN user_groups ugbot ON user_id = ugbot.ug_user AND ugbot.ug_group = 'bot' JOIN revision_userindex ON rev_id = (SELECT rev_id FROM revision_userindex WHERE user_id = rev_user ORDER BY...
{"runningtime": "0.94", "resultsets": [{"headers": ["\u0627\u0644\u0635\u0641\u062d\u0629", "\u062d\u062c\u0645 \u0627\u0644\u0635\u0641\u062d\u0629"], "rowcount": 39}]}
null
Sleeper Bots
enwiki bots
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'First edit', (rev_timestamp - user_registration) AS 'Sleeper Delta' FROM `user` JOIN actor ON actor_user = user_id JOIN revision_userindex ON rev_id = (SELECT rev_id FROM revision_userindex WHERE actor_id = rev_actor ...
{"resultsets": [{"rowcount": 5841, "headers": ["day", "deletions"]}], "runningtime": "225.24"}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"runningtime": "0.34", "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": 100}]}
null
Deletion Ratios for one wiki during 2020
Shows ratio of main namespace articles created using Content Translation and not using Content Translation and subsequently deleted. This sample works for the Haitian Creole Wikipedia (htwiki) for 2021.
use htwiki_p; set @dbname = 'htwiki'; 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 '...
{"resultsets": [{"rowcount": 2, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}], "runningtime": "1.47"}
null
Deletion Ratios for one wiki during 2020
Shows ratio of main namespace articles created using Content Translation and not using Content Translation and subsequently deleted. This sample works for the Haitian Creole Wikipedia (htwiki) for 2021.
use htwiki_p; set @dbname = 'htwiki'; 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 '...
{"runningtime": "0.33", "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": 100}]}
null
Interwiki userright log for a user
https://meta.wikimedia.org/wiki/Stewards/Confirm/2021#Jyothis Some were wondering why this steward was nowhere a local admin
USE metawiki_p; SELECT log_timestamp, actor_name, log_title, log_params, comment_text FROM logging JOIN actor ON log_actor = actor_id JOIN comment ON log_comment_id = comment_id WHERE log_title LIKE "Jyothis@%" AND log_type = "rights" AND log_action = "rights" AND log_params LIKE "%sysop%" ORDER BY log_timestamp DES...
{"resultsets": [{"rowcount": 28, "headers": ["\u0627\u0644\u0635\u0641\u062d\u0629", "\u0627\u0644\u0646\u0633\u062e\u0629", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0645\u0639\u0631\u0641 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0625\u0646\u0634\u06...
null
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.
use viwiki_p; set @dbname = 'viwiki'; 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 '...
{"runningtime": "15.68", "resultsets": [{"headers": ["actor_name", "count(rev_actor)"], "rowcount": 420}]}
null
ruwiki: Convenient Discussions script usage: number of edits by user (edits with tag) (2)
null
use ruwiki_p; select count(*) c, actor_name from revision join actor on rev_actor = actor_id join change_tag on rev_id = ct_rev_id where rev_timestamp > "20201118000000" and # new version release ct_tag_id = 79 group by actor_name order by c desc
{"resultsets": [{"rowcount": 10000, "headers": ["il_to", "num_articles"]}], "runningtime": "29.57"}
null
All female editors on German Wikipedia, sorted by user_id
null
USE dewiki_p; SELECT user_name, edits_after FROM user JOIN user_properties ON user_properties.up_user = user.user_id INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp >= "20200101000000" ...
{"resultsets": [{"rowcount": 1, "headers": ["user_name", "DATE_FORMAT(user_registration, \"%D/%M/%Y %H:%i:%s\")"]}], "runningtime": "0.10"}
null
All female editors on German Wikipedia, sorted by user_id
null
USE dewiki_p; SELECT user_name, edits_after FROM user JOIN user_properties ON user_properties.up_user = user.user_id INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_timestamp > "20210101000000" ...
{"resultsets": [{"rowcount": 5, "headers": ["user_name", "DATE_FORMAT(user_registration, \"%D/%M/%Y %H:%i:%s\")"]}], "runningtime": "0.11"}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 500, "headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"]}], "runningtime": "64.76"}
null
Wikisource credits
null
SELECT actor_name, COUNT(rev_id) AS count, ( SELECT 1 FROM enwikisource_p.user_groups WHERE ug_user = user_id AND ug_group = 'bot' ) AS bot FROM enwikisource_p.revision_userindex JOIN enwikisource_p.page ON page_id = rev_page JOIN enwikisource_p.actor_revision ON actor_id = rev_actor J...
{"resultsets": [{"rowcount": 0, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}], "runningtime": "0.07"}
null
First edit on French Wikipedia, revision table
Finds the first edit in the French Wikipedia
USE frwiki_p; SELECT rev_timestamp, page_namespace, page_title FROM revision JOIN page ON page_id = rev_page ORDER BY rev_timestamp ASC LIMIT 1;
{"resultsets": [{"rowcount": 1, "headers": ["count(*)"]}], "runningtime": "2.21"}
null
content translator fiwiki stats
null
use fiwiki_p; select count(distinct(user_name)) as users , count(distinct(log_title)) as pages, sum(page_id IS NULL) as deleted, count(distinct(ctd_id)) as content_translated_pages, sum(ctd_id IS NULL) as content_translated_deleted from ( select substring(user_name,1,30) as user_name, user_editco...
{"runningtime": "0.45", "resultsets": [{"headers": ["wbit_item_id", "wbx_text"], "rowcount": 59}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"connection_id": 837565389}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 0, "headers": ["page_title"]}], "runningtime": "2.97"}
null
Wikiproject Cleanup Contributions (Copy)-**edit**
null
use arwiki_p; select rev_user_text, count(*) from revision inner join comment on comment_id = rev_comment_id where comment_text like "%وب:م_و_ص%" or rev_comment like "%وب:م_و_ص%" group by Aws_Al-mimari order by count(*) desc limit 10;
{"resultsets": [{"rowcount": 4282, "headers": ["COUNT", "Rev", "DPLA_id"]}], "runningtime": "14.39"}
null
Tagged with Twinkle
null
SELECT /*SUBSTR(rev_timestamp, 1, 6) AS MONTH, COUNT(rev_id) AS edits*/ rev_id, rev_timestamp, comment_text /*ct_tag_id, ctd_id, ctd_name*/ FROM change_tag /* LEFT JOIN change_tag_def ON ct_tag_id = ctd_id*/ JOIN revision ON rev_id = ct_rev_id JOIN page ON page_id = rev_page LEFT JOIN comment_...
{"resultsets": [{"rowcount": 0, "headers": ["page_title", "rev_timestamp"]}], "runningtime": "5.15"}
null
All ckbwiki main namespace articles with their Qid if they have one
ckbwiki main namespace articles with their Qid. If the query works fine.
#ckb use ckbwiki_p ; # select wd.ips_item_id,ckbp.page_title from page as ckbp, wikidatawiki_p.wb_items_per_site as wd where ckbp.page_namespace=0 and kkbp.page_is_redirect = 0 and wd.ips_site_id="ckbwiki" and wd.ips_site_page=ckbp.page_title select pp.pp_value as Qid, page_title as title from page left join p...
{"resultsets": [{"rowcount": 10, "headers": ["MIN(rev_id)", "page_title", "page_len"]}], "runningtime": "0.14"}
null
wikidata: number of deleted items and revisions by admin (times out)
null
USE wikidatawiki_p; SELECT actor_logging.actor_user, actor_logging.actor_name, COUNT(DISTINCT logging_userindex.log_id) AS items, COUNT(archive.ar_id) AS revisions FROM logging_userindex JOIN actor_logging ON logging_userindex.log_actor=actor_logging.actor_id JOIN archive ON logging_userindex...
{"resultsets": [{"rowcount": 10, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"]}], "runningtime": "0.10"}
null
Get a Wikipedia username based on user_id
null
SELECT * FROM user WHERE user_name = "Bravetheif"
{"resultsets": [{"rowcount": 150, "headers": ["actor_name", "ar_title"]}], "runningtime": "1.13"}
null
Statistics of editing MediaWiki JS/CSS in ruwiki
Считает количество правок в Media Wiki *.css и *.js по пользователям, в поле Random Page одна из страниц, которую правил пользователь
USE ruwiki_p; SELECT actor_name AS 'User', page_title AS 'Random Page', COUNT(*) AS 'Edits' FROM revision_userindex JOIN page ON page_id = rev_page JOIN actor ON rev_actor = actor_id WHERE rev_timestamp >= "20181001" AND (page_title LIKE '%.css' OR page_title LIKE '%.js') GROUP BY actor_name ORDER BY COUN...
{"runningtime": "0.10", "resultsets": [{"headers": ["user_name", "DATE_FORMAT(user_registration, \"%D/%M/%Y %H:%i:%s\")"], "rowcount": 2}]}
null
Exists a page "A (B)" but do not exists a page "A"
null
USE arwiki_p; SELECT CONCAT ('# [[',REPLACE(MID(Target.page_title,1,LOCATE('(',Target.page_title)-2),'_',' '),']] [[',REPLACE(Target.page_title,'_',' '),']]') FROM page AS Target WHERE Target.page_namespace = 0 AND Target.page_is_redirect = 0 AND Target.page_title LIKE "%(%" AND Target.page_title NOT LIKE "(%" #AND Tar...
{"resultsets": [], "runningtime": "0.07"}
null
Reply Tool usage/user [before Nov-2020]
null
select actor_name, count(*) as total from ( select ct.ct_id, ct.ct_rev_id, actor_user, actor_name from enwiki_p.change_tag ct inner join enwiki_p.revision_actor_temp rat on ct.ct_rev_id = rat.revactor_rev inner join enwiki_p.actor act on rat.revactor_actor = act.actor_id inner join enwiki_p.change_tag_def on ct_tag_id...
{"resultsets": [], "runningtime": "0.05"}
null
WikiProject article counts
List of all WikiProjects with the count of Talk pages that include the project template (The query can take nearly three minutes with the wind against you) https://en.wikipedia.org/wiki/Wikipedia:WikiProject links to this query
SELECT t.tl_title as ProjectTemplate, count(*) as ArticleCount FROM templatelinks t WHERE t.tl_title like 'WikiProject%' AND t.tl_title not like '%/%' AND t.tl_namespace=10 AND t.tl_from_namespace=1 GROUP BY t.tl_title ORDER BY 2 desc, 1;
{"resultsets": [{"rowcount": 100, "headers": ["page_title", "edits"]}], "runningtime": "49.70"}
null
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৮ জানু ২০২০
USE bnwiki_p; SELECT CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম, COUNT(rev_id) AS মোট_নিবন্ধ FROM actor INNER JOIN revision ON revision.rev_actor = actor.actor_id JOIN page ON page.page_id = revision.rev_page WHERE page_is_redirect = 0 AND rev_parent_id = 0 AND page_namespace = 0 AND rev...
{"resultsets": [{"rowcount": 472, "headers": ["page_title", "cl_to"]}], "runningtime": "563.10"}
null
Files on uk.wiki NOT in spec categories, actor, size
null
USE ukwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file, actor_name, img_size 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( SELECT * FROM categorylinks WHERE page_i...
{"resultsets": [{"rowcount": 13, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}], "runningtime": "0.12"}
null
Reply Tool usage (ar, fr, hu, nl): feb, 2020
null
select actor_name, count(*) as total from ( select ct.ct_id, ct.ct_rev_id, actor_user, actor_name from arwiki_p.change_tag ct inner join arwiki_p.revision_actor_temp rat on ct.ct_rev_id = rat.revactor_rev inner join arwiki_p.actor act on rat.revactor_actor = act.actor_id inner join arwiki_p.change_tag_def on ct_tag_i...
{"connection_id": 331156064}
null
Uncle G's 'bot deleted month counts
null
SELECT YEAR(ar_timestamp) AS `year`, MONTH(ar_timestamp) AS `month`, ar_namespace AS `namespace`, COUNT(ar_id) AS `count` FROM archive_userindex WHERE ar_actor = (SELECT actor_id FROM actor WHERE actor_name = "Uncle G's 'bot") GROUP BY YEAR(ar_timestamp), MONTH(ar_timestamp)...
{"resultsets": [{"rowcount": 35, "headers": ["date_", "c"]}], "runningtime": "876.66"}
null
Bengali Wikipedia Section Translation edits
null
use bnwiki_p; -- When appropriate, change 'contenttranslation' to 'sectiontranslation' set @cx_edit_tag = ( select ctd_id from change_tag_def where ctd_name = 'sectiontranslation' ); select date_format(rev_timestamp, "%Y-%m-%d %H:%i:%s") as 'Time', rev_id as 'Revision ID', actor_name as 'Us...
{"runningtime": "6.79", "resultsets": [{"headers": ["c", "actor_name"], "rowcount": 116}]}
null
nlwiki_p Category-sort comma-fraction
null
USE nlwiki_p; # fraction of pages in a category having a comma in the sortkey SELECT cl_to, (COUNT(*) / (cat_pages-cat_subcats)) AS commas FROM categorylinks, category WHERE cat_title REGEXP '^Duits_' AND cl_to=cat_title AND cl_sortkey_prefix REGEXP ',' GROUP BY cl_to HAVING commas < 0.9 LIMIT 10
{"resultsets": [{"rowcount": 28, "headers": ["page_title"]}], "runningtime": "12.16"}
null
All ckbwiki main namespace articles with their Qid if they have one
ckbwiki main namespace articles with their Qid. If the query works fine.
#ckb use ckbwiki_p ; # select wd.ips_item_id,ckbp.page_title from page as ckbp, wikidatawiki_p.wb_items_per_site as wd where ckbp.page_namespace=0 and kkbp.page_is_redirect = 0 and wd.ips_site_id="ckbwiki" and wd.ips_site_page=ckbp.page_title select pp.pp_value as Qid, page_title as title from page left join p...
{"runningtime": "75.78", "resultsets": [{"headers": ["\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a"], "rowcount": 20}]}
null
Image credits
null
SELECT actor_name, ( SELECT 1 FROM commonswiki_p.user_groups WHERE ug_user = user_id AND ug_group = 'bot' ) AS bot FROM commonswiki_p.image JOIN commonswiki_p.actor_image ON actor_id = img_actor JOIN commonswiki_p.user ON user_id = actor_user WHERE img_name IN ('Example.jpg', 'Foo.jpg') ...
{"resultsets": [{"rowcount": 65, "headers": ["CONCAT(\"# [[:Categoria:\", page_title, \"]]\")"]}], "runningtime": "0.23"}
null
Image credits including older image versions
null
SELECT DISTINCT actor_name, bot FROM ( ( SELECT DISTINCT actor_name, ( SELECT 1 FROM commonswiki_p.user_groups WHERE ug_user = user_id AND ug_group = 'bot' ) AS bot FROM commonswiki_p.image JOIN commonswiki_p.actor_image ON actor_id = img_actor J...
{"resultsets": [{"rowcount": 2, "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"]}], "runningtime": "55.50"}
null
1st Parliament Wikidata Edit Count in Time Frame
This query was used to determine participants with the highest Wikidata edit count in the 1st Parliament of Ghana Challenge that run from 1 February 2021 UTC to 27 February 2021 UTC. See: https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Ghana/Parliament_of_Ghana/Members_of_the_1st_Parliament_of_the_4th_Republic_o...
select actor_name, count(*) as edits from wikidatawiki_p.revision_userindex r join wikidatawiki_p.actor a on r.rev_actor = a.actor_id join wikidatawiki_p.page p on r.rev_page = p.page_id where actor_name in ( "Celestinesucess", "Nana yaa series", "Sunkanmi12", "Kinvidia", "Piousmaiden", "Mwintirew", "Mukaram123", "Naa2...
{"connection_id": 341251547}
null
Ist Parliament Wikipedia Edit Count in Time Frame
This query was used to determine participants with the highest Wikipedia edit count in the 1st Parliament of Ghana Challenge that run from 1 February 2021 UTC to 27 February 2021 UTC. See: https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Ghana/Parliament_of_Ghana/Members_of_the_1st_Parliament_of_the_4th_Republic_...
select actor_name, count(*) as edits from enwiki_p.revision_userindex r join enwiki_p.actor a on r.rev_actor = a.actor_id join enwiki_p.page p on r.rev_page = p.page_id where actor_name in ( "Celestinesucess", "Nana yaa series", "Sunkanmi12", "Kinvidia", "Piousmaiden", "Mwintirew", "Mukaram123", "Naa2Darkoa", "Leonelaw...
{"connection_id": 341252241}
null
bot month counts
This re-uses code as in query https://quarry.wmflabs.org/query/52529 and further to discussion at https://www.mediawiki.org/wiki/Talk:XTools. For the given user account, this gives monthly totals (split out per namespace) for all edits.
SELECT YEAR(rev_timestamp) AS `year`, MONTH(rev_timestamp) AS `month`, page_namespace, COUNT(rev_id) AS `count` FROM revision_userindex JOIN page ON (rev_page = page_id) WHERE rev_actor = (SELECT actor_id FROM actor_revision WHERE actor_name = 'VahurzpuBot') GROUP BY YEAR(re...
{"runningtime": "0.30", "resultsets": [{"headers": ["cl_sortkey_prefix"], "rowcount": 100}]}
null
Blank Drafts
null
select concat( "[[Draft:", page_title, "]]" ) as title, rev_timestamp as "last edit" from page join revision on page_latest = rev_id where page_len = 0 and page_namespace = 118 order by title desc;
{"resultsets": [{"rowcount": 1, "headers": ["(concat('* [[{{subst:GENDER:', actor_name, '|\u05de\u05e9\u05ea\u05de\u05e9|\u05de\u05e9\u05ea\u05de\u05e9\u05ea}}:', actor_name, ']]'))"]}, {"rowcount": 6, "headers": ["(concat('* [[{{subst:GENDER:', actor_name, '|\u05de\u05e9\u05ea\u05de\u05e9|\u05de\u05e9\u05ea\u05de\u05e...
null
Accounts with bot flag as at close of 2020
This data will need correcting for any account being granted a flag after 2020-12-31
SELECT user_name, user_registration, user_id FROM user JOIN user_groups ON (user_groups.ug_user = user.user_id) WHERE user_groups.ug_group LIKE '%bot%' AND user.user_registration <= '20201231235959' ORDER BY user.user_registration DESC
{"resultsets": [{"rowcount": 431, "headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"]}], "runningtime": "490.23"}
null
Files on uk.wiki with old versions
null
USE ukwiki_p; SELECT CONCAT("# [[:File:", oi_name, "]]") FROM oldimage INNER JOIN page p ON p.page_title = oi_name AND p.page_namespace = 6 INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "Невільні_файли" #Non-free files #INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "सभी_मुक्त_मीड...
{"resultsets": [{"rowcount": 23, "headers": ["File name", "Date", "Size", "Uploader's name"]}], "runningtime": "1021.45"}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"resultsets": [{"rowcount": 20, "headers": ["log_title", "COUNT(*)"]}], "runningtime": "0.44"}
null
AfC accepts/declines per submitter (7 days)
null
use enwiki_p; select count(rc_id) as reviews, rc_title, count(rc_id) - SUM(comment_text like "%declined ([[WP:AFCH|AFCH]] 0.9.1)") as "accepted", concat(round(SUM(comment_text not like "declined ([[WP:AFCH|AFCH]] 0.9.1)") * 100 / count(rc_id), 1), "%") as "accept %", SUM(comment_text like "%declined...
{"connection_id": 343854748}
null