title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
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": ["user_talk"], "rowcount": 5}], "runningtime": "0.12"}
eswiki
Link scraping
null
select page.page_title as 'source' ,pagelinks.pl_title as 'target' from pagelinks join page on page_id = pl_from #order by linktarget.lt_title
{"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "57.51"}
enwiki_p
CSD U2 worthy pages
Forked from https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Ownerless_pages_in_the_user_space/Configuration and updated to work with changed database schema
select ROW_NUMBER() over(order by page_title) num, case when page_namespace = 2 then CONCAT('[[User:', replace(page_title, '_', ' '), ']]') else -- Format as wikilink, check whether it is in User namespace CONCAT('[[User talk:', replace(page_title, '_', ' '), ']]') end as 'U2 worthy pages', -- Format...
{"resultsets": [{"headers": ["actor_name", "total", "weekdays", "dist_days"], "rowcount": 4}], "runningtime": "110.63"}
enwiki_p
Userspace pages of non-existent users
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...
{"resultsets": [{"headers": ["description", "c"], "rowcount": 648867}], "runningtime": "612.24"}
enwiki_p
Large redirect pages
Pages which are redirects but have a lot of text. Common good reasons include numerous categories and preparing a replacement article/dab below #REDIRECT. Common bad reasons include an incomplete merge or cut-paste move and creation of a duplicate article which few readers will see.
SELECT page_namespace AS ns, page_title, page_len FROM page WHERE page_is_redirect=1 AND page_len>2000 AND page_namespace=0 order by page_len desc;
{"resultsets": [{"headers": ["page_id", "cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 0}], "runningtime": "5.65"}
enwiki_p
(failed)
null
null
{"resultsets": [{"headers": ["ctd_id", "ctd_name", "ctd_user_defined", "ctd_count"], "rowcount": 1}], "runningtime": "0.05"}
enwiki_p
WStaஅயோத்திசிந்தனை2ஞான
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 p...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.88"}
tawikisource_p
Large redirect pages
Pages which are redirects but have a lot of text. Common good reasons include numerous categories and preparing a replacement article/dab below #REDIRECT. Common bad reasons include an incomplete merge or cut-paste move and creation of a duplicate article which few readers will see.
SELECT page_namespace AS ns, page_title, page_len FROM page WHERE page_is_redirect=1 AND page_namespace=0 AND page_len>2000+40*IFNULL((SELECT COUNT(*) FROM categorylinks WHERE cl_from=page_id),0) ORDER BY page_len DESC
{"resultsets": [{"headers": ["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"], "rowcount": 1}], "runningtime": "0.05"}
enwiki_p
Authors of Articles from Category
null
select p0.page_title, a.actor_name, r.rev_timestamp from categorylinks cl join page p1 on cl.cl_to = "Статті_Тижня_української_мови_та_літератури_2022" and cl.cl_from = p1.page_id join page p0 on p1.page_title = p0.page_title and p0.page_namespace = 0 join revision_userindex r on p0.page_id = r.rev_page and r....
{"resultsets": [{"headers": ["concat(\"* [[{{subst:ns:\", tl_namespace, \"}}:\", tl_title, \"]]\")"], "rowcount": 5}], "runningtime": "0.54"}
ukwiki_p
Query to get enlang title for a page
null
SELECT page_title, ll_title FROM langlinks INNER JOIN page ON page_id = ll_from WHERE page_title = "1930_இறப்புகள்" AND ll_lang = "en" AND page_namespace = 14
{"connection_id": 93622881}
tawiki_p
enwiki query to get list of category pages with tawiki links
null
SELECT page_title, ll_title FROM langlinks INNER JOIN page ON page_id = ll_from INNER JOIN categorylinks ON page_id = cl_from WHERE cl_to = "1930_deaths" AND ll_lang = "ta" AND page_namespace = 0 LIMIT 100
{"resultsets": [{"headers": ["user", "timestamp", "page", "diff"], "rowcount": 100}], "runningtime": "0.37"}
enwiki_p
tawiki query to get list of category pages with enwiki links
null
SELECT page_title, ll_title FROM langlinks INNER JOIN page ON page_id = ll_from INNER JOIN categorylinks ON page_id = cl_from WHERE cl_to = "1930_இறப்புகள்" AND ll_lang = "en" AND page_namespace = 0
{"resultsets": [{"headers": ["timestamp", "page", "diff"], "rowcount": 100}], "runningtime": "0.37"}
tawiki_p
Experienced users and newcomers
null
SET @minEdits = 0; -- 1) number of edits the user has to have to be considered experienced SET @minTenureDays = 370; -- 2) if the user registered @minTenureDays days prior to the event (@eventDate), they're experienced SET @eventDate = '20221101000000'; -- 3) see @minTenureDays SELECT user_name, user_editcount, ...
{"resultsets": [{"headers": ["timestamp", "page", "new_len", "diff_ratio"], "rowcount": 14785}], "runningtime": "13.12"}
commonswiki
Verifica modifiche
null
SELECT COUNT(log_id) AS verifiche, user_name AS nome_utente, user_editcount AS edit_utente, GROUP_CONCAT(DISTINCT ug_group SEPARATOR ", ") AS gruppi_dell_utente FROM logging log JOIN actor AS act ON log.log_actor = act.actor_id JOIN user us ON act.actor_user = us.user_id JOIN user_groups ug ON us.u...
{"resultsets": [{"headers": ["timestamp", "page", "diff", "new_len", "increase_ratio"], "rowcount": 100}], "runningtime": "0.44"}
itwiki_p
Red article links in a specific article
null
SELECT pl_title FROM pagelinks WHERE pl_from = (SELECT page_id FROM page WHERE page_title = 'Szombathely' AND page_namespace = 0) AND pl_namespace = 0 AND NOT EXISTS (SELECT 1 FROM page WHERE page_title = pl_title AND page_namespace = 0)
{"resultsets": [{"headers": ["Ba\u011flant\u0131"], "rowcount": 0}], "runningtime": "36.84"}
cswiki_p
Talk pages called Something/Archive A, B, etc.
null
SELECT page_title FROM page WHERE page_namespace = 1 AND page_is_redirect = 0 AND page_title REGEXP "/Archive_([A-Z]+|[a-z]|[Oo]ne|[Tt]wo|[Tt]hree)$" ORDER BY page_title
{"resultsets": [{"headers": ["K\u0131rm\u0131z\u0131 ba\u011flant\u0131"], "rowcount": 65}], "runningtime": "25.83"}
enwiki_p
wikidata: failed mergers
null
SELECT page_title, page_len, rev_timestamp, comment_text FROM page JOIN revision ON page_latest=rev_id JOIN comment_revision ON rev_comment_id=comment_id WHERE page_namespace=0 AND page_is_redirect=0 AND comment_text LIKE '/* wbmergeitems-to:%';
{"resultsets": [{"headers": ["qid", "type", "lang", "text"], "rowcount": 387}], "runningtime": "1130.48"}
wikidatawiki
Fork of Circular redirects by Magnus Manske
null
SELECT p1.page_title as page,p2.page_title as redirect FROM page p1,page p2,pagelinks, redirect WHERE p1.page_namespace=0 AND p1.page_id=pl_from AND pl_namespace=0 AND pl_title=p2.page_title AND p2.page_namespace=0 AND rd_from=p2.page_id AND rd_namespace=0 AND rd_title=p1.page_title
{"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "68.26"}
ukwiki_p
Red article links in a specific article
null
SELECT pl_title FROM pagelinks WHERE pl_from = (SELECT page_id FROM page WHERE page_title = 'Lázně Libverda' AND page_namespace = 0) AND pl_namespace = 0 AND NOT EXISTS (SELECT 1 FROM page WHERE page_title = pl_title AND page_namespace = 0)
{"resultsets": [{"headers": ["concat ('*[[',page_title,']]')"], "rowcount": 55}], "runningtime": "30.53"}
cswiki_p
Pleonasm: 争议/爭議+事件 (redirect)
null
SELECT page_id, page_title FROM page WHERE page_is_redirect = 1 AND page_namespace = 0 AND page_title REGEXP "(争议|爭議)事件" ORDER BY page_id ASC;
{"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 3086}], "runningtime": "24.98"}
zhwiki_p
ShortPages
null
SELECT page_namespace, page_title, page_len, rev_id FROM enwikisource_p.page LEFT JOIN enwikisource_p.revision ON page_latest = rev_id WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_title NOT REGEXP "Shake" AND page_len < 100 LIMIT 10000;
{"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 72}], "runningtime": "0.11"}
enwikisource_p
Baseball Tournaments
null
select page_title from page where page_namespace=0 and (page_title like '%_baseball_tournament') and page_is_redirect=1
{"resultsets": [{"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", "actor_id", "actor_user", "actor_name"], "rowcount": 11}], "runningtime": "0.06"}
enwiki
Vandalismebestrijding nlwiki
Backlog 581 12-12-2022 0:05 (CET)
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"resultsets": [{"headers": ["actor_name"], "rowcount": 76}], "runningtime": "317.38"}
nlwiki_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 p...
{"resultsets": [{"headers": ["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"], "rowcount": 0}], "runningtime": "0.07"}
tawikisource_p
WSta நெஞ்சை உருக்கும் நீதிக்கதைகள்.pdf
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 p...
{"resultsets": [{"headers": ["page"], "rowcount": 500}], "runningtime": "20.18"}
tawikisource_p
ShortPages
null
SELECT page_namespace, page_title, page_len, rev_id FROM enwikisource_p.page LEFT JOIN enwikisource_p.revision ON page_latest = rev_id WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_title NOT REGEXP "Shake" AND page_title NOT REGEXP "The_Times/" ...
{"resultsets": [{"headers": ["title"], "rowcount": 3389}], "runningtime": "2.40"}
enwikisource_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 p...
{"resultsets": [{"headers": ["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"], "rowcount": 5}], "runningtime": "0.05"}
tawikisource_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len ...
{"connection_id": 36918314}
enwiki_p
dagwiki: Monthly count and size of translations published by users in December, 2022
All publishings from Content translation tool, repeat publishings are not counted, first time overwriting is counted
use dagwiki_p; select concat(substr(rev_timestamp,5,2),"-",substr(rev_timestamp,1,4)) as month_year,actor_name as user,count(actor_name) as No_of_articles, sum(rev_len) as Bytes from change_tag,change_tag_def,revision,page,actor where ct_tag_id = ctd_id and rev_id=ct_rev_id and page_id=rev_page and page_na...
{"resultsets": [{"headers": ["rc_title", "week", "nb_revocations"], "rowcount": 998}], "runningtime": "3.13"}
dagwiki_p
Slovakia related articles on cswiki, missing from skwiki
null
USE enwiki_p; SELECT REPLACE(page_title, '_', ' ') AS title_cs, page_len, REPLACE(GROUP_CONCAT(cl_to SEPARATOR ', '), '_', ' ') AS categories, (SELECT count(*) FROM langlinks WHERE ll_from = page_id) as iw_count, (SELECT count(*) FROM revision WHERE rev_page = page_id) as rev_count, rf.rev_time...
{"resultsets": [{"headers": ["rc_title", "week", "nb_revocations"], "rowcount": 0}], "runningtime": "0.06"}
enwiki_p
Users by number of created articles on dagwiki
null
-- USE skwiki_p; SELECT a.actor_name, COUNT(*) as count FROM page p, revision rf, actor_user a WHERE rf.rev_page = p.page_id and rf.rev_parent_id = 0 and a.actor_id = rf.rev_actor and p.page_namespace = 0 and p.page_is_redirect = 0 GROUP BY a.actor_name ORDER BY count desc ;
{"connection_id": 36919208}
dagwiki_p
Dagwiki: Top Wikipedia Page by Bytecounts (This Month)
Verify each user's contribution here : https://quarry.wmflabs.org/query/54879
select * from (select rc_title, sum( cast(rc_new_len as int) - cast(rc_old_len as int)) tdif from recentchanges_userindex where rc_timestamp >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') group by rc_title) a where tdif > 10 order by tdif desc
{"resultsets": [{"headers": ["rc_title", "week", "nb_revocations"], "rowcount": 0}], "runningtime": "0.20"}
dagwiki_p
Disambiguation pages that aren't disambig-class or tagged with WikiProject Disambiguation
The minimal fixes to get this working. For [[WP:RAQ#Disambiguation pages with no WikiProject banner]] circa 25 August 2022.
SELECT Pa.page_title FROM categorylinks JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = cl_from JOIN page Pt ON Pt.page_title = Pa.page_title AND Pt.page_namespace = 1 WHERE cl_to = "All_disambiguation_pages" AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Pt.page_id AND c...
{"resultsets": [{"headers": ["user", "img_count"], "rowcount": 86}], "runningtime": "4.45"}
enwiki_p
Orphaned subpages [notdone]
Based off of query/69309 but extended to include more than just archives very shaky since my sql skill is non-existant Surprisingly good at finding nonsensical pages, which makes sense when coming from such a nonsensical query
select distinct CONCAT("{{User:Aidan9382/templates/ArchiveDumpEntry|1=Talk:",page_title,"}}") as basepage_title from page where page_namespace = 1 and page_is_redirect = 0 -- and page_random < 0.05 -- Reduce calculation time when testing and page_title like "%/_" -- I assume this is fine and not exists ( select 1 f...
{"resultsets": [{"headers": ["actor_name", "page_title", "COUNT(*)"], "rowcount": 50}], "runningtime": "3.45"}
enwiki
zhwiki: Pages which title contains parliamentary stuff
null
USE zhwiki_p; SELECT page_id, page_title FROM page WHERE page_namespace = 14 AND page_is_redirect = 0 AND page_title LIKE "%參議%"; SELECT page_id, page_title FROM page WHERE page_namespace = 14 AND page_is_redirect = 0 AND page_title LIKE "%参议%"; # 0/1 main 2/3 user 4/5 wp 6/7 file 8/9...
{"resultsets": [{"headers": ["actor_name", "tdif"], "rowcount": 592}], "runningtime": "2.28"}
zhwiki_p
Infoboxes with no TemplateData
null
SELECT page_title, COUNT(*) AS usages FROM page JOIN linktarget ON ((lt_namespace = page_namespace) AND (lt_title = page_title)) JOIN templatelinks ON lt_id=tl_target_id WHERE page_namespace=10 AND page_title LIKE 'Infobox_-_%' AND page_title NOT LIKE '%/%' AND page_id NOT IN ( SELECT pp_page ...
{"resultsets": [{"headers": ["rc_title", "week", "nb_week", "mean_revocations", "actors_per_week", "week_last_revocation"], "rowcount": 0}], "runningtime": "1.03"}
cswiki
UserPage Articles
List of articles with more than 2k chars in Kannada Wikipedia in user pages (user sandbox and sub page of userpage)
select page_title from page where page_len > 6144 and page_namespace = 2
{"connection_id": 79063730}
knwiki_p
Most active editors at English Wikivoyage (last 90 days)
null
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -90 DAY), "%Y%m%d%H%i%s")); SELECT COUNT(*) AS 'Edits', actor_name AS `User` FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id WHERE rev_id >= @rev GROUP BY `User` ORDER ...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 77}], "runningtime": "40.77"}
commonswiki_p
উইকিঅভিধানের শীর্ষ সম্পাদকগণ
৩০ জানু ২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন।
SET @counter:=0; SELECT CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং, CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম, CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "...
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 19}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 8}], "runningtime": "0.14"}
bnwiktionary_p
– যুক্ত নিবন্ধ
For [[WP:VPT#articles with curly quotes in title]] circa 3 July 2020.
SELECT page_title FROM page WHERE page_namespace = 0 -- article namespace only AND page_is_redirect = 0 -- non-redirects AND page_title RLIKE "–";
{"connection_id": 79287830}
bnwiki
বাংলা উইকিতে সবচেয়ে বেশী ধন্যবাদ পাওয়া ব্যবহারকারী
০২-০৯-২০১৮
USE bnwiki_p; SELECT log_title, COUNT(*) FROM logging WHERE log_type="thanks" GROUP BY log_title ORDER BY COUNT(*) DESC LIMIT 600;
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 16}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.13"}
bnwiki_p
উপাত্ত বাংলা লেবেল
null
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id), "Lbn", CONCAT('"',ips_site_page,'"') FROM wb_items_per_site WHERE ips_site_id='bnwiki' AND NOT EXISTS ( SELECT wbit_item_id FROM wbt_item_terms INNER JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id INNER JOIN wbt_text_in_lang ON wbxl_id = wbtl_...
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 2}], "runningtime": "36.65"}
wikidatawiki_p
সম্পাদনার সংখ্যা অনুযায়ী উইকিবইয়ের সম্পাদকগণ/১-১০০
উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন।
USE bnwikibooks_p; SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)" ORDER BY user_editcount...
{"resultsets": [{"headers": ["reviewer", "Articles", "Redirects", "Total"], "rowcount": 1}], "runningtime": "0.08"}
bnwikibooks_p
Most active native Bengali speakers on Commons in 2022
null
USE commonswiki_p; #SELECT * FROM revision_compat limit 1; SELECT edit_username, edits_after FROM categorylinks INNER JOIN page ON page.page_id = cl_from INNER JOIN (SELECT rev_user_text AS edit_username, COUNT(rev_id) AS edits_after FROM revision_compat WHERE rev_tim...
{"resultsets": [{"headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i", "tag_s"], "rowcount": 1000}], "runningtime": "64.97"}
commonswiki_p
Redirects created to articles at AfD
This query lists pages which redirect to articles at AfD but were recently of article length. Such pages risk deletion per G8 along with the AfD candidate, losing a potentially useful history. Ps is the redirect's source page (beginning #REDIRECT); Pd is its destination (the endangered article). rfn=redirect from na...
SET STATEMENT max_statement_time = 100 FOR SELECT Ps.page_namespace AS rfn, Ps.page_title AS redirect, Pd.page_title AS article, actor_name AS redirector, rc_timestamp FROM linktarget JOIN templatelinks ON tl_from_namespace = 0 AND tl_target_id = lt_id JOIN page Pd ON Pd.page_id = tl_from JOIN redirect ON rd_title = P...
{"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 100}], "runningtime": "0.11"}
enwiki_p
Tewiki:Infobox related (have and have nots) pages
null
set @vargam:="ప్రజలు"; SELECT distinct page_title FROM page p1 where p1.page_id in (select tl_from from templatelinks, linktarget where lt_id=tl_target_id and tl_from_namespace =0 and (lt_title like "%సమాచారపెట్టె%" or lt_title ...
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "ratio_revocation", "nb_editions", "last_revocation", "user_registration"], "rowcount": 17}], "runningtime": "0.39"}
tewiki
Vandalismebestrijding nlwiki
731 backlog 13-12-22 15:20 (CET)
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"connection_id": 79478416}
nlwiki_p
Oddly named transliteration modules
null
select page_title from page where page_namespace = 828 and page_title like '%-%-translit' and not page_title like '%/%'
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.05"}
enwiktionary_p
Redirects to pages in category
null
SET STATEMENT max_statement_time = 100 FOR SELECT Ps.page_namespace AS rfn, Ps.page_title AS redirect, Pd.page_title AS article FROM categorylinks JOIN page Pd ON Pd.page_id = cl_from JOIN redirect ON rd_title = Pd.page_title AND rd_namespace = 0 JOIN page Ps ON Ps.page_id = rd_from WHERE cl_to = "Shades_of_color" /* A...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.45"}
enwiki_p
WSta இலக்கண வரலாறு.pdf
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 p...
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 16}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.11"}
tawikisource_p
WSta இலக்கண வரலாறு.pdf
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 p...
{"resultsets": [{"headers": ["rev_timestamp", "comment_text"], "rowcount": 100}], "runningtime": "1397.60"}
tawikisource_p
A magyar Wikipédia mérete
https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete
USE huwiki_p; /* Real data */ SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)' FROM page WHERE page_namespace = 0 AND page_is_redirect = 0; /* With redirects */ SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page...
{"resultsets": [{"headers": ["rc_title", "rc_actor", "nb_revocations", "nb_users_revocated", "MAX(recentchanges.rc_timestamp)"], "rowcount": 1}], "runningtime": "2.09"}
huwiki
WStaஅயோத்திசிந்தனை3ஞான
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 p...
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "ratio_revocation", "nb_editions", "last_revocation", "user_registration"], "rowcount": 8}], "runningtime": "0.39"}
tawikisource_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 p...
{"resultsets": [{"headers": ["CONCAT('* [[:File:', p.page_title, \"]]\")"], "rowcount": 15}], "runningtime": "6.46"}
tawikisource_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 p...
{"resultsets": [{"headers": ["count(*)"], "rowcount": 1}, {"headers": ["count(*)"], "rowcount": 1}], "runningtime": "1.52"}
tawikisource_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 p...
{"resultsets": [{"headers": ["page_id", "page_title", "page_namespace", "count(distinct(a.actor_id))"], "rowcount": 10}], "runningtime": "376.75"}
tawikisource_p
Find certain edits by summary on zhwiki
null
SELECT rc_timestamp, actor_name, rc_namespace, rc_title, rc_this_oldid, rc_new_len-rc_old_len as rc_diff FROM recentchanges JOIN comment ON rc_comment_id = comment_id JOIN actor ON rc_actor = actor_id WHERE comment_text = "000"
{"resultsets": [{"headers": ["article"], "rowcount": 10}, {"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 10}], "runningtime": "0.06"}
zhwiki_p
Categorie con "soppress./del_passato" nel titolo
null
SELECT concat("# [[:Categoria:" , page_title , "]]") FROM page WHERE page_namespace = 14 AND page_is_redirect = 0 AND page_title RLIKE "(del_passato|soppress[ei])" ORDER BY page_title
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 93}], "runningtime": "0.44"}
itwiki
Example log type names
An example list of log types, linked from https://www.mediawiki.org/wiki/Manual:Logging_table#log_type
SELECT DISTINCT log_type FROM logging;
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 1}], "runningtime": "62.21"}
enwiki
Linked miscapitalizations
null
SELECT p1.page_title AS 'Page', COUNT(*) AS 'Count' FROM page AS p1 JOIN categorylinks ON p1.page_id = cl_from JOIN pagelinks ON p1.page_title = pl_title AND pl_namespace = 0 JOIN page AS p2 ON pl_from = p2.page_id AND p2.page_namespace = 0 WHERE p1.page_namespace = 0 AND p1.page_is_redirect = 1 A...
{"resultsets": [{"headers": ["page_title"], "rowcount": 249}], "runningtime": "0.26"}
enwiki_p
Dagwiki: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,Alhaj Darajaati 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 >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_sour...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 1882}], "runningtime": "1087.23"}
dagwiki_p
Dagwiki: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 >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') ...
{"resultsets": [{"headers": ["page_title", "page_len", "page_touched"], "rowcount": 9}], "runningtime": "64.82"}
dagwiki_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len ...
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "ratio_revocation", "nb_editions", "last_revocation", "user_registration"], "rowcount": 5}], "runningtime": "0.40"}
enwiki_p
Dagwiki: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 >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') ...
{"resultsets": [{"headers": ["page_title"], "rowcount": 5}], "runningtime": "68.42"}
dagwiki_p
Empty
null
null
{"resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 18}], "runningtime": "1.62"}
enwiki_p
Vandalismebestrijding nlwiki
Backlog 753 16 dec 2022 13:20 (CET)
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 7842}], "runningtime": "6646.34"}
nlwiki_p
All users edit count all Dagwiki
null
SELECT actor_name,COUNT(rev_actor) as edit_count FROM revision,actor WHERE actor_id=rev_actor GROUP BY rev_actor ORDER BY count(rev_actor) desc
{"resultsets": [{"headers": ["page_title"], "rowcount": 67}], "runningtime": "1.97"}
dagwiki_p
مستخدمو الشهر الأكثر نشاطا شهر ديسمبر2022مقالات
efwttttttttttttttttttttttt
use arwiki_p; SELECT concat('[[مستخدم:',r.rev_user_text,'|',r.rev_user_text,']]') AS "المستخدم", COUNT(*) AS "عدد المقالات" FROM revision r join page p on p.page_id=r.rev_page WHERE p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp between 20221201000000 and 20221231000000 and r.rev_parent_id=0 GROUP BY ...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 86}], "runningtime": "65.35"}
arwiki
sssssssssssssssssssssssssssssssssfr
wwwwwwwwwwfffffffffffv
use arwiki_p; SELECT concat('[[مستخدم:',r.rev_user_text,'|',r.rev_user_text,']]') AS "المستخدم", COUNT(*) AS "عدد المقالات" FROM revision r join page p on p.page_id=r.rev_page WHERE p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp between 20160801000000 and 20160901000000 and r.rev_parent_id=0 GROUP BY ...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.04"}
arwiki_p
Most thankful 2022
Most thankful people in 2022 Thanks AntiCompositeNumber for the original 2020 version
USE enwiki_p; SELECT actor_name, COUNT(log_id) FROM logging_logindex JOIN actor_logging ON actor_id = log_actor WHERE log_type = "thanks" AND log_timestamp >= "20220000000000" GROUP BY actor_name ORDER BY 2 DESC
{"resultsets": [{"headers": ["pl_title", "COUNT(*)"], "rowcount": 3}], "runningtime": "0.48"}
enwiki_p
Pages with mismatched square brackets updated recently using AWB
Such pages may trigger an unfortunate AWB "general fix" which improves good pages but can make some bad pages worse.
SELECT pl_title as Article, MAX(rc_timestamp) AS Last_AWB FROM pagelinks JOIN recentchanges ON rc_namespace=0 AND rc_title=pl_title JOIN change_tag ON ct_rc_id=rc_id AND ct_tag_id = 64 /* AWB */ WHERE pl_from=(SELECT page_id FROM page WHERE page_namespace=2 AND page_title="BD2412/Square_brackets_without_correct_beginni...
{"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 825}], "runningtime": "5.90"}
enwiki_p
Footballer stubs linked from non-football-related pages
Rationale for this query: there seem to be a lot of incorrect links of this type, probably caused by mass creation at scale. Not sure whether this will turn out to be practical.
SELECT sourcetalkpage.page_title FROM page talkpage INNER JOIN categorylinks cat1 ON cat1.cl_from = talkpage.page_id INNER JOIN categorylinks cat2 ON cat2.cl_from = talkpage.page_id INNER JOIN pagelinks ON pagelinks.pl_title = talkpage.page_title INNER JOIN page sourcemainpage ON sourcemainpage.page_id = pagelinks.pl_f...
{"resultsets": [{"headers": ["\u0639\u0646\u0648\u0627\u0646", "\u062d\u062c\u0645 (\u0628\u0627\u06cc\u062a)", "CONCAT('{{#\u0632\u0645\u0627\u0646:j F Y|', page.page_touched, '}}')"], "rowcount": 469}], "runningtime": "0.46"}
enwiki_p
Thanked people for 2021 frwiki
Most thanked people in 2021 Blame Mz7, SQL, and stwalkerster for this
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": ["count(*)"], "rowcount": 1}], "runningtime": "0.12"}
frwiki
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len ...
{"resultsets": [{"headers": ["page_title", "hidden_category"], "rowcount": 13}], "runningtime": "0.06"}
enwiki_p
enWikiquote: #SheSaid tagged new articles (01-Oct-22 : 31-Dec-22)
New #SheSaid WikiQuote 2022 campaign articles. on English WikiQuote from Oct 1st 2022 till 31 Dec 2022. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable" The last length size (in the #SheSaid campaign peri...
SELECT CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS "New WikiQuote #SheSaid article" /*, actor_name AS "Creator", CONCAT( MID(rev_timestamp,1,4),'-',MID(rev_timestamp,5,2),'-',MID(rev_timestamp,7,2),' ', MID(rev_timestamp,9,2),':',MID(rev_timestamp,11,2),':',MID(rev_timestamp,13,2)) AS "Date created...
{"resultsets": [{"headers": ["pl_title"], "rowcount": 10}], "runningtime": "18.35"}
enwikiquote_p
Softball Tournament cats
null
select page_title from page where page_namespace=14 and ((page_title like '%_Softball_Tournament') ) and page_is_redirect=0
{"resultsets": [{"headers": ["Artikel", "Kategorie"], "rowcount": 11}], "runningtime": "0.06"}
enwiki
Pages re-created after previous G12 deletion
null
WITH sock_template AS ( SELECT tl.tl_from FROM enwiki_p.templatelinks tl WHERE tl.tl_target_id IN (32197, 277052, 282063, 115252, 1968835) ) SELECT DISTINCT CONCAT('https://en.wikipedia.org/wiki/', CASE WHEN rc.rc_namespace = 2 THEN 'User:' WHEN rc.rc_namespace = 118 THEN 'Draft:' ELSE '' END, rc.rc_title) AS 'P...
{"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 125}], "runningtime": "43.86"}
enwiki_p
Pages of non-existent users that redirect outside userspace
null
SELECT CONCAT('https://en.wikipedia.org/w/index.php?title=User', CASE WHEN p.page_namespace = 3 THEN '_talk:' ELSE ':' END, p.page_title, '&redirect=no') AS URL FROM enwiki_p.page p LEFT JOIN enwiki_p.user u ON REPLACE(SUBSTRING_INDEX(p.page_title, '/', 1), '_', ' ') = u.user_name INNER JOIN enwiki_p.pagelinks pl ON p....
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 1}], "runningtime": "55.97"}
enwiki_p
All users edit count all Dagwiki
null
SELECT actor_name,COUNT(rev_actor) as edit_count FROM revision,actor WHERE actor_id=rev_actor GROUP BY rev_actor ORDER BY count(rev_actor) desc
{"resultsets": [{"headers": ["pl_namespace", "pl_title"], "rowcount": 188}], "runningtime": "0.19"}
dagwiki_p
Vandalismebestrijding nlwiki
null
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"resultsets": [{"headers": ["reviewer", "Articles", "Redirects", "Total"], "rowcount": 1}], "runningtime": "0.09"}
nlwiki_p
Wiki Science Competition 2022 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_Science_Competitio...
{"resultsets": [{"headers": ["concat(\"[[\",page_title,\"]]\")", "redlinksCount"], "rowcount": 36035}], "runningtime": "37.31"}
commonswiki_p
enwiki username blocks by editcount
null
SELECT ipb_user, user_editcount FROM ipblocks INNER JOIN user ON user_name = ipb_user INNER JOIN comment_ipblocks on comment_id = ipb_reason_id WHERE comment_text RLIKE "WP:U(N|POL|SERNAME)?\\b|user ?name" ORDER BY 2 DESC
{"resultsets": [{"headers": ["log_title", "COUNT(*)"], "rowcount": 500}], "runningtime": "182.04"}
enwiki_p
w:en | orphaned talk pages
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 ...
{"resultsets": [{"headers": ["template"], "rowcount": 0}], "runningtime": "2.65"}
enwiki_p
مستخدمين بلا صلاحيات
يتم عرض اسم المستخدم ثم تاريخ إنشاء الحساب ثم عدد التعديلات الحية ثم عدد جميع التعديلات ثم عدد التعديلات في آخر شهر لكل المستخدمين غير الممنوعين ولا يمتلكون صلاحيات وعدد التعديلات الحية ٢٠٠ تعديل علي الأقل وعدد التعديلات في آخر شهر في جميع النطاقات ١٠ علي الآفل
SELECT actor_name AS user_name, date(user_registration) AS user_registration, (SELECT COUNT(*) FROM revision WHERE rev_actor = actor_id AND rev_deleted = 0) AS live_edits, user_editcount AS total_edits, (SELECT COUNT(*) FROM revision WHERE rev_actor = actor_id AND rev_timestamp > DATE_SUB(NOW(), IN...
{"resultsets": [{"headers": ["rev_comment_id", "rev_timestamp", "rev_minor_edit", "page_namespace"], "rowcount": 1}], "runningtime": "0.06"}
arwiki_p
Stewards statistics (Final)
null
select concat ("{{u|", user_name, "}}") as "username", ( select count(*) from logging inner join actor on actor_id = log_actor where actor_user = user_id and log_type = "gblblock" ) as "+Global block", ( select count(*) from logging ...
{"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 929}], "runningtime": "5.36"}
metawiki_p
new-to-commons sound logo voters
null
SELECT rev_id, rev_timestamp, actor_name, comment_text, TIMESTAMPDIFF(DAY, user_registration, NOW()) AS `user_age`, user_editcount FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id JOIN `user` ON actor_user = user_id JOIN comment_revision ON rev_comment_id = comment_id WHERE rev_page = ( SELECT pag...
{"resultsets": [{"headers": ["actor_name", "page_title", "COUNT(*)"], "rowcount": 50}], "runningtime": "0.96"}
commonswiki_p
sound logo votes by hour
null
SELECT LEFT(rev_timestamp, 10), COUNT(*) FROM revision_userindex WHERE rev_page = ( SELECT page_id FROM page WHERE page_namespace = 4 AND page_title = "Sound_Logo_Vote/Votes" ) AND rev_timestamp > 20221206000000 GROUP BY 1
{"resultsets": [{"headers": ["actor_name", "page_title", "COUNT(*)"], "rowcount": 20}], "runningtime": "1.05"}
commonswiki_p
Wikidata edits on 2022-12-01
null
select rev_timestamp, comment_text from revision join comment_revision on comment_id = rev_comment_id where rev_id > 1781782152 and rev_id < 1782474396 #and rev_timestamp >= timestamp('2022-12-01') #and rev_timestamp < timestamp('2022-12-02') #limit 10000
{"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "71.21"}
wikidatawiki
zhwiki: Pages which title contains Wikipedians
null
USE zhwiki_p; SELECT page_id, page_title FROM page WHERE page_namespace = 10 AND page_is_redirect = 0 AND page_title LIKE "%Welcome%"; # 0/1 main 2/3 user 4/5 wp 6/7 file 8/9 mediawiki 10/11 template # 12/13 help 14/15 cat 100/101 portal 118/119 draft 710/711 timedtext...
{"resultsets": [{"headers": ["\u0639\u0646\u0648\u0627\u0646", "\u0631\u062f\u0647"], "rowcount": 6}], "runningtime": "0.06"}
zhwiki_p
Thanked people for 2021 frwiki
Most thanked people in 2021 Blame Mz7, SQL, and stwalkerster for this
USE frwiki_p; SELECT log_title, COUNT(log_id) FROM logging_logindex WHERE log_type = "thanks" AND log_timestamp >= "20130000000000" AND log_timestamp <= "20140000000000" GROUP BY log_title ORDER BY 2 DESC
{"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 1176}], "runningtime": "21.09"}
frwiki
Wikidata External IDs
NOTE: this should be moved over to SPARQL where I also include a condition to have a formatter URL
select pi_property_id from wb_property_info where pi_type = 'external-id';
{"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 43}], "runningtime": "0.10"}
wikidatawiki
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len ...
{"resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 19}], "runningtime": "0.74"}
enwiki_p
nds_nlwiki Non-minor edits per year
null
SELECT LEFT(rev_timestamp, 4) AS year, COUNT(LEFT(rev_timestamp, 4)) AS `count` FROM revision WHERE rev_minor_edit=0 GROUP BY year ORDER BY year DESC
{"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 825}], "runningtime": "5.78"}
nds_nlwiki
ndswiki Non-minor edits per year
null
SELECT LEFT(rev_timestamp, 4) AS year, COUNT(LEFT(rev_timestamp, 4)) AS `count` FROM revision WHERE rev_minor_edit=0 GROUP BY year ORDER BY year DESC
{"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 3}], "runningtime": "74.03"}
ndswiki
مقالات بدون وصلات داخلية
null
SELECT p.page_title, p.page_len, a.actor_name as user_name FROM page p LEFT JOIN pagelinks pl ON p.page_id = pl.pl_from INNER JOIN revision r ON p.page_id = r.rev_page INNER JOIN actor a ON r.rev_actor = a.actor_id WHERE pl.pl_from IS NULL AND p.page_is_redirect = 0 AND p.page_namespace = 0 ...
{"resultsets": [{"headers": ["CONCAT('# [[',page_title,']]')"], "rowcount": 100000}], "runningtime": "84.68"}
arzwiki_p
Conversion script pages (es)
null
SELECT page_title FROM page JOIN revision ON rev_page = page_id JOIN actor ON actor_id = rev_actor WHERE actor_name = 'conversion script' AND page_namespace = 0 AND page_is_redirect = 0 AND rev_parent_id = 0 ORDER BY rev_timestamp DESC;
{"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": "3.98"}
eswiki_p
Dagwiki: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 >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') ...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.04"}
dagwiki_p
Dagwiki: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 >= 20221206000000 and rc_timestamp <= 20221231000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') ...
{"connection_id": 101642402}
dagwiki_p
USER 1 hat erstellt, USER 2 hat geändert
null
SET @user1 = 'Leyo'; SET @user2 = 'Itti'; SELECT actCreated.actor_name AS "erstellt von", actEdited.actor_name AS "geändert von", REGEXP_REPLACE(revEdited.rev_timestamp, '^(....)(..).*$', '\\1-\\2') AS "geändert JJJJ-MM", COUNT(*) AS "Anzahl", GROUP_CONCAT(REPLACE(page_title, '_', ' ') SEPAR...
{"resultsets": [{"headers": ["CONCAT('[[',page_title,']]')"], "rowcount": 3}], "runningtime": "7.14"}
dewiki_p
All bots
null
select actor_id, actor_name from actor where actor_id in (14126709, 18056118, 216043524, 14796318, 16375738, 22460537, 20266988, 563809, 9511030, 24468, 12761752, 14499063, 39925, 4432706, 43381, 953633, 10689166, 20533100, 19847846, 1612810, 264188, 8387952, 2223198, 3509975, 177986, 847016, 8980440, 6214873, 22009527...
{"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.24"}
enwiki