title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Images uploaded to commons in the last X time | null | USE commonswiki_p;
SELECT count(*)
FROM image
JOIN page ON page_title = img_name AND page_namespace = 6
WHERE
img_timestamp > 20201119160000
AND img_timestamp < 20201119160002 | {"runningtime": "125.82", "resultsets": [{"rowcount": 100, "headers": ["page_title", "page_len", "rev_actor", "actor_name"]}]} | null |
When pages last had their link tables updated | null | use enwiktionary_p;
select
count(*) as pages,
date_format(page_links_updated, '%Y-%m') as `when updated`
from page
group by SUBSTR(page_links_updated, 1,6)
order by SUBSTR(page_links_updated, 1,6) desc; | {"runningtime": "54.33", "resultsets": [{"rowcount": 10623, "headers": ["page_title", "diff_len", "edits", "max_ts"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "80.30", "resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}]} | null |
Images uploaded to commons in the last X time | null | USE commonswiki_p;
SELECT count(*) FROM image
INNER JOIN page ON page_title = img_name AND page_namespace = 6
LEFT JOIN templatelinks ON tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Deletion_template_tag'
WHERE tl_from IS NULL
AND img_timestamp > UTC_TIMESTAMP() - INTERVAL 2 HOUR
AND img_timestamp < UTC_TIME... | {"runningtime": "91.06", "resultsets": [{"rowcount": 115, "headers": ["CONCAT('File:', REPLACE(page_title,'_',' '))"]}]} | null |
How many images were uploaded to commons in the last week | null | USE commonswiki_p;
SELECT count(*)
FROM image
WHERE
img_timestamp > 20201112160000
AND img_timestamp < 20201119160000 | {"runningtime": "3.15", "resultsets": [{"rowcount": 32, "headers": ["concat(REPLACE(REPLACE(REPLACE(el_to, 'https://quickstatements.toolforge.org/index_old.html#v1=',''),'%09','|'),'%0A','|'),'S4656|\\'\"https://commons.wikimedia.org/wiki/File',page_title,'\"')"]}]} | null |
স্বনামীয় | যে বিষয়শ্রেণীতে একই নামের নিবন্ধ বা বিষয়শ্রেণী আছে | USE bnwiki_p;
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; | {"runningtime": "2.92", "resultsets": [{"rowcount": 52, "headers": ["actor_name", "count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "1123.70", "resultsets": [{"rowcount": 134, "headers": ["page_title", "page_len", "COUNT(rev_actor)"]}]} | null |
Article External Lint Count | null | select count(distinct linter.linter_page), count(*)
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=0 and linter_cat=18 | {"runningtime": "3.77", "resultsets": [{"rowcount": 1, "headers": ["CONCAT('| [[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']] ||[[:\u0391\u03c1\u03c7\u03b5\u03af\u03bf:', i_p.page_title, ']]')"]}]} | null |
All mainspace redirects [enwn] | null | USE enwikinews_p;
SELECT page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 1
; | {"runningtime": "0.12", "resultsets": [{"rowcount": 1, "headers": ["max(rev_timestamp)"]}]} | null |
zhwp: B-Class articles | null | USE zhwiki_p;
SELECT DISTINCT cl_from, page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '乙级条目'
)
AND cl_type = 'page';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON c... | {"connection_id": 602404127} | null |
zhwp: C-Class articles | null | USE zhwiki_p;
SELECT DISTINCT cl_from, page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '丙级条目'
)
AND cl_type = 'page';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON c... | {"connection_id": 602405139} | null |
zhwp: Start-Class articles | null | USE zhwiki_p;
SELECT DISTINCT cl_from, page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '初级条目'
)
AND cl_type = 'page';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON c... | {"runningtime": "1.26", "resultsets": [{"rowcount": 68, "headers": ["actor_user"]}]} | null |
zhwp: Stub-Class articles | null | USE zhwiki_p;
SELECT DISTINCT cl_from, page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '小作品级条目'
)
AND cl_type = 'page';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON... | {"runningtime": "66.53", "resultsets": [{"rowcount": 229, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
zhwp: A-Class articles | null | USE zhwiki_p;
SELECT DISTINCT cl_from, page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '甲级条目'
)
AND cl_type = 'page';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON... | {"runningtime": "0.11", "resultsets": [{"rowcount": 2, "headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace", "page_title"]}]} | null |
টিটোর কমন্স আপলোড তালিকা, ১৬ নভেম্বর থেকে ৩০ নভেম্বর (২০২০) | Titodutta Commons upload between 16 and 30 November 2020 | USE commonswiki_p;
SELECT img_name
FROM image
WHERE img_actor = 5449 AND
img_timestamp BETWEEN "20201116000000" AND "20201130235959"
ORDER BY img_timestamp; | {"runningtime": "0.59", "resultsets": [{"rowcount": 162, "headers": ["tl_title", "tl_from_namespace", "page_title"]}]} | null |
Pages in some books on enwikisource by length | This query, as written, only lists those pages marked 'not proofread'. (Tackle the easy stuff first before moving on to longer pages!) | use enwikisource_p;
select current_date;
select concat("Page:", page_title), page_len
from page
join page_props
on pp_page = page_id
where pp_propname = 'proofread_page_quality_level'
and pp_value = 1
and page_namespace = 104
and (page_title like replace('Oxford Book of English Verse 1250-1900.djvu%',' ','_')
o... | {"runningtime": "0.78", "resultsets": [{"rowcount": 10, "headers": ["cat_title"]}]} | null |
[enwn] Most frequent unexisting links | Poplar {{w|PAGE}} where [[PAGE]] does not exist. | USE enwikinews_p;
SELECT pl_title, COUNT(pl_title) AS counting
FROM pagelinks
INNER JOIN page ON pl_from = page_id AND pl_from_namespace = 0 AND pl_namespace = 0
WHERE
NOT EXISTS
(SELECT p1.page_title FROM page AS p1
WHERE p1.page_title = pl_title
AND pl_namespace = 0
AND p1.page_namespace = 0)
GROUP BY pl_title
HAVIN... | {"connection_id": 615442340} | null |
top cswiki users by block log of all time | সংখ্যা অনুযায়ী বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি বাধাপ্রাপ্ত ব্যবহারকারী | USE cswiki_p;
FROM logging
WHERE log_type="page_latest"
LIMIT 500; | {"runningtime": "170.30", "resultsets": [{"rowcount": 0, "headers": ["page_title", "rev_timestamp"]}]} | null |
image distribution full sample | null | use astwiki_p;
select il_to, count(il_to) as num_articles
from imagelinks
where il_from_namespace in (0)
group by il_to
order by num_articles DESC
limit 5000; | {"runningtime": "0.08", "resultsets": [{"rowcount": 5, "headers": ["user", "language", "substring_index(page_title, '/', 2)", "Centralauth"]}]} | null |
trwiki:Template links to Şablon:Webarşiv, Şablon:Ölü bağlantı | null | USE trwiki_p;
SELECT DISTINCT (CASE WHEN page_namespace=10 THEN CONCAT("Şablon:",page_title) ELSE page_title END)
FROM templatelinks
LEFT JOIN page ON tl_from = page_id
WHERE tl_namespace = 10
AND tl_title RLIKE"^(?:[wW]ebar(?:şiv|chive)|[Öö]lü bağlantı|[Dd]ead link)"
AND page_namespace IN (0,10)
AND page_touched >= ... | {"resultsets": [{"rowcount": 1, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "... | null |
Blank Edit Summaries | Given a username, returns the percentage of edits that have a blank edit summary. (Lower is better.) | SET @username = 'Perryprog';
SELECT CONCAT(100 * COUNT(*) / (SELECT user_editcount FROM user WHERE user_name = @username),
'%') as 'Missing summary percentage'
FROM revision_userindex
JOIN comment ON (rev_comment_id = comment.comment_id AND comment.comment_text = '')
WHERE rev_actor = (SELECT ac... | {"resultsets": [{"rowcount": 4, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.27"} | null |
Disambigue per numero di collegamenti in ingresso su Wikiquote | Disambigue per numero di collegamenti in ingresso su Wikiquote | USE itwikiquote_p;
SELECT CONCAT('# [[', page_title, ']] (', COUNT(*), ')')
FROM page, pagelinks
WHERE pl_title = page_title
AND page_namespace = 0
AND page_is_redirect = 0
AND pl_namespace = 0
AND page_id IN
(SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation')
AND pl_from IN
(SELECT page_id
FROM page
... | {"resultsets": [{"rowcount": 192, "headers": ["concat(\"* [[:File:\",REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '),\"]]\")"]}], "runningtime": "14.61"} | null |
Active user only name | Active user only name | USE mlwikisource_p;
SELECT
CONCAT("user:",actor_name) AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*,user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 106
AND actor_user IS NOT NULL
AND rev_timestamp BETWEEN 20090101000000 AND 202012312... | {"resultsets": [{"rowcount": 31, "headers": ["Vikipedi:Telif sorunlar\u0131/Mirada maddeleri"]}], "runningtime": "1.65"} | null |
Voci senza interprogetto collegate a Commons su Wikiquote | null | USE itwikiquote_p;
SELECT DISTINCT CONCAT('# [[', page_title, ']]')
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_id NOT IN (
SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND (tl_title = 'Interprogetto'
OR tl_title = 'Ip'
OR tl_title = 'Commons'
OR tl_title = 'Commons_cat'
OR tl_titl... | {"resultsets": [{"rowcount": 29, "headers": ["distanzungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"]}], "runningtime": "21.43"} | null |
Dutch Wikipedia Articles by Quality (A, B, and C) | null | USE nlwiki_p;
(SELECT page_latest AS rev_id, rev_timestamp AS timestamp, page_title, page_len, "A" as wp10
FROM page
INNER JOIN categorylinks ON page_id = cl_from
INNER JOIN revision ON page_latest = rev_id
WHERE
cl_to = "Wikipedia:Etalage-artikelen" AND
page_namespace = 0)
UNION ALL
(SELECT b.page_latest AS rev_id... | {"resultsets": [{"rowcount": 89, "headers": ["actor_name", "total"]}], "runningtime": "1.33"} | null |
теги по частоте использования | null | USE ruwiki_p;
select * from change_tag_def;
| {"resultsets": [{"rowcount": 1467, "headers": ["img_name"]}], "runningtime": "4.12"} | null |
Attempt to kill my query | null | -- KILL QUERY "482044105";
SHOW PROCESSLIST; | {"resultsets": [{"rowcount": 100, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}], "runningtime": "0.38"} | null |
trwiki:Unexisting Mirada articles by Vikiprojes | null | USE trwiki_p;
SELECT pl_title, GROUP_CONCAT(DISTINCT pap_project_title SEPARATOR ", ") AS projects
FROM pagelinks
INNER JOIN page_assessments ON pl_from=pa_page_id AND pl_from_namespace = 0 AND pl_namespace = 0
INNER JOIN page_assessments_projects ON pa_project_id=pap_project_id
WHERE
NOT EXISTS
(SELECT p1.page_title ... | {"resultsets": [{"rowcount": 10, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}, {"rowcount": 1, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updat... | null |
wikidata:Unexisting trwiki Mirada articles with enwiki interwiki | Whole query (2358) https://quarry.wmflabs.org/run/509138/output/0/html
Top-importance (253) https://quarry.wmflabs.org/run/509586/output/0/html
High-importance (613) https://quarry.wmflabs.org/run/509587/output/0/html
Mid-importance (1008) https://quarry.wmflabs.org/run/509594/output/0/html
Low-importance (1049) https:... | USE wikidatawiki_p;
SELECT #CONCAT("# [[",REPLACE(trwpl.pl_title, "_", " "),"]]"," ([[:en:",wips.ips_site_page,"]])")
#CONCAT("# [[",REPLACE(trwpl.pl_title, "_", " "),"]]"," ([[:wikidata:",wdentity.page_title,"|",wdentity.page_title,"]]), ",arc.ar_len," bayt") AS "Vikipedi:Telif sorunları/Mirada maddeleri"
trwpl.pl_tit... | {"resultsets": [{"rowcount": 104, "headers": ["actor_name", "articles"]}], "runningtime": "35.10"} | null |
Disambiguation pages with external links (arwiki) | null | use arwiki_p;
select concat('[[',p.page_title,']]') Page
from page p
join page_props pp
on pp.pp_page = p.page_id
where pp.pp_propname = 'disambiguation'
and exists (select 1 from externallinks el where el.el_from=pp.pp_page and el.el_index not rlike '(?:toolserver|wiktionary|wikipedia|wmflabs)')
; | {"resultsets": [{"rowcount": 10, "headers": ["page_namespace", "page_title", "COUNT(*)"]}], "runningtime": "246.33"} | null |
[enwn] Find n-recent published stories in a particular category | SQL alternative to DynamicPageList. | USE enwikinews_p;
SELECT DISTINCT p.page_title, published.cl_timestamp
FROM page p
JOIN categorylinks category ON p.page_id = category.cl_from
JOIN categorylinks published ON p.page_id = published.cl_from
WHERE p.page_namespace = 0
AND category.cl_to = "United_States" # change this accordingly
AND published.cl_to = "... | {"resultsets": [{"rowcount": 35, "headers": ["substr(ar_timestamp,1,8)", "deletions"]}], "runningtime": "0.22"} | null |
Twinkle users (simplified) | null | USE enwiki_p;
SELECT
actor_name as `Username`,
user_editcount as `Edit count`,
user_registration as `Registration date`,
COUNT(*) as `Twinkle edits`
FROM revision_userindex
JOIN change_tag ON ct_rev_id = rev_id
JOIN actor_revision ON rev_actor = actor_id
JOIN `user` ON actor_user = user_id
WHERE ct_tag_id... | {"runningtime": "0.17", "resultsets": [{"headers": ["COUNT(user.user_name)"], "rowcount": 1}]} | null |
All female editors on German Wikipedia, sorted by user_id | null | USE dewiki_p;
SELECT
user_name,
user_id
FROM user
JOIN user_properties ON user_properties.up_user = user.user_id
WHERE user_properties.up_value = "female"
ORDER BY user_id ASC
LIMIT 100000; | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(up_user)"]}], "runningtime": "181.91"} | null |
File talk pages without file in bnwiki | null | USE bnwiki_p;
SELECT concat('* [[File talk:', p.page_title, ']] ') as pagetitle
FROM page p
LEFT OUTER JOIN page i_p ON i_p.page_title = p.page_title AND i_p.page_namespace = 6
LEFT OUTER JOIN commonswiki_p.page ci_p ON ci_p.page_title = p.page_title AND ci_p.page_namespace = 6
WHERE p.page_namespace = 7 AND i_p.page_t... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "164.43"} | null |
Minangkabau Wikipedia - Bot users | null | select user_name, ug_group from user, user_groups where user_id = ug_user and ug_group = 'bot'; | {"resultsets": [{"rowcount": 1, "headers": ["year", "mobile_revisions", "revisions", "mobile_percent"]}], "runningtime": "5.83"} | minwiki_p |
Seiten mit Klammerlemma und BKH | Liste für Seite https://de.wikipedia.org/wiki/Benutzer:KnightMove/Klammerlemmas_mit_BKH mit Ausnahmen aus https://de.wikipedia.org/wiki/Benutzer:KnightMove/Vielleicht_sinnvolle_BKHs_in_Klammerlemmas
Stand 3. September waren das 3195 Treffer | SELECT CONCAT('[[', REPLACE(P0.page_title, '_', ' '), ']]') AS Artikel,
REPLACE(tl_title, '_', ' ') AS Vorlage,
IF((SELECT 1
FROM templatelinks
WHERE tl_title = 'Personendaten'
AND tl_namespace = 10
AND P0.page_id = tl_from) = 1, "Person", "") AS Person... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(*)"]}], "runningtime": "1.23"} | dewiki_p |
multiple wikis: recent changes patrol statistics | null | # wikidatawiki_p
# enwiki_p
# dewiki_p
SELECT rc_patrolled, COUNT(rc_id) FROM recentchanges GROUP BY rc_patrolled; | {"resultsets": [{"rowcount": 7, "headers": ["\u06a9\u0627\u0631\u0628\u0631", "\u062f\u0644\u06cc\u0644", "\u0628\u0631\u0631\u0633\u06cc"]}], "runningtime": "0.26"} | dewiki_p |
Finding socks, pt 1 | null | SELECT user_id
FROM enwiki_p.user
WHERE user_name = "Theyogeshkaushik" | {"connection_id": 953824024} | enwiki_p |
سبزوار | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%سبزوار%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"], "rowcount": 1}], "runningtime": "0.58"} | fawiki_p |
RedWarn MAT Users | Users of the RedWarn Multiple Action Tool feature. This can be used to easily identify all users that have been bypassing RedWarn's permission restrictions. | -- =======================================================================
-- Derived from: https://quarry.wmflabs.org/query/48083
--
-- This query will show all RedWarn users who have used the MAT feature of
-- RedWarn. This helps in determining users who have tampered with the
-- RedWarn script in order to bypass pe... | {"connection_id": 998587521} | enwiki_p |
wikidata:Unexisting trwiki Mirada articles by interwiki | null | USE wikidatawiki_p;
SELECT trwpl.pl_title, wdentity.page_title, COUNT(DISTINCT wips.ips_site_id) as cnt,
GROUP_CONCAT(DISTINCT wips.ips_site_id SEPARATOR ", ") AS interwikis#,
#(CASE WHEN ips_site_id="enwiki" THEN ips_site_page ELSE NULL END) AS enwiki_title,
#(CASE WHEN ips_site_id="enwiki" THEN enp.page_len ELSE NU... | {"runningtime": "0.24", "resultsets": [{"rowcount": 82, "headers": ["page_title"]}]} | wikidatawiki_p |
frwiki:Pages in projet Histoire des sciences without trwiki interwikis | null | USE frwiki_p;
SELECT DISTINCT article.page_id, article.page_title, article.page_len,
(CASE
WHEN cl_to="Article_du_projet_Histoire_des_sciences_d'importance_maximum" THEN "En"
WHEN cl_to="Article_du_projet_Histoire_des_sciences_d'importance_élevée" THEN "Çok"
... | {"runningtime": "0.80", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | frwiki_p |
trwiki:Unexisting links in most visited articles within the scope of Vikiproje Bilim tarihi | null | USE trwiki_p;
SELECT pl_title, COUNT(pl_title) AS counting
FROM pagelinks
INNER JOIN page ON pl_from = page_id AND pl_from_namespace = 0 AND pl_namespace = 0 AND page_title IN (SELECT pl_title FROM pagelinks WHERE pl_from=2629735 AND pl_namespace = 0)
WHERE
NOT EXISTS
(SELECT p1.page_title FROM page AS p1
WHERE p1.pag... | {"resultsets": [{"rowcount": 1, "headers": ["page_title"]}], "runningtime": "0.25"} | trwiki_p |
مقالات مترجمة بواسطة أداة ترجمة المحتوى، وغير مرتبطة بوصلة لغات | null | #use arwiki_p;
select distinct *#page_title
from change_tag
inner join change_tag_def
on ct_tag_id = ctd_id
inner join revision
on rev_id = ct_rev_id
inner join page
on page_id = rev_page
where page_namespace = 0
and page_is_redirect = 0
and (ctd_name like "contenttranslation-v2"
or ctd_name like "contenttran... | {"runningtime": "3.96", "resultsets": [{"rowcount": 239, "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"]}]} | arwiki_p |
Editors of Abidjan article in Italian Wikipedia | null | SET @pageTitle = "Abidjan";
SET @pageId = (SELECT page_id FROM page WHERE page_title = REPLACE(@pageTitle, "_", " ") LIMIT 1);
SELECT actor_name, COUNT(*) AS Edits FROM revision_userindex
LEFT JOIN actor ON rev_actor = actor_id
WHERE rev_page = @pageId
GROUP BY actor_name
ORDER BY Edits DESC
LIMIT 10;
| {"connection_id": 1075727219} | itwiki_p |
Number of IP talk pages (enwiki) | null | select count(*)
from page
where page_namespace = 3
and (IS_IPV4(page_title) OR IS_IPV6(page_title)) | {"runningtime": "255.87", "resultsets": [{"headers": ["edit_username", "edits_after"], "rowcount": 830}]} | enwiki |
mainspace -> drafts | null | SELECT *
FROM redirect
JOIN page ON (page.page_id = redirect.rd_from)
WHERE rd_namespace = 118
AND page_namespace = 0 | {"runningtime": "0.11", "resultsets": [{"headers": ["rev_id"], "rowcount": 1}]} | enwiki_p |
*.royin.go.th in Thai wikipedia | This query searching for royin.go.th. The royin.go.th website will renaming their domain at 1 Oct 2020 so this will help to see which page that use old domain. | select page_title, el_to from externallinks where el_to like "%.royin.go.th/%" | {"runningtime": "11.09", "resultsets": [{"rowcount": 752, "headers": ["page_title", "rev_timestamp", "page_len"]}]} | thwiki_p |
Pages ending in semicolons | null | SELECT page_namespace, page_id, page_title, page_is_redirect FROM page WHERE page_title LIKE '%;' | {"runningtime": "0.53", "resultsets": [{"rowcount": 46, "headers": ["/64", "count"]}]} | enwiki_p |
Wikia links in article-space | null | SELECT DISTINCT page.page_title# , iwlinks.iwl_prefix, iwlinks.iwl_title
FROM page
INNER JOIN iwlinks ON page.page_id = iwlinks.iwl_from
WHERE page.page_namespace = 0
AND iwlinks.iwl_prefix = "wikia"
AND page.page_id NOT IN (SELECT tl_from FROM templatelinks WHERE tl_title = "Wikia_content" OR tl_title = "Stargate")
OR... | {"runningtime": "0.32", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}]} | enwiki_p |
Interlanguage links in templates | null | SELECT DISTINCT page.page_title, iwlinks.iwl_prefix, iwlinks.iwl_title
FROM page
# INNER JOIN categorylinks ON page.page_id = categorylinks.cl_from
# INNER JOIN templatelinks ON page.page_id = templatelinks.tl_from
INNER JOIN iwlinks ON page.page_id = iwlinks.iwl_from
WHERE page.page_namespace = 10
# AND categorylinks.... | {"runningtime": "423.31", "resultsets": [{"rowcount": 361, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lar", "CONCAT('\"',ips_site_page,'\"')"]}]} | enwiki_p |
enwiki: Translated pages with no language links | null | SELECT DISTINCT mainpage.page_title
FROM templatelinks
INNER JOIN page talkpage ON talkpage.page_id = templatelinks.tl_from
INNER JOIN page mainpage ON talkpage.page_title = mainpage.page_title
WHERE templatelinks.tl_title = "Translated_page"
AND templatelinks.tl_namespace = 10
AND templatelinks.tl_from_namespace = 1
A... | {"runningtime": "138.37", "resultsets": [{"rowcount": 1000, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lur", "CONCAT('\"',ips_site_page,'\"')"]}]} | enwiki_p |
Participants of WLE 2021 Ukraine by registration date | null | SELECT U.user_name, U.user_registration
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
JOIN commonswiki_p.user U ON A.actor_user=U.user_id
WHERE P.page_namespace = ... | {"connection_id": 15624095} | commonswiki_p |
All files on si.wiki with no license | null | #USE glwiki_p;
SELECT CONCAT("* [[:File:", img_name, "]]") AS file #,
# img_timestamp AS img_creation
# ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp.
FROM image
JOIN page
ON page_namespace = 6
AND page_title = img_name
JOIN categorylinks
ON cl_from = page_id
A... | {"runningtime": "0.96", "resultsets": [{"headers": ["\u0645", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u0625\u0646\u0634\u0627\u0621\u0627\u062a"], "rowcount": 19}]} | siwiki_p |
Ancient non-mainspace English Wiktionary pages | Also shows how to use a namespaces table to print readable full titles. | select
replace(concat(
if(page_namespace_name = '', '', concat(page_namespace_name, ':')),
page_title
), '_', ' ') as page_full_title,
replace(concat(
if(redirect_target_interwiki = '', '', concat(redirect_target_interwiki, ':')),
if(redirect_target_namespace_name = '', '', conc... | {"connection_id": 20378545} | enwiktionary_p |
Edit count in Ancient Greek entries | null | set @language = 'Ancient_Greek';
select actor_name as `user`, count(*) as `edit count` from categorylinks
join revision on rev_page = cl_from
join actor on actor_id = rev_actor
where cl_to in (concat(@language, '_lemmas'), concat(@language, '_non-lemma_forms'))
group by rev_actor
order by `edit count` desc; | {"runningtime": "1635.96", "resultsets": [{"rowcount": 294, "headers": ["CONCAT(\"Q\",ips_item_id)", "Len", "CONCAT('\"',ips_site_page,'\"')"]}]} | enwiktionary_p |
Count of user pages | null | select
user_name,
count(*) as subpage_count
from (select
page_id as id,
replace(substring_index(page_title, "/", 1), '_', ' ') as user_name
from page
where page_namespace = 2)
as user_subpage
group by user_name
order by subpage_count desc; | {"runningtime": "0.04", "resultsets": []} | enwiktionary_p |
Non-redirect pages not regenerated in years | Some of the older ones do not have templates (or other transcluded pages) or have templates that also haven't been edited in a long time. | select
page_namespace as namespace,
page_title as title,
concat('en.wiktionary.org?curid=', page_id) as url,
date_format(page_links_updated, '%Y-%m-%d') as `when updated`
-- if(page_is_redirect, 'yes', 'no') as `is redirect`
from page
where page_links_updated <= '20159999999999'
and page_is_redirec... | {"runningtime": "6.45", "resultsets": [{"rowcount": 20, "headers": ["page_title"]}]} | enwiktionary_p |
Count of categories of user and user talk page | null | select
page_namespace, page_title,
count(*) as category_count
from page
left join categorylinks on cl_from = page_id
where page_namespace in (2, 3)
group by page_id
order by category_count desc; | {"runningtime": "2.25", "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": 8}]} | enwiktionary_p |
Mainspace displaytitles with class attributes | null | select
page_title as title,
pp_value as displaytitle,
concat("en.wiktionary.org?curid=", pp_page) as url
from page_props
join page on page_id = pp_page
where page_namespace = 0
and pp_propname = 'displaytitle'
and pp_value like '%class="%'; | {"runningtime": "1.89", "resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "Last log", "user_group"], "rowcount": 661}]} | enwiktionary_p |
Creators of Old Irish entries | Naive version of a count of how many Old Irish entries were created by each editor on English Wiktionary. In more precise terms, editors of first revisions of pages in the Old Irish lemma and non-lemma forms category with the number of pages they had the first revision of.
This is naive because many pages that have an... | set @language = 'Old_Irish';
select actor_name as `user`, count(*) as `entries created` from categorylinks
join revision on rev_page = cl_from
join actor on actor_id = rev_actor
where cl_to in (concat(@language, '_lemmas'), concat(@language, '_non-lemma_forms'))
and cl_type = 'page'
and rev_parent_id = 0
group by acto... | {"runningtime": "21.80", "resultsets": [{"rowcount": 6324, "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"]}]} | enwiktionary_p |
Hidden images wiki <> commons | null | #USE dewiki_p;
USE enwiki_p;
#USE eswiki_p;
#USE frwiki_p;
#USE nlwiki_p;
SET @w = LEFT (DATABASE(), LENGTH(DATABASE()) - 6);
SELECT CONCAT('# [[c:File:', REPLACE (wi.img_name, '_', ' '), ']] != [[:', @w, ':{{ns:6}}:', REPLACE (wi.img_name, '_', ' '), ']]')
FROM image wi
INNER JOIN commonswiki_p.image ci
ON ci.img_name... | {"runningtime": "0.03", "resultsets": []} | enwiki_p |
nlwiki Template redirects to check | null | SELECT COUNT(page_title) AS `without category`
FROM page
WHERE page_namespace=10 AND page_is_redirect=1 AND NOT EXISTS (SELECT * FROM categorylinks WHERE cl_from=page_id);
SELECT page_title, COUNT(tl_from) AS `tl`, COUNT(pl_from) AS `pl`, rd_namespace AS `rdns`, rd_title
FROM page
LEFT JOIN redirect ON (page_id=rd_f... | {"runningtime": "0.44", "resultsets": [{"headers": ["file", "actor_name"], "rowcount": 222}]} | nlwiki |
Userspace files used in article space | null | SELECT filepage.page_title
FROM categorylinks
INNER JOIN page filepage ON filepage.page_id = categorylinks.cl_from
INNER JOIN imagelinks ON imagelinks.il_to = filepage.page_title
WHERE categorylinks.cl_to = "Userspace_files"
AND imagelinks.il_from_namespace = 0 | {"runningtime": "0.96", "resultsets": [{"headers": ["actor_name", "antal"], "rowcount": 611}]} | enwiki_p |
Special:WantedCategories replica | Cats in red linked categories | SELECT
page_title,
cl_to
FROM page
JOIN
(SELECT DISTINCT
cl_to , cl_from
FROM categorylinks
LEFT JOIN page
ON cl_to = page_title
AND page_namespace = 14
WHERE page_title IS NULL
AND cl_to <> "Wikipedians_with_red-linked_categories_on_their_user_page"
AND cl_to <> "Wikipedians_with_red-l... | {"runningtime": "0.20", "resultsets": [{"rowcount": 100, "headers": ["page_title", "cl_to"]}]} | enwiki_p |
Label/description/alias stats for Bengali | Since the migration away from wb_terms, and since the Grafana dashboard which previously displayed these stats is broke, the only way to get semi-immediate statistics on these is for a single language at a time. (There are pages, such as https://wikidata-analytics.wmcloud.org/app/WD_LanguagesLandscape and https://www.w... | use wikidatawiki_p;
SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text... | {"runningtime": "6.63", "resultsets": [{"rowcount": 103, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]} | wikidatawiki_p |
One million Malayalam labels | One million Malayalam labels is a event organised by WikiProject Kerala to add and improve Malayalam labels in Wikidata. | USE wikidatawiki_p;
SELECT current_date;
SELECT actor_name as Username, COUNT(*) as Number_of_labels_added
FROM (
SELECT actor_name,
rc_title, comment_text
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor
WHERE (co... | {"runningtime": "0.85", "resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 39}]} | wikidatawiki_p |
Edits made by participants of One million Malayalam labels | (Ripped from wdvd's code and modified a bit.)
Thanks, Adam, for further modifications! | USE wikidatawiki_p;
SELECT DISTINCT rev_id, rc_timestamp, actor_name, rc_title, comment_text
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor
LEFT JOIN revision on revision.rev_id = recentchanges.rc_this_oldid
WHERE (comm... | {"runningtime": "504.37", "resultsets": [{"rowcount": 240, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lar", "CONCAT('\"',ips_site_page,'\"')"]}]} | wikidatawiki |
2021 Pacific typhoon season analysis: Common edit summaries | Part of [[w:en:User:Chlod/Analysis/2021 Pacific typhoon season]]. | SET @page = "2021 Pacific typhoon season";
SELECT
COUNT(*) as `instances`,
comment_text
FROM revision r1
JOIN `comment` ON rev_comment_id = comment_id
WHERE
rev_page = (SELECT page_id FROM page WHERE page_namespace = 0 AND page_title = REPLACE(@page, " ", "_"))
GROUP BY comment_text | {"runningtime": "0.11", "resultsets": [{"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}]} | enwiki_p |
2021 Pacific typhoon season analysis: Specific edit summaries | Part of [[w:en:User:Chlod/Analysis/2021 Pacific typhoon season]]. | SET @page = "2021 Pacific typhoon season";
SELECT
COUNT(IF(LCASE(CONVERT(`comment_text` USING utf8)) LIKE '%current storm information%', 1, NULL)) as `CSI`,
COUNT(IF(LCASE(CONVERT(`comment_text` USING utf8)) LIKE '%season effects%', 1, NULL)) as `SE`,
COUNT(IF(LCASE(CONVERT(`comment_text` USING utf8)) LIKE '%... | {"runningtime": "0.54", "resultsets": [{"headers": ["ans", "article", "rns", "redlink"], "rowcount": 244}]} | enwiki_p |
User:SDZeroBot/Pending AfC submissions | null | SELECT page_title, page_latest, cl_sortkey_prefix, actor_name, rev_timestamp, user_editcount,
(SELECT afds.page_title from page afds
WHERE page_namespace = 4
AND afds.page_title = CONCAT('Articles_for_deletion/', p.page_title)
AND afds.page_id NOT IN (... | {"runningtime": "139.24", "resultsets": [{"rowcount": 2, "headers": ["CONCAT('[[', page_title, ']]')"]}]} | enwiki |
nlwiki Shortest non-stub articles | null | SELECT page_title, page_is_new, page_len, rev_timestamp
FROM page, revision
WHERE
NOT EXISTS (SELECT * FROM page_props WHERE page_id=pp_page AND pp_propname='disambiguation') AND
NOT EXISTS (SELECT * FROM categorylinks WHERE page_id=cl_from AND cl_to REGEXP '^Wikipedia:(Beginnetje_|Verwijderbaar/)') AND
page_namesp... | {"runningtime": "8.20", "resultsets": [{"rowcount": 106, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_namespace", "page_title"]}, {"rowcount": 100, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_namespace", "page_title"]}]} | nlwiki |
nds_nlwiki Empty pages | null | SELECT page_namespace, page_title
FROM page
WHERE page_namespace NOT IN (2,3) AND page_len=0
ORDER BY page_namespace, page_title | {"runningtime": "0.13", "resultsets": [{"headers": ["date", "images"], "rowcount": 25}]} | nds_nlwiki |
Most used external links with .fr on frwiki | null | USE frwiki_p;
SELECT
COUNT(*),
SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3), '.', -2) AS sito
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3), '.', -1) = 'fr'
GROUP BY sito
HAVING COUNT(*) > 10
ORDER BY 1 DESC; | {"runningtime": "0.68", "resultsets": [{"headers": ["rank", "reviews (including comments)", "reviews", "Username", "accepted", "declined", "rejected", "commented on", "accept %", "decline %", "reject %", "comment %", "links"], "rowcount": 72}]} | frwiki_p |
Most used external links with gouv.fr on frwiki | null | USE frwiki_p;
SELECT
COUNT(*),
SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3), '.', -3) AS site
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3), '.', 0) = 'gouv.fr'
GROUP BY site
HAVING COUNT(*) > 10
ORDER BY 1 DESC; | {"runningtime": "0.78", "resultsets": [{"rowcount": 0, "headers": ["Title", "user", "comment"]}]} | frwiki_p |
Empty discussion pages on dewiki | null | SELECT CONCAT('# [[Diskussion:', page_title, ']]')
FROM page
WHERE page_namespace = 1
AND page_len = 0 | {"runningtime": "3.13", "resultsets": [{"rowcount": 1, "headers": ["(\n SELECT COUNT(*) FROM logging\n WHERE log_type = \"patrol\"\n AND log_action = \"patrol\"\n AND log_timestamp BETWEEN 20201201000000 AND 20210101000000 \n AND log_params NOT LIKE '%\"5::previd\";s:1%' # Ignore new page patrols\n AND log_params... | dewiki_p |
Pages lacking sources or talk pages | null | SELECT pg.page_title
FROM page pg
INNER JOIN categorylinks on pg.page_id = categorylinks.cl_from
WHERE pg.page_is_redirect = 0
AND pg.page_namespace = 0
AND pg.page_title NOT IN (SELECT pg2.page_title FROM page pg2 WHERE pg2.page_namespace = 1)
AND categorylinks.cl_to = "All_articles_lacking_sources"
LIMIT 1000 | {"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace"], "rowcount": 10}], "runningtime": "0.07"} | enwiki_p |
External link lint article list | null | select page_title
, count(*) as page_count
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=0 and linter_cat = 18
group by page.page_id
order by count(*) desc, page_title asc
limit 100; | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}], "runningtime": "0.11"} | enwiki |
Most inactive admins @ zhwiki | Admins with no edits or log actions for six months will be removed after a 1-month notification period.
Note: deleted edits are NOT considered by this query. | SELECT * AS active_sysops FROM (SELECT log_actor FROM logging
WHERE log_type IN ("block","delete","protect")
AND log_timestamp > 20210711000000 GROUP BY log_actor) AS active_users
INNER JOIN actor ON active_users.log_actor = actor_id
INNER JO... | {"resultsets": [{"headers": ["up_value", "COUNT(*)"], "rowcount": 16}], "runningtime": "17.29"} | zhwiki_p |
Editor user in dewiki | null | Use dewiki_p;
Select user.user_id, user.user_name, user_groups.ug_user, user_groups.ug_group
From user
join user_groups on user.user_id = user_groups.ug_user
Where ug_group = 'editor'
; | {"resultsets": [{"headers": ["ll_count", "title_en", "title_fr"], "rowcount": 100}], "runningtime": "291.15"} | dewiki_p |
Reply Tool usage/user (en.wiki) | null | select actor_name, count(*) as total
from (
select ct.ct_id, ct.ct_rev_id, actor_user, actor_name
from enwiki_p.change_tag ct
inner join enwiki_p.revision_actor_temp rat
on ct.ct_rev_id = rat.revactor_rev
inner join enwiki_p.actor act
on rat.revactor_actor = act.actor_id
inner join enwiki_p.change_tag_def
on ct_tag_i... | {"resultsets": [{"headers": ["Title", "Project"], "rowcount": 226}], "runningtime": "13.52"} | enwiki_p |
Tags | null | SELECT * FROM `change_tag_def`; | {"connection_id": 16678604} | enwiki_p |
Count of reverted edits for 2021 | null | SET @revStart = (SELECT MIN(rev_id)
FROM revision
WHERE rev_timestamp >= 20210101000000 AND rev_timestamp <= 20220101000000);
SET @revEnd = (SELECT MAX(rev_id)
FROM revision
WHERE rev_timestamp >= 20210101000000 AND rev_timestamp <= 20220101000000);
SELECT
C... | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 6}, {"headers": ["rc_namespace", "rc_... | enwiki_p |
nlwiki Articles "_van_A_tot_Z" not categorized in "A-Z_lijsten" | null | SELECT page_title
FROM page
WHERE
page_is_redirect=0 AND
page_namespace=0 AND
page_title REGEXP '_van_[Aa]_tot_[Zz]$' AND
NOT EXISTS (SELECT * FROM categorylinks WHERE cl_from=page_id AND (cl_to='A-Z_lijsten' OR cl_to REGEXP '_van_A_tot_Z$'))
ORDER BY page_title;
SELECT page_title, rd_title
FROM page RIGHT J... | {"resultsets": [{"headers": ["date_sub(now(), INTERVAL 1 WEEK)"], "rowcount": 10}], "runningtime": "0.08"} | nlwiki |
Special:IndexPages query | Query performed by Special:IndexPages in the ProofreadPage extension | use itwikisource_p;
select
page_namespace AS namespace,
page_title AS title,
pr_count,
pr_q0,
pr_q1,
pr_q2,
pr_q3,
pr_q4
from pr_index
join page on pr_page_id = page_id
where pr_count - pr_q0 - pr_q3 - pr_q4 > 0 | {"resultsets": [{"headers": ["Artikel", "Link im Artikel", "Toter Link"], "rowcount": 2094}], "runningtime": "3.50"} | itwikisource_p |
List of requests for comment on jawp | ウィキペディア日本語版におけるコメント依頼の一覧。表に無かったので作ってみたけどどこかにあるのかな? | USE jawiki_p;
SELECT concat("Wikipedia:", page_title) AS ページ名, DATE(MIN(rev_timestamp)) AS 提出日
FROM page INNER JOIN revision_userindex AS rev ON page_id = rev_page
WHERE page_title LIKE "コメント依頼/%" AND page_namespace = 4
GROUP BY page_id, page_title, page_len
ORDER BY rev_timestamp ASC | {"resultsets": [{"headers": ["Tables_in_nowiki_p"], "rowcount": 90}], "runningtime": "0.22"} | jawiki_p |
عناوين مقالات تحتوي مدة (مثل هـ) | null | use arwiki_p;
select concat('[[',page_title,']]') from page
where page_title like "%ـ%"
and page_title not like "%هـ%"
and page_namespace = 0
and page_is_redirect = 0; | {"resultsets": [{"headers": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 13055}], "runningtime": "16.02"} | arwiki_p |
dewiki block log entries 2020 | null | USE dewiki_p;
SELECT comment_text, count(comment_text) FROM logging, comment WHERE
log_comment_id = comment_id AND
log_action = 'block' AND
log_timestamp > '20200101000000' AND
length(comment_text)<130
group by comment_text order by count(comment_text) desc; | {"resultsets": [{"headers": ["ptrp_page_id", "ROUND(ptrp_reviewed_updated, -4)"], "rowcount": 47}], "runningtime": "0.16"} | dewiki |
All needed photograph date categories | Day, Month, Year, Decade, and Century of photographs with all the countries listed on Commons | WITH RECURSIVE `needed_category` AS (
SELECT `cat_title` AS `name` FROM `category` WHERE
(`cat_pages` > 0 OR `cat_subcats` > 0 OR `cat_files` > 0)
AND `cat_title` NOT IN (SELECT `page_title` FROM `page`)
),
`known_countries_cat` AS (
SELECT `page_title` AS `name` FROM
`page`
INNER JOIN `categorylinks`... | {"resultsets": [{"headers": ["page_title"], "rowcount": 352}], "runningtime": "0.84"} | commonswiki |
CS1 References with Missing Titles | Get pages listed in the CS1 errors category where one or more of the page references are missing titles | SELECT
page.page_title,
CAST(page.page_touched AS DATETIME) AS 'last_touched',
CONCAT("https://en.wikipedia.org/wiki/",page.page_title) AS 'link'
FROM
categorylinks
INNER JOIN page ON categorylinks.cl_from = page.page_id
WHERE
-- Only pages linked in the category page
categorylinks.cl_type = 'page'
... | {"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", "actor_id", "actor_user", "actor_name"], "rowcount": 0}], "runningtime": "0.06"} | enwiki_p |
Blunders | All of my edit summaries that contain "oops" (includes "whoops" and "whoopsie"). | SELECT
`rev_id` AS "ID",
`page_namespace` AS "Namespace",
REPLACE(`page_title`, "_", " ") AS "Page",
DATE_FORMAT(`rev_timestamp`, "%Y-%m-%d %H:%i:%s") AS "Time",
`comment_text` AS "Comment"
FROM `revision_userindex`
RIGHT JOIN `comment_revision` ON `rev_comment_id` = `comment_id`
RIGHT JOIN `page` ON `... | {"resultsets": [{"headers": ["page_title"], "rowcount": 432}], "runningtime": "0.81"} | enwiki_p |
trwiki:Article titles containing "zaman çizelgesi" | null | USE trwiki_p;
SELECT page_title FROM page
WHERE page_namespace=0 and page_is_redirect=0 AND page_title LIKE "%zaman_çizelgesi%" ORDER BY page_title DESC; | {"resultsets": [{"headers": ["$user", "$VE_edits"], "rowcount": 1}], "runningtime": "0.07"} | trwiki_p |
enwiki:Pages in WikiProject Women% and WikiProject History of Science without trwiki interwikis (page_assessments table) | null | SELECT DISTINCT page_title, page_len, (CASE
WHEN as2.pa_importance="Top" THEN "En"
WHEN as2.pa_importance="High" THEN "Çok"
WHEN as2.pa_importance="Mid" THEN "Orta"
WHEN as2.pa_importance="Low" THEN "Az"
WHEN as2.pa_import... | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 273}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 83}], "runningtime": "2.65"} | enwiki_p |
frwiki:Pages in projet Fem% and projet Histoire des sciences without trwiki interwikis (page_assessments table) | null | USE frwiki_p;
SELECT DISTINCT page_title, page_len, (CASE
WHEN as2.pa_importance="maximum" THEN "En"
WHEN as2.pa_importance="élevée" THEN "Çok"
WHEN as2.pa_importance="moyenne" THEN "Orta"
WHEN as2.pa_importance="faible" THEN "Az"
... | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 34}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 17}], "runningtime": "2.59"} | frwiki_p |
trwiki:Most frequent unexisting links to Mirada articles | null | USE trwiki_p;
SELECT pl_title, COUNT(pl_title) AS counting, arc.ar_len, SUM(CAST(r.ar_len AS INT) - COALESCE(CAST(rp.ar_len AS INT),0)) AS mirada_bytes
FROM pagelinks
JOIN page ON pl_from = page_id AND pl_from_namespace = 0 AND pl_namespace = 0
JOIN archive AS arc ON
ar_title=pl_title
AND ar_timestamp <= (SELECT TIME... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 170}], "runningtime": "3.71"} | trwiki_p |
trwiki:Unexisting Mirada articles in vital articles lists | null | USE trwiki_p;
SELECT CONCAT("[[",REPLACE(pl_title,"_"," "),"]] (",arc.ar_len," bayt)") as Madde, (CASE
WHEN pl_from=7662 THEN "1000"
WHEN pl_from=1471960 THEN "Kişiler"
WHEN pl_from=1472822 THEN "Tarih"
WHEN pl_from=1472900 THEN "Coğrafya"
WHEN pl_from=1472903 THEN "Sanat"
WHEN pl_from=1472527 THEN "Felsefe... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 6813915}], "runningtime": "7737.80"} | trwiki_p |
Award | null | select page.page_title,linter.linter_id, linter.linter_params
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=0 and linter_cat<>2 and page.page_title like '%Award%'
and page.page_id in (
select page.page_id
from linter
join page on page.page_id = linter.linter_page
where pag... | {"resultsets": [{"headers": ["rev_actor"], "rowcount": 3895}], "runningtime": "1053.33"} | enwiki |
enwiki: Redirect-class pages that aren't redirects | null | SELECT DISTINCT mainpage.page_title
FROM categorylinks outercat
INNER JOIN page outerpage ON outerpage.page_id = outercat.cl_from
INNER JOIN categorylinks innercat ON outerpage.page_title = innercat.cl_to
INNER JOIN page talkpage ON talkpage.page_id = innercat.cl_from
INNER JOIN page mainpage ON mainpage.page_title = t... | {"resultsets": [{"headers": ["user", "cnt"], "rowcount": 0}], "runningtime": "0.05"} | enwiki_p |
test3 | null | select ipb_id, ipb_address, ipb_user, ipb_auto,
ipb_expiry - ipb_timestamp,
ipb_expiry, ipb_timestamp
from ipblocks
where 1=1
and ipb_expiry != 'infinity'
and (ipb_expiry - ipb_timestamp) > 10000000000
and ipb_expiry > '20220523000000'
order by (ipb_expiry - ipb_timestamp) desc
limit 100 | {"resultsets": [{"headers": ["username", "actions"], "rowcount": 1}], "runningtime": "0.30"} | enwiki_p |
RedWarn users | Redwarn quarry rerun | USE enwiki_p;
SELECT
actor_name as `Username`,
user_editcount as `Edit count`,
user_registration as `Registration date`,
NOT(ug_group IS NULL) as `30/500`,
COUNT(*) as `RedWarn edits`,
COUNT(*)/user_editcount*100 as `RedWarn %`,
ipb_sitewide as `Currently blocked`
FROM revision_userindex
... | {"resultsets": [{"headers": ["ir_ipb_id", "ir_type", "ir_value"], "rowcount": 25}], "runningtime": "0.09"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.