title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Potential 3RR by Alsoriano97 | Pages in the Portal namespace where Alsoriano97 has four or more edits that each remove more than 50 bytes.
Not all of these are 3RR breaches, or even edit warring; there's no attempt to limit to 24-hour timespans, and this can't identify (for example) removals of outright vandalism.
For [[WP:Arbitration/Requests/Cas... | SELECT COUNT(r.rev_id) AS '#/edits',
CONCAT('Portal:', page_title) AS 'page',
CAST(MIN(r.rev_timestamp) AS DATETIME) AS 'first timestamp',
CAST(MAX(r.rev_timestamp) AS DATETIME) AS 'last timestamp'
FROM revision_userindex AS r
JOIN revision AS p ON p.rev_id = r.rev_parent_id
JOIN actor_revision ON ... | {"resultsets": [{"headers": ["actor_name", "pages_created"], "rowcount": 40}], "runningtime": "59.83"} | enwiki_p |
বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ব্যবহারকারী | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ৫০০ ব্যবহারকারী | USE bnwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 500; | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 92}], "runningtime": "124.87"} | bnwiki_p |
Wikidata properties with datatype and formatter URL | https://www.mediawiki.org/wiki/Wikibase/Schema/wb_property_info | select * from wb_property_info; | {"resultsets": [{"headers": ["pagename"], "rowcount": 2}], "runningtime": "0.26"} | wikidatawiki_p |
Self-categorized categories (trwiki) | https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#Self-categorized_categories | SELECT
page_title,
cat_pages,
cat_subcats
FROM page
JOIN categorylinks ON cl_to = page_title
RIGHT JOIN category
ON cat_title = page_title
WHERE page_id = cl_from
AND page_namespace = 14
limit 100; | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 58}], "runningtime": "5.94"} | trwiki_p |
Comment search recent (rd) | null | SET STATEMENT max_statement_time = 600 FOR
SELECT DISTINCT
actor_name,
rc_this_oldid,
comment_text
FROM
recentchanges_userindex AS recentchanges
INNER JOIN comment_recentchanges AS comment ON recentchanges.rc_comment_id = comment.comment_id
INNER JOIN actor_recentchanges AS actor ON recentchanges.rc_actor =... | {"resultsets": [{"headers": ["pagename"], "rowcount": 27}], "runningtime": "0.60"} | enwiki_p |
Ruwiki redirects with English disambiguation | null | SELECT page_title AS title
FROM page
WHERE page_is_redirect = 1
AND page_namespace = 0
AND page_title RLIKE '.*[(](magazine|website)[)].*' | {"resultsets": [{"headers": ["page_title", "iwl_title"], "rowcount": 10}], "runningtime": "0.34"} | ruwiki_p |
Block comments with bare pipes | A non-exhaustive search for blocks (and unblocks) containing pipes not within either wikilinks or template invocations. This has caused a display error when shown to the blocked users since February 2022.
Regexes are poorly suited for this, though there aren't really any convenient alternatives. What this query spec... | SELECT log_id, log_timestamp, actor_name AS 'blocker', log_action, log_title AS 'blockee', comment_text
FROM logging
JOIN actor_logging ON actor_id = log_actor
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_type = 'block'
AND comment_text RLIKE '(^|[]}])[^[{]*\\|'
AND comment_text NOT LIKE '{{blocked... | {"resultsets": [{"headers": ["page_title"], "rowcount": 98}], "runningtime": "4.11"} | enwiki_p |
টুইংকলের নতুন সংস্করণ ব্যবহার করে সম্পাদনার পরিসংখ্যান | হালনাগাদ দেখার জন্য 'Fork'-এ ক্লিক করে পুনরায় কোয়েরি সাবমিট করুন | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'twinkle')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 0}], "runningtime": "43.03"} | bnwiki |
subcats from category | null | use commonswiki_p;
SELECT
page_title
FROM page p
JOIN categorylinks cl
ON p.page_namespace = 14 -- Optional namespace check. 14 - categories, 6 - files
AND cl.cl_from = p.page_id
AND cl.cl_to = "Donald_Trump" -- Insert your category here.
LIMIT 1000; | {"resultsets": [{"headers": ["page_namespace", "page_title", "rd_title"], "rowcount": 131}], "runningtime": "0.22"} | commonswiki_p |
Wistalk2 | Fork this query, change "idwiki" with target's Wikipedia language (e.g : "enwiki"), change the @target variable with the target's username, then run it.
See full list of all possible databases here : https://quarry.wmflabs.org/query/4031 | set @target = "Aftalium";
SELECT user_name,
CONCAT(substr(2022,1,4),"-",substr(June
JuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJuneJune,5,2), "-",substr(01,7,2)) AS 'sejak',
user_editcount AS 'edit count',
CONCAT(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2), "-",substr(rev_timestamp,7,2)," "... | {"resultsets": [{"headers": ["page_namespace", "page_title", "rd_title"], "rowcount": 112}], "runningtime": "0.28"} | idwiki |
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 >= 20220801000000 and rc_timestamp <= 20220816092600 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit')
group by rc_title) a
where tdif > 30000
order by tdif de... | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 108}], "runningtime": "11.38"} | idwiki |
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 >= 20220801000000 and rc_timestamp <= 20220816163500 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit')
... | {"resultsets": [{"headers": ["UTC_DATE()"], "rowcount": 1}], "runningtime": "0.07"} | idwiki |
Get "Potential copyright violations log" entries | null | SELECT *
FROM logging
WHERE log_type = 'pagetriage-copyvio'
ORDER BY log_id DESC
LIMIT 1000 | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 112}], "runningtime": "27.43"} | enwiki |
Get "Potential copyright violations log" entries | null | SELECT *
FROM logging
WHERE log_type = 'pagetriage-copyvio'
ORDER BY log_id DESC
LIMIT 1000 | {"resultsets": [{"headers": ["pagename"], "rowcount": 18}], "runningtime": "2.12"} | enwiki |
Tool Labs metadata database | Content of the metadata database; see https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database#Metadata_database for more information. | use meta_p;
SELECT * FROM wiki; | {"resultsets": [{"headers": ["page_title"], "rowcount": 10}], "runningtime": "0.07"} | meta_p |
Most used infoboxes at elwiki | null | use elwiki_p;
SELECT
Concat('[[Πρότυπο:',tl_title,']]'),
COUNT(*)
FROM templatelinks
WHERE tl_namespace = 10# and tl_from_namespace=0# tl_from_namespace=0
and tl_title like "Πληροφορίες%"
GROUP BY tl_title
ORDER BY COUNT(*) DESC
LIMIT 4000; | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 77}], "runningtime": "7.85"} | elwiki_p |
proofread-DeepaArul-கலைக்களஞ்சியம்1 | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SET @w:=0;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Pro... | {"resultsets": [{"headers": ["portal_redirect"], "rowcount": 28}], "runningtime": "0.68"} | tawikisource_p |
proofread-DeepaArul-கலைக்களஞ்சியம்1 | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SET @w:=0;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Pro... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 2796}], "runningtime": "20.75"} | tawikisource_p |
proofread-DeepaArul-கலைக்களஞ்சியம்1 | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SET @w:=0;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Pro... | {"resultsets": [{"headers": ["Dateiname"], "rowcount": 0}], "runningtime": "44.07"} | tawikisource_p |
proofread-TVA ARUN-கலைக்களஞ்சியம்1 | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SET @w:=0;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Pro... | {"resultsets": [{"headers": ["title"], "rowcount": 0}], "runningtime": "48.91"} | tawikisource_p |
WSta கலைக்களஞ்சியம்1 | 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('[[',page1.page_title,']]')", "MIN(revision1.rev_timestamp)"], "rowcount": 296}], "runningtime": "4.35"} | tawikisource_p |
New Page Reviewers eligible for barnstars - 2020 | New Page reviewers eligible for barnstars - 2020 (>=100 reviews) | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp BET... | {"resultsets": [{"headers": ["page_namespace", "page_title", "rev_timestamp"], "rowcount": 225}], "runningtime": "5.35"} | enwiki |
টুইংকলের নতুন সংস্করণ ব্যবহার করে সম্পাদনার পরিসংখ্যান | হালনাগাদ দেখার জন্য 'Fork'-এ ক্লিক করে পুনরায় কোয়েরি সাবমিট করুন | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'twinkle')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["page_namespace", "page_title", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.04"} | bnwiki |
New Page Reviewers eligible for barnstars - 2018 | New Page reviewers eligible for barnstars - 2018 (>=100 reviews) | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp BET... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 201}], "runningtime": "12.07"} | enwiki |
New Page Reviewers eligible for barnstars - 2019 | New Page reviewers eligible for barnstars - 2019 (>=100 reviews) | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp BET... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 500}], "runningtime": "1.37"} | enwiki |
Active editors for linked pages of AP districts category from 20220403 | Active editors of all pages linked from AP district category from 20220403, with atleast 5 edits. | SELECT
CONCAT("[[user:",user_name,"]]") as user_page,
COUNT(*) as Edits
FROM (
SELECT
DISTINCT pagel.page_id, pl_namespace, pl_title
FROM page
JOIN categorylinks ON cl_from = page_id AND cl_to="ఆంధ్రప్రదేశ్_జిల్లాలు" AND cl_type="page"
JOIN pagelinks ON pl_from=page_id AND pl_from_namespace=page_names... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 110}], "runningtime": "13.53"} | tewiki_p |
Most transcluded infoboxes without TemplateData | null | select lt_title as "template", count(tl_from) as "count"
from templatelinks
inner join linktarget on tl_target_id = lt_id
inner join page on lt_title = page_title
inner join categorylinks on cl_from = page_id
where tl_namespace = 10
and page_namespace = 10
and lt_namespace = 10
and cl_to = "Infobox_templates"
and not e... | {"resultsets": [{"headers": ["\uc81c\ubaa9", "\ud06c\uae30", "\ub9c8\uc9c0\ub9c9\ud3b8\uc9d1\uc2dc\uac01", "\ub9c8\uc9c0\ub9c9\ud3b8\uc9d1\uc790"], "rowcount": 1930}], "runningtime": "2.12"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "55.59"} | enwiki_p |
pages creator and last edit | null | select
page_namespace,
page_title,
(select actor_name from revision inner join actor on rev_actor = actor_id where rev_page = page_id order by rev_timestamp asc limit 1) 'creator',
(select TIMESTAMP(rev_timestamp) from revision where rev_page = page_id order by rev_timestamp asc limit 1) 'creation date',
... | {"resultsets": [{"headers": ["page_title", "user_name"], "rowcount": 209}], "runningtime": "3.11"} | enwiki_p |
Namespace pages edited by a user | null | null | {"resultsets": [{"headers": ["up_value"], "rowcount": 10}], "runningtime": "0.07"} | bnwikibooks_p |
scratch namespace count | null | select page_namespace, count(page_id) as normal_count
from page
WHERE page_is_redirect = 0 GROUP BY page_namespace ;
# content namespaces seem to be 0 main 146 lexeme 640 entityschema | {"resultsets": [{"headers": ["il_from", "page_title", "il_to"], "rowcount": 10000}], "runningtime": "10.20"} | wikidatawiki_p |
Internal Links (EN Wikipedia) | null | SELECT pl_from, pl_namespace, pl_title, pl_from_namespace from pagelinks
| {"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": 10}], "runningtime": "0.06"} | enwiki_p |
nolicense | null | SELECT
p0.page_namespace,
p0.page_title,
CONCAT("User talk:", actor_name)
FROM
categorylinks
JOIN page p0 ON cl_from = p0.page_id
JOIN logging_logindex
ON log_page = p0.page_id AND log_type = "upload"
JOIN actor_logging ON log_actor = actor_id
WHERE
cl_to = "Files_with_no_machine-readable_license"
... | {"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 0}], "runningtime": "83.50"} | commonswiki_p |
ITWS: ns0 pages linking to Authors without a backlink | Italian Wikisource: find ns0 pages (excluding subpages) linking to Authors (as the author of the text), but without a backlink to them | use itwikisource_p;
select concat('[[Autore:', replace(author.page_title, '_', ' '), ']]') as 'author/translator',
concat('[[', replace(text.page_title, '_', ' '), ']]') as text
from page author
inner join pagelinks on author.page_title = pagelinks.pl_title
inner join page text on text.page_id = pagelinks.pl_from
wher... | {"resultsets": [{"headers": ["concat (\"\u0646\u0642\u0627\u0634 \u062a\u0635\u0646\u064a\u0641:\",page_title)"], "rowcount": 500}], "runningtime": "0.69"} | itwikisource_p |
Wikidata content pages | null | SELECT COUNT(*)
FROM page
WHERE page_is_redirect = 0
AND page_namespace IN (0, 146, 640) -- content namespaces
;
SELECT SUM(ss_good_articles)
FROM site_stats
; | {"resultsets": [], "runningtime": "0.03"} | wikidatawiki_p |
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 >= 20220801000000 and rc_timestamp <= 20220819000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit')
group by rc_title) a
where tdif > 30000
order by tdif de... | {"resultsets": [{"headers": ["Page title", "Namespace", "Redirect?"], "rowcount": 402}], "runningtime": "0.56"} | idwiki |
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 >= 20220801000000 and rc_timestamp <= 20220819000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit')
... | {"resultsets": [{"headers": ["Page title", "Namespace", "Redirect?"], "rowcount": 402}], "runningtime": "0.56"} | idwiki |
Detailed user analytics | Fork this query, change "idwiki" with target's Wikipedia language (e.g : "enwiki"), change the @target variable with the target's username, then run it.
See full list of all possible databases here : https://quarry.wmflabs.org/query/4031 | set @target = "Aftalium";
SELECT user_name,
CONCAT(substr(user_registration,1,4),"-",substr(user_registration,5,2), "-",substr(user_registration,7,2)) AS 'sejak',
user_editcount AS 'edit count',
CONCAT(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2), "-",substr(rev_timestamp,7,2)," ",substr(rev_timestamp,9,... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 57}], "runningtime": "0.79"} | idwiki |
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": ["rc_cur_id", "rc_title", "rc_patrolled"], "rowcount": 1191}], "runningtime": "1.37"} | frwiki |
Blocks of Mirković Staša on the French Wikipedia | null | select log_id, log_action, log_title, date_format(log_timestamp, '%Y-%b-%d %H:%i:%s'), comment_text from logging, comment
where
log_title = comment_id
and lower(convert(comment_text using utf8mb4)) like '%staša%' or
lower(convert(comment_text using utf8mb4)) like '%mirković%'
and log_type = 'block'
and log_action ... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.39"} | frwiki_p |
Tournaments | null | select page_title from page where page_namespace=0
and ((page_title like '%_Men''s_Basketball_Tournament')
or (page_title like '%_Women''s_Basketball_Tournament')
or (page_title like '%_Men''s_Soccer_Tournament')
or (page_title like '%_Women''s_Soccer_Tournament')
or (page_title like '%_Men''s_Volle... | {"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 23}], "runningtime": "24.57"} | enwiki |
More Tournaments | null | select page_title from page where page_namespace=0
and ((page_title like '%_Men''s_%_Tournament')
or (page_title like '%_Women''s_%_Tournament')
)
and page_is_redirect=0 | {"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 0}], "runningtime": "0.06"} | enwiki |
Vorlage nur für BNR | Vorlagen die nur im BNR eines Benutzers verwendet werden, aber in keinem Artikel | SELECT REPLACE(lt_title, '_', ' ') AS "Vorlage", CONCAT('[[Spezial:Linkliste/Vorlage:', REPLACE(lt_title, '_', ' '), ']]') AS Linkliste
FROM linktarget, page
WHERE page_is_redirect = 0 # keine Weiterleitungen
AND lt_namespace = 10
AND page_title = lt_title
AND page_namespace = lt_namespace
# Nur von eine... | {"resultsets": [{"headers": ["user_name", "user_editcount", "ipb_expiry", "comment_text"], "rowcount": 50}], "runningtime": "0.13"} | dewiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["sum_count", "min_tc_time"], "rowcount": 1}, {"headers": ["rc_patrolled", "patrolled_count"], "rowcount": 3}], "runningtime": "0.56"} | enwiki_p |
টুইংকলের নতুন সংস্করণ ব্যবহার করে সম্পাদনার পরিসংখ্যান | হালনাগাদ দেখার জন্য 'Fork'-এ ক্লিক করে পুনরায় কোয়েরি সাবমিট করুন | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'twinkle')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["rank", "IFNULL(actor_name, '\u0412\u0441\u044c\u043e\u0433\u043e')", "created", "total_len", "articles"], "rowcount": 16}], "runningtime": "0.14"} | bnwiki |
Page deletions in main/draft namespaces by month | The number of pages deleted in the main and draft namespaces each month since 2021/07.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT LEFT(log_timestamp,6) AS 'year/month', CASE log_namespace WHEN 0 THEN 'main' ELSE 'draft' END AS 'namespace', COUNT(*)
FROM logging
LEFT JOIN page ON page_id = log_page
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_timestamp >= '202107'
AND log_namespace IN (0, 118)
GROUP BY LEFT(log_timestam... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1041156}], "runningtime": "1120.38"} | enwiki_p |
Botskapade communities i Wales | Artiklar (ej grensidor) skapade av Lsjbot efter 1 aug 2015 (d v s geografiartiklar), men som inte längre har "botflagga". | SELECT distinct page_title
FROM revision r, page p, categorylinks cl
WHERE rev_page = page_id
AND rev_actor = 257
AND rev_parent_id = 0
AND rev_timestamp >='20150801000000'
AND page_namespace = 0
AND page_is_redirect = 0
AND cl_from = page_id
AND cl_to in
(select page_title from page p, categorylinks c... | {"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 9}, {"headers": ["avg_edits_per_day"], "rowcount": 1}, {"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 9}, {"headers": ["avg_edits_per_day"], "rowcount": 1}], "runningtime": "0.55"} | svwiki |
Non redirect, non disambiguation mainspace articles without short descriptions | null | SELECT *
FROM categorylinks
JOIN page ON page_id = cl_from
WHERE page_namespace = 0
AND page_is_redirect = 0
AND cl_to != "Articles_with_short_description"
AND cl_from NOT IN (
SELECT cl_from
FROM categorylinks
WHERE cl_to = "All_disambiguation_pages"
)
# TODO: refactor to SELECT * FR... | {"resultsets": [{"headers": ["curid", "test", "log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 30}], "runningtime": "0.10"} | enwiki |
Number of edits on Arabic lexemes per user | null | select actor_name, count(*) c
from revision_userindex
join page on rev_page=page_id
join actor_revision on rev_actor=actor_id
JOIN pagelinks ON page.page_id=pagelinks.pl_from
where page_namespace = 146
AND pagelinks.pl_title="Q13955" #Arabic
group by actor_user
order by c desc;
| {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 58}], "runningtime": "4.52"} | wikidatawiki_p |
Soccer Tournament | null | select page_title from page where page_namespace=0
and ((page_title like '%_Men''s_Soccer_Tournament')
or (page_title like '%_Women''s_Soccer_Tournament')
)
and page_is_redirect=0 | {"resultsets": [{"headers": ["page_title", "page_latest"], "rowcount": 7986}], "runningtime": "18.42"} | enwiki |
Transclusion counts of certain templates | null | select lt_title, count(tl_from)
from templatelinks
inner join linktarget on tl_target_id = lt_id
where lt_title IN ("Cite_Mullié", "MachinerysHandbook25e", "London_Gazette", "Croatia_Yearbook_2015", "ODB", "Colvin1947", "Eisenbahnatlas_Deutschland", "Cite_DCB", "Cite_Q", "Oxford_Dictionary_of_Late_Antiquity", "Sorensen... | {"resultsets": [{"headers": ["img_major_mime", "img_minor_mime", "img_name"], "rowcount": 0}], "runningtime": "0.12"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 195}], "runningtime": "20.49"} | enwiki_p |
Ahmed Al-Hemyari blacklisting | This shows pages, existing and deleted, that match /.*ahmed.*hemyari.*/i.
For [[MediaWiki talk:Titleblacklist#Ahmed Al-Hemrayi]] (sic) circa 21 August 2022. | SET @pat='(?i)ahmed.*hemyari';
SELECT CONCAT('[[', CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 171}], "runningtime": "10.41"} | enwiki_p |
zhwiki: rollbackers without patroller | null | SELECT user_id, user_name, GROUP_CONCAT(ug_group SEPARATOR ",") AS user_groups
FROM user
LEFT JOIN actor ON user_id = actor_user
INNER JOIN user_groups ON user_id = ug_user AND ug_group IN ('patroller', 'rollbacker')
GROUP BY user_id
HAVING user_groups LIKE '%rollbacker%' AND user_groups NOT LIKE '%patroller%'
ORDER B... | {"resultsets": [{"headers": ["K\u0131rm\u0131z\u0131 ba\u011flant\u0131"], "rowcount": 1015}], "runningtime": "1.16"} | zhwiki_p |
Kategorideki maddeler | null | USE trwiki_p;
SELECT CONCAT('* [[',page_title,']]') AS "Maddeler"
FROM page
JOIN categorylinks
ON cl_from = page_id
WHERE cl_to = "Türkçe_Vikipedi_üzerinde_resmi_olmayan_ama_Vikiveride_resmi_olan_maddeler"
AND page_namespace = 0
ORDER BY page_title;
| {"resultsets": [{"headers": ["page_title"], "rowcount": 967}], "runningtime": "9.70"} | trwiki_p |
nycu: recent revision | null | SELECT DATE_FORMAT(rev_timestamp, '%Y%m%d') AS rev_date, COUNT(*)
FROM revision
LEFT JOIN page ON rev_page = page_id
WHERE page_namespace = 0
AND rev_timestamp >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 DAY), '%Y%m%d000000')
GROUP BY rev_date
ORDER BY rev_date DESC | {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 1000}], "runningtime": "2.79"} | zhwiki_p |
nycu: recent edit count | null | SELECT DATE_FORMAT(rc_timestamp, '%Y%m%d') AS rc_date, COUNT(*)
FROM recentchanges
WHERE rc_namespace = 0 AND rc_type IN (0, 1)
GROUP BY rc_date
ORDER BY rc_date DESC | {"resultsets": [{"headers": ["user", "cnt"], "rowcount": 156}], "runningtime": "1.43"} | zhwiki_p |
nycu: recent page count | null | SELECT rc_cur_id, COUNT(*)
FROM recentchanges
WHERE rc_namespace = 0 AND rc_type IN (0, 1)
GROUP BY rc_cur_id | {"resultsets": [{"headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"], "rowcount": 1000}], "runningtime": "18.56"} | zhwiki_p |
Participants WLE 2022 in DR Congo | null | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2022_in_DR_Congo"... | {"resultsets": [{"headers": ["pagename"], "rowcount": 2}], "runningtime": "0.26"} | commonswiki |
Count fixes in Wikipedia:Correct typos in one click | null | SELECT COUNT(*)
FROM revision
LEFT JOIN comment on rev_comment_id=comment_id
WHERE rev_page in (60533818,62053073,61925999,61926002,61926007,61926012,61926014,62002342,62002343,62002345,62002348,62002349,61925967,62057349,61925968,61925974,61925980,61925985,61925989,61925991,61925997)
AND comment_text LIKE "% fixed!"; | {"resultsets": [{"headers": ["CONVERT(cl_to USING utf8)", "COUNT(*)"], "rowcount": 4}], "runningtime": "89.00"} | enwiki_p |
AfC review counts, last 30 days | null | null | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 76}], "runningtime": "0.41"} | enwiki |
People who got editor rights at plwiki in 2021 compared with account creation date | null | SELECT user_name AS 'Redaktor', user_registration AS 'Data rejestracji', log_timestamp AS 'Przyznanie uprawnień', log_action AS 'Sposób' FROM logging
JOIN user
ON user_name = REPLACE(log_title, '_', ' ')
WHERE log_type = 'rights'
AND log_timestamp >= '20210101000000'
AND log_timestamp < '20220101000000'
AND log_params ... | {"resultsets": [{"headers": ["MID", "P6243", "QID", "CONCAT(\"File:\",page_title)"], "rowcount": 1449}], "runningtime": "2.74"} | plwiki_p |
Experienced users and newcomers | null | SET @minEdits = 0; -- 1) number of edits the user has to have to be considered experienced
SET @minTenureDays = 10; -- 2) if the user registered @minTenureDays days prior to the event (@eventDate), they're experienced
SET @eventDate = '20220821000000'; -- 3) see @minTenureDays
SELECT
user_name,
user_editco... | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 2971}], "runningtime": "3.07"} | cswiki_p |
User Registration Search | null | SELECT
*
FROM (
SELECT
logging.log_action,
logging.log_timestamp,
logging.log_title,
logging.log_params,
comment.comment_text,
user.user_name AS actor_username,
user.user_editcount AS actor_editcount,
CASE
WHEN logging.log_title IN (SELECT log... | {"resultsets": [{"headers": ["page_title"], "rowcount": 719}], "runningtime": "9.48"} | enwiki |
plwiki: English quotes in page title | null | SELECT page_title
FROM page where page_title like '%"%'
and page_is_redirect = 0 | {"resultsets": [{"headers": ["iwl_from", "iwl_prefix", "iwl_title"], "rowcount": 1}], "runningtime": "0.07"} | plwiki |
Ronald Merkle blacklisting | This shows pages, existing and deleted, that match /.*ron.*me?rke?l.*/i.
For [[MediaWiki talk:Titleblacklist#Ronald Merkle]] circa 23 August 2022. | SET @pat='(?i)ron.*me?rke?l';
SELECT CONCAT('[[', CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
... | {"resultsets": [{"headers": ["user_name", "user_registration", "user_editcount", "ipb_expiry"], "rowcount": 14}], "runningtime": "59.14"} | enwiki_p |
Non-list articles without short descriptions | null | SELECT Pa.page_title
FROM templatelinks
JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = tl_from
WHERE tl_namespace = 10 AND tl_title = "Infobox_person" AND tl_from_namespace = 0
AND NOT EXISTS (SELECT 1 FROM categorylinks
WHERE cl_from = Pa.page_id AND cl_to IN ("Arti... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 100}], "runningtime": "56.46"} | enwiki_p |
Third-party ArbCom blocks | arbcom blocks | select log_id, log_action, date_format(log_timestamp, '%Y-%b-%d %H:%i:%s'), comment_text from logging, comment
where
log_comment_id = comment_id
and (lower(convert(comment_text using utf8mb4)) like '%arbcom%' or
lower(convert(comment_text using utf8mb4)) like '%arbitration%')
and (lower(convert(comment_text using ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2}], "runningtime": "50.73"} | enwiki_p |
Wikidata NS4, not empty | null | SELECT CONCAT ("Wikidata:",page_title)
FROM page
WHERE page_namespace = 4
AND page_len >0
ORDER BY rand()
LIMIT 20000; | {"resultsets": [{"headers": ["page_title"], "rowcount": 6951}], "runningtime": "94.58"} | wikidatawiki_p |
Article creations by month | The number of pages created in the main namespace, excluding (still-existing) redirects/dabs, each month since 2021/07.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT LEFT(log_timestamp,6), COUNT(*)
FROM logging
LEFT JOIN page ON page_id = log_page
LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'disambiguation'
WHERE log_type = 'create'
AND log_timestamp >= '202107'
AND log_namespace = 0
AND COALESCE(page_is_redirect, 0) = 0
AND pp_page IS NULL
GROUP BY L... | {"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 9390}], "runningtime": "11.05"} | enwiki_p |
Article creations by new users by month | The number of pages created in the main namespace by users no more than 90 days old, excluding (still-existing) redirects/dabs, each month since 2021/07.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT LEFT(log_timestamp,6), COUNT(*)
FROM logging
LEFT JOIN page ON page_id = log_page
LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'disambiguation'
JOIN actor_logging ON actor_id = log_actor
JOIN user ON user_id = actor_user
WHERE log_type = 'create'
AND log_timestamp >= '202107'
AND log_namespace... | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 1764}], "runningtime": "15.60"} | enwiki_p |
Article creations by autopatrolled by month | The number of pages created in the main namespace by users with the autoreviewer right, excluding (still-existing) redirects/dabs, each month since 2021/07.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT LEFT(log_timestamp,6), COUNT(*)
FROM logging
LEFT JOIN page ON page_id = log_page
LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'disambiguation'
JOIN actor_logging ON actor_id = log_actor
JOIN user_groups ON ug_user = actor_user AND ug_group = 'autoreviewer'
WHERE log_type = 'create'
AND log_time... | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 291}], "runningtime": "13.36"} | enwiki_p |
Draftified pages by month | Pages moved from the main namespace to draft, each month since 2021/07.
log_params is plain awful to try to work with.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT LEFT(log_timestamp,6), COUNT(*)
FROM logging
WHERE log_type = 'move'
AND log_params RLIKE 's:[0-9]+:"4::target";s:[0-9]+:"Draft:'
AND log_timestamp >= '202107'
AND log_namespace = 0
GROUP BY LEFT(log_timestamp,6)
ORDER BY log_timestamp ASC; | {"resultsets": [{"headers": ["actor_name", "total", "weekdays", "dist_days"], "rowcount": 5}], "runningtime": "665.72"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["cl_from", "page_title", "min_timestamp", "max_timestamp", "n_this_month", "avg_per_month", "ratio"], "rowcount": 2944}], "runningtime": "5.39"} | enwiki_p |
Blocks of article-creating new users by month | The number of users blocked each month since 2021/07 while no more than 90 days old, who had previously created at least one page in the main namespace which (if still existing) is not a redirect or dab. (Pages created outside of the main namespace and then moved there don't qualify.)
Each user is counted no more tha... | SELECT yearmonth, COUNT(user_name)
FROM
(
SELECT LEFT(MIN(blocked.log_timestamp),6) AS `yearmonth`, user_name
FROM logging AS blocked
JOIN user ON user_name = log_title
WHERE log_type = 'block'
AND log_timestamp >= '202107'
AND log_type = 'block'
AND log_action = 'block'
AND TIMEDIFF(CAST(log_timestamp AS DATET... | {"resultsets": [{"headers": ["fa_id", "fa_name", "actor_name"], "rowcount": 1}], "runningtime": "2.55"} | enwiki_p |
(check-sign) recent edits in talk pages | null | SELECT actor_user, actor_name, rc_namespace, rc_title, rc_last_oldid, rc_this_oldid, rc_new_len-rc_old_len
FROM recentchanges
LEFT JOIN actor ON rc_actor = actor_id
WHERE (rc_namespace = 4 OR rc_namespace % 2 = 1)
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 7 DAY), '%Y%m%d%H%i%s')
AND actor_user IS ... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 6}], "runningtime": "33.39"} | zhwiki_p |
Arabic | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%Arabic%'
and not page_title like '%Arabicus%'
and not page_title like '%Arabica%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "1.68"} | enwiki_p |
Arabian | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%Arabian%'
and not page_title like '%Arabicus%'
and not page_title like '%Arabica%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 1}], "runningtime": "33.40"} | enwiki_p |
Arab | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%Arab%'
and not page_title like '%Arabic%'
and not page_title like '%Arabian%'
and not page_title like '%United_Arab_Emirates%'
and not page_title like '%Saudi_Arabia%'
AND page_is_redirect = 0; | {"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", "LOWER(CONVERT(log_title USING utf8mb4))", "LOWER(CONVERT(log_params USING utf8mb4))"], "rowcount": 1000}], "runningtime": "148.84"} | enwiki_p |
page count by namespace in enwiki (noting redirects) | null | SELECT page_namespace, page_is_redirect, count(page_id)
FROM page
WHERE page_is_redirect = 0 or page_is_redirect = 1
GROUP BY page_namespace, page_is_redirect ; | {"resultsets": [{"headers": ["page", "@page"], "rowcount": 1}], "runningtime": "0.06"} | enwiki_p |
page count by namespace in wikidata (noting redirects) | null | SELECT page_namespace, page_is_redirect, count(page_id)
FROM page
WHERE page_is_redirect = 0 or page_is_redirect = 1
GROUP BY page_namespace, page_is_redirect ;
# content namespaces seem to be 0 main 146 lexeme 640 entityschema | {"resultsets": [{"headers": ["page", "@page"], "rowcount": 1}], "runningtime": "0.06"} | wikidatawiki_p |
Patrollers w/no edits in a year | Users with the patroller right who have no enwiki edits since 2021 August 25, and their most recent edit (if any).
Compare query #16652; in particular, MAX(rev_timestamp) seems to break the index.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT * FROM
(
SELECT user_name,
(SELECT rev_timestamp
FROM revision_userindex
WHERE rev_actor = actor_id
ORDER BY rev_timestamp DESC
LIMIT 1) AS last_edit
FROM user_groups
JOIN user ON user_id = ug_user
LEFT JOIN actor_revision ON actor_user = user_id
WHERE ug_group = 'patroller... | {"resultsets": [{"headers": ["pagename"], "rowcount": 84}], "runningtime": "0.14"} | enwiki_p |
Patrollers w/no patrols in a year | Users with the patroller right who have no enwiki patrols since 2021 August 25, and their most recent patrol (if any).
Compare query #9134.
For [[WP:RAQ#For NPP]] circa 20 Aug 2022. | SELECT * FROM
(
SELECT user_name,
(SELECT log_timestamp
FROM logging_userindex
WHERE log_actor = actor_id
AND log_type = 'pagetriage-curation'
ORDER BY log_timestamp DESC
LIMIT 1) AS last_curation
FROM user_groups
JOIN user ON user_id = ug_user
LEFT JOIN actor_revision O... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 1}], "runningtime": "6.05"} | enwiki_p |
Disambiguation pages that aren't disambig-class or tagged with WikiProject Disambiguation | null | SELECT Pa.page_title
FROM templatelinks
JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = tl_from
WHERE cl_from = Pt.page_id AND cl_to = "ALl_disambiguation_pages")
AND NOT EXISTS (SELECT 1 FROM page Pt, categorylinks WHERE Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
... | {"resultsets": [{"headers": ["pagename"], "rowcount": 226}], "runningtime": "0.47"} | enwiki_p |
Disambiguation pages that aren't disambig-class or tagged with WikiProject Disambiguation | null | SELECT Pa.page_title
FROM templatelinks
JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = tl_from
WHERE cl_from = Pt.page_id AND cl_to = "ALl_disambiguation_pages"
AND NOT EXISTS (SELECT 1 FROM page Pt, categorylinks WHERE Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
... | {"resultsets": [{"headers": ["MID", "P6243", "QID"], "rowcount": 150}], "runningtime": "0.31"} | enwiki_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
WHERE cl_to = "All_disambiguation_pages"
AND NOT EXISTS (SELECT 1 FROM page Pt, categorylinks WHERE Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
AND cl_from = Pt.... | {"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 747}], "runningtime": "5.42"} | enwiki_p |
Disambiguation pages that 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
WHERE cl_to = "All_disambiguation_pages"
AND NOT EXISTS (SELECT 1 FROM page Pt, categorylinks WHERE Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
AND cl_from = Pt.... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 1}], "runningtime": "0.72"} | enwiki_p |
patrol and curation of userspace | null | SELECT actor_name AS `Reviewer`, log_namespace, page_title, log_type,
COUNT(*) as `Reviews`
FROM (
SELECT distinct log_actor, log_page, log_namespace, page_title, log_type
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timest... | {"resultsets": [{"headers": ["rc_cur_id", "rc_title", "rc_patrolled"], "rowcount": 6502}], "runningtime": "7.29"} | enwiki |
Wikidata NS14, not empty | orphan talkpages | SELECT CONCAT ("category talk:",page_title)
FROM page
WHERE page_namespace = 14
AND page_len >0
ORDER BY rand()
LIMIT 40000; | {"resultsets": [{"headers": ["page_title", "page_id", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.06"} | wikidatawiki_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
WHERE cl_to = "All_disambiguation_pages"
AND EXISTS (SELECT 1 FROM page Pt WHERE Pt.page_title = Pa.page_title AND Pt.page_namespace = 1)
AND NOT EXISTS (SELECT 1 FROM page Pt, categorylink... | {"resultsets": [{"headers": ["page_title"], "rowcount": 133499}], "runningtime": "147.15"} | enwiki_p |
hyphen instead of dash in number ranges | null | select *
from page
where page_title REGEXP '[0-9]-[0-9]'
and page_namespace = 0
and page_is_redirect = 0 | {"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 9}, {"headers": ["avg_edits_per_day"], "rowcount": 1}, {"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 8}, {"headers": ["avg_edits_per_day"], "rowcount": 1}], "runningtime": "5.84"} | ukwiki_p |
Empty article talks on plwiki | null | USE plwiki_p;
SELECT concat("# [[Dyskusja:",page_title,"]]") AS page_title
FROM plwiki_p.page
WHERE page_namespace = 1 AND page_len = 0
ORDER BY page_title; | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 0}], "runningtime": "56.56"} | plwiki_p |
page count by namespace in commons (noting redirects) | null | SELECT page_namespace, page_is_redirect, count(page_id)
FROM page
WHERE page_is_redirect = 0 or page_is_redirect = 1
GROUP BY page_namespace, page_is_redirect ; | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 0}], "runningtime": "35.34"} | commonswiki_p |
Wikidata NS14, not empty | orphan talkpages | SELECT CONCAT ("Help:",page_title)
FROM page
WHERE page_namespace = 12
AND page_len >0
ORDER BY rand()
LIMIT 40000; | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type", "rc_log_acti... | wikidatawiki_p |
Search b43 (main space) | null | SELECT DISTINCT actor_name, user_registration, comment_text
FROM actor_revision AS actor
INNER JOIN revision_userindex AS revision ON actor.actor_id = revision.rev_actor
INNER JOIN comment_revision AS comment ON revision.rev_comment_id = comment.comment_id
INNER JOIN user ON actor.actor_user = user.user_id
WHERE
TRUE
A... | {"resultsets": [{"headers": ["afl_wiki"], "rowcount": 1}], "runningtime": "0.54"} | enwiki |
Pages edited from 20220403 by user | Pages edited from 20220403 by a user | SELECT DISTINCT
page_title
FROM page
JOIN revision ON page_id = rev_page
JOIN actor ON rev_actor = actor_id
JOIN user ON user_id =actor_user
where rev_actor != 0 AND page_namespace=0 AND LEFT(rev_timestamp,8) >= "20220403" AND (user_name LIKE 'Arjunaraoc')
LIMIT 3000;
| {"resultsets": [{"headers": ["afl_wiki", "Hits"], "rowcount": 190}], "runningtime": "2.23"} | tewiki_p |
WikiDaheim 2022 media by date | null | SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(img_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, COUNT(image.img_name) as images
FROM image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
AND categorylinks.cl_to = "Media_from_WikiDaheim_2022_in_A... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 77}], "runningtime": "4.66"} | commonswiki_p |
WikiDaheim users 2021 (by first revision, by uploader) | Uploads by users for WikiDaheim 2022 (only first revisions) | SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count
FROM actor, revision, image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND actor.actor_id = revision.rev_actor
AND image.img_name = page.page_title
and revision.rev_page = page.page_... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 44}], "runningtime": "0.86"} | commonswiki_p |
Image metadata of files in both Category:Self-published_work and Category:All_free_media | null | # 110,000 Self-published_work, 174,000 All_free_media
SELECT img_name, actor_id, user_id, user_name, img_metadata
FROM categorylinks
JOIN page ON page_id = cl_from
JOIN image ON img_name = page_title
LEFT JOIN actor_image ON actor_id = img_actor
LEFT JOIN user ON user_id = actor_user
WHERE cl_to = "Self-published_work... | {"resultsets": [{"headers": ["CONCAT('| [[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']] ||[[:\u0391\u03c1\u03c7\u03b5\u03af\u03bf:', i_p.page_title, ']]')"], "rowcount": 0}], "runningtime": "1.71"} | enwiki |
Image metadata of files in both Category:Self-published_work and Category:All_free_media | null | # 110,000 Self-published_work, 174,000 All_free_media
SELECT img_name, actor_id, user_id, user_name, img_metadata
FROM categorylinks
JOIN page ON page_id = cl_from
JOIN image ON img_name = page_title
LEFT JOIN actor_image ON actor_id = img_actor
LEFT JOIN user ON user_id = actor_user
WHERE cl_to = "Self-published_work... | {"resultsets": [{"headers": ["Actor", "Edits", "Uploaded images", "Images MiB", "Images GiB", "Images TiB"], "rowcount": 3}], "runningtime": "12.88"} | enwiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.