title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"runningtime": "0.26", "resultsets": [{"rowcount": 152, "headers": ["page_title"]}]} | enwiki |
Bnwiki lb | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lbn", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='bnwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.23", "resultsets": [{"rowcount": 130, "headers": ["page_title"]}]} | wikidatawiki |
Wikidata items created by a set of accounts | null | SELECT actor_name as Username,
COUNT(actor_name) AS cnt
FROM
page JOIN revision_userindex ON page_id=rev_page JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_parent_id=0
AND page_namespace=0
AND actor_name in ("AliciaFagervingWMSE-bot",
"Alicia Fagerving (WMSE)",
... | {"runningtime": "3.23", "resultsets": [{"rowcount": 1, "headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}]} | wikidatawiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "19.41", "resultsets": [{"headers": ["user", "review_cnt"], "rowcount": 310}]} | commonswiki_p |
enwiki: G13 drafts | English Wikipedia drafts eligible for speedy deletion under [[WP:G13]] | select concat('Draft:', page_title) Draft
from page p
left join
revision r
on p.page_latest = r.rev_id
where page_namespace = 118
and page_is_redirect = 0
and not exists (select 1 from templatelinks where tl_from = p.page_id and tl_namespace = 10 and tl_title = 'Promising_draft')
and not exis... | {"runningtime": "148.14", "resultsets": [{"rowcount": 2037, "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", "pl_from", "pl_namespace", "pl_tit... | enwiki |
matched_users_1 | null | SELECT potentially_matched.user_id, potentially_matched.user_registration, potentially_matched.user_editcount, COUNT(*) FROM (SELECT user.user_id, user.user_registration, user.user_editcount, user_former_groups.ufg_group FROM user right join user_former_groups on user.user_id = user_former_groups.ufg_user where ABS(use... | {"runningtime": "1.05", "resultsets": [{"rowcount": 692, "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"]}]} | enwiki_p |
matched_users_2 | null | SELECT potentially_matched.user_id, potentially_matched.user_registration, potentially_matched.user_editcount FROM (SELECT * FROM (SELECT * FROM user where ABS(user_registration - 20080303082424) < 180 * 24 * 60 * 60) AS r1 JOIN (SELECT CEIL(RAND() *(SELECT MAX(r3.user_id) FROM (SELECT * FROM user where ABS(user_regist... | {"runningtime": "1.03", "resultsets": [{"rowcount": 625, "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"]}]} | enwiki_p |
Category:AfC G13 eligible soon submissions clone | null | SELECT DISTINCT page_namespace, concat(if(page_namespace=118, "[[Draft:", "[[User_talk:"),page_title,"]]") as page_link, rev_timestamp
FROM page
JOIN revision ON rev_id = page_latest
JOIN templatelinks ON tl_from = page_id
WHERE page_namespace IN (2, 118)
AND tl_title = "AfC_submission"
AND tl_namespace = 10
AND page... | {"runningtime": "0.31", "resultsets": [{"headers": ["actor_name", "rc_timestamp", "rc_namespace", "rc_title", "rc_comment_id", "rc_new_len", "rc_deleted"], "rowcount": 0}]} | enwiki |
enwiki title of Q | null | use wikidatawiki_p;
SELECT ips_item_id, ips_site_page
from wb_items_per_site, sites
WHERE ips_site_id = "enwiki"
AND ips_site_id = site_global_key
AND ips_item_id in (
18696,
42621,
132666,
188419,
382441,
499210,
589072,
591450,
796140,
1133903,
1200566,
1320143,
1434121,
1570264,
1853154,
2475989,
2570409,
6921783,... | {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]} | wikidatawiki_p |
count globalimagelinks | count global imagelinks | -- database layout: https://www.mediawiki.org/wiki/Manual:Page_table
SELECT p.page_title as Title, count(p.page_id) as cnt
FROM globalimagelinks AS g
RIGHT JOIN page AS p ON p.page_title = g.gil_to
INNER JOIN categorylinks as c ON c.cl_from = p.page_id
WHERE cl_to = 'Images_from_the_German_Federal_Archive' AND p.page_i... | {"runningtime": "0.07", "resultsets": [{"rowcount": 1, "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", "pp_page", "pp_propname", "pp_value", "... | commonswiki_p |
Create user account | Anlage von Benutzerkonten in einem bestimmten Zeitraum | SELECT *
FROM logging as l
WHERE l.log_type = 'newusers'
AND l.log_action = 'create'
AND l.log_timestamp >'20200101090000'
AND l.log_timestamp <'20200101100000'
LIMIT 10 | {"connection_id": 11861449} | dewiki_p |
proofread-fathima- | 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... | {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["page_title", "page_namespace"]}]} | tawikisource |
Pages in viwiki by title length | Pages in viwiki by title length | USE viwiki_p;
SELECT
page_title AS title,
LENGTH(page_title) AS title_length
FROM page
WHERE page_namespace = 0 -- Chỉ tính không gian chính
AND page_is_redirect = 0 -- Không tính trang đổi hướng
-- Xếp theo thứ tự từ lớn đến nhỏ theo kích cỡ
ORDER BY title_length DESC
-- Hạn chế số lượng kết quả.
-- Điều chỉ... | {"runningtime": "69.18", "resultsets": [{"rowcount": 12, "headers": ["user_name", "rc_this_oldid", "comment_text"]}]} | viwiki_p |
Most edited pages | Most-edited pages | USE viwiki_p;
SELECT
page.page_namespace AS namespace,
revision.rev_page AS page,
page.page_title AS title,
COUNT(revision.rev_id) AS edits
FROM revision LEFT JOIN page ON (revision.rev_page = page.page_id)
WHERE page.page_namespace = 0 -- Chỉ tính không gian chính
GROUP BY page, rev_page
ORDER BY edits DESC
-... | {"runningtime": "6.32", "resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 787}]} | viwiki_p |
Oldest last-edited pages | Pages with the oldest last-edited timestamp, excluding disambiguation and redirects. | USE viwiki_p;
SELECT
page.page_namespace AS namespace,
revision.rev_page AS page,
page.page_title AS title,
MAX(revision.rev_timestamp) AS latest_edit
FROM page LEFT JOIN revision ON (revision.rev_page = page.page_id)
WHERE page.page_namespace = 0 -- Chỉ tính không gian chính
AND page.page_is_redirect = 0 -- K... | {"runningtime": "30.28", "resultsets": [{"rowcount": 100, "headers": ["\u0627\u0644\u0645\u0631\u0643\u0632", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0639\u062f\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a"]}]} | viwiki_p |
Most popular external links | Sites that has the most links. | USE viwiki_p;
SELECT
page.page_namespace AS namespace,
revision.rev_page AS page,
page.page_title AS title,
MAX(revision.rev_timestamp) AS latest_edit
FROM revision LEFT JOIN page ON (revision.rev_page = page.page_id)
WHERE page.page_namespace = 0 -- Chỉ tính không gian chính
AND page.page_is_redirect = 0 -- K... | {"runningtime": "13.12", "resultsets": [{"rowcount": 10, "headers": ["CONCAT(actor_name)", "COUNT(*)"]}]} | viwiki_p |
Most popular categories | Sites that has the most links. | USE viwiki_p;
SELECT
el_to,
COUNT(DISTINCT el_from) AS num_pages
FROM externallinks
GROUP BY el_to
ORDER BY num_pages DESC
-- Hạn chế số lượng kết quả.
-- Điều chỉnh số này để thêm hoặc bớt số bài.
LIMIT 100; | {"runningtime": "70.92", "resultsets": [{"rowcount": 24, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | viwiki_p |
Restorations in book/book talk namespaces | All undeletions, ever, in Book: and Book talk:.
For [[WP:VPT#Implementation of book namespace deletion]] circa 19 June 2021. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
CONCAT(CASE log_namespace WHEN 108 THEN 'Book:' ELSE 'Book talk:' END, log_title) AS pagename,
actor_name,
comment_text
FROM logging_logindex
LEFT JOIN actor_logging ON actor_id = log_actor
LEFT JOIN comment_logging ON comment_id ... | {"runningtime": "2.63", "resultsets": [{"rowcount": 50, "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", ... | enwiki |
Percentage of enwiki registered users currently blocked | indef and temporary sitewide blocks of registered users compared to number of registered users | SELECT
COUNT(ipb_id) as `total blocked`,
COUNT(*) as `total users`,
CONCAT(COUNT(ipb_id)/COUNT(*) * 100, "%") as `percent blocked`
FROM `user`
LEFT JOIN ipblocks
ON ipb_user = user_id
AND ipb_user != 0
AND ipb_sitewide = 1 | {"runningtime": "0.15", "resultsets": [{"rowcount": 50, "headers": ["comment_id"]}]} | enwiki_p |
WP:NPPSORT | null | SELECT page_title,
DATE_FORMAT(rev_timestamp, '%Y-%m-%d') AS creation_date,
page_latest,
page_len AS bytecount,
actor_name AS creator,
user_editcount AS creatorEdits,
(SELECT 1 from page afds
... | {"runningtime": "8.35", "resultsets": [{"rowcount": 3773, "headers": ["log_title", "COUNT(log_id)"]}]} | enwiki |
Query sandbox 3 | null | select count(*) from page
where page_namespace = 0 | {"runningtime": "0.03", "resultsets": []} | enwiki |
Most popular edit times | List of pages with the most number of editors | SELECT
DAYOFWEEK(rev_timestamp) AS dow,
HOUR(rev_timestamp) AS hour,
COUNT(rev_id) AS edits
FROM revision
GROUP BY dow, hour
ORDER BY dow ASC, hour ASC; | {"runningtime": "1.83", "resultsets": [{"rowcount": 1, "headers": ["page_title"]}]} | viwiki_p |
Redlinked redirects in category "Sidnamn med arabiska alfabetet" | Find redirects with red links in a specific category | SELECT
page_title AS "Page"
FROM page
JOIN pagelinks
ON pl_from = page_id
JOIN categorylinks
ON cl_from = pl_from
WHERE cl_to = "Robotskapade_Iranförgreningar"
AND pl_namespace = 0
AND page_id = 7295711
AND (
SELECT
COUNT(*)
FROM page
WHERE page_title = pl_title
AND page_namespace = 0) = 0
AND page_namespace ... | {"runningtime": "3.21", "resultsets": [{"rowcount": 9, "headers": ["pl_from", "pl_title"]}]} | svwiki |
Possibly using Wikipedia as webhost (sample) | List of pages in User and Usertalk namespaces that have only been edited by one user, where that editor has not edited mainspace at all | SELECT DISTINCT u.user_name AS user,
Concat(IF(p.page_namespace = 2, 'User:', 'Usertalk:'), p.page_title) AS page
FROM actor a,
page p,
user u
WHERE actor_user IS NOT NULL
AND NOT EXISTS (SELECT 1
FROM revision_userindex ru,
... | {"runningtime": "15.70", "resultsets": [{"rowcount": 1775, "headers": ["CONCAT(page_namespace, \":\", page_title)"]}]} | enwiki |
Page mover eligible users on fawiki | null | select
actor_name,
group_concat(distinct ug_group separator '|') as groups
from actor_revision
join user
on user_id = actor_user
join revision_userindex
on rev_actor = actor_id
left join user_groups
on actor_user = ug_user
and ug_group not in (
'extendedconfirmed',
'confirmed',
'reviewer',
'... | {"runningtime": "95.13", "resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 979}]} | fawiki_p |
bnwikisource active user list | null | USE bnwikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = bn.bnwikisource.org }}") 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 actor_user IS NOT NULL
AND page_namespace IN ('0','104'... | {"runningtime": "0.75", "resultsets": [{"rowcount": 251, "headers": ["page_title"]}]} | bnwikisource_p |
Articles created before 20040920 with <10 non-minor edits, without disambigs | null | SELECT page_title
from (
SELECT page_title,
(SELECT COUNT(*)
FROM revision
WHERE rev_page = page_id
AND rev_minor_edit = 0
LIMIT 10) AS count_edits
FROM page
JOIN revision on rev_page = page_id and ... | {"runningtime": "2.70", "resultsets": [{"rowcount": 1773, "headers": ["REGEXP_SUBSTR(el_to, 'Q[0-9]*')", "P18", "CONCAT(\"\\\"\", REPLACE(page_title, \"_\", \" \"), \"\\\"\")"]}]} | enwiki |
Non free media on bnwiki outside of article | null | USE bnwiki_p;
SELECT DISTINCT CONCAT('#[[:চিত্র:', p.page_title, ']]') AS title FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from
INNER JOIN (imagelinks i LEFT JOIN redirect r ON i.il_from = r.rd_from) ON p.page_title = i.il_to
WHERE c.cl_to = "সকল_অ-মুক্ত_মিডিয়া"
AND i.il_from_namespace != 0
AND r.rd_fr... | {"runningtime": "1.63", "resultsets": [{"rowcount": 264, "headers": ["page_title", "pl_title"]}]} | bnwiki |
Possibly using Wikipedia as webhost (sample) | List of pages in User and Usertalk namespaces that have only been edited by one user, where that editor has not edited mainspace at all | SELECT DISTINCT u.user_name AS user,
Concat(IF(p.page_namespace = 2, 'User:', 'Usertalk:'), p.page_title) AS page
FROM actor a,
page p,
user u,
revision_userindex rp
WHERE actor_user IS NOT NULL
AND NOT EXISTS (SELECT 1
FROM revision_userindex ru,
... | {"runningtime": "0.07", "resultsets": [{"rowcount": 1, "headers": ["max(wbpt_id)"]}]} | enwiki |
Image links from deleted drafts | null | select * from imagelinks il join archive a on a.ar_page_id=il.il_from and a.ar_namespace = il.il_from_namespace
where a.ar_namespace = 118
and not exists (select 1 from page p where p.page_title = a.ar_title and p.page_namespace = 118)
order by a.ar_page_id desc
limit 100 | {"runningtime": "1.09", "resultsets": [{"headers": ["actor_name", "count(rev_actor)"], "rowcount": 452}]} | enwiki |
Bronnen in commentaar nlwiki | null | select count(*) from comment where comment_text like 'bron%'; | {"runningtime": "0.04", "resultsets": [{"rowcount": 0, "headers": ["el_to"]}]} | nlwiki |
IP-Benutzerseiten als Weiterleitung | null | SELECT CONCAT('Benutzer:', page_title), rd_namespace, rd_title
FROM page, redirect
WHERE page_namespace = 2
AND page_is_redirect = 1
AND (page_title RLIKE "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"
OR page_title RLIKE "^([0-9a-fA-F]+\:+)+[0-9a-fA-F]$")
AND rd_from = page_id
AND (rd_namespace != 3 /* Weit... | {"runningtime": "0.07", "resultsets": [{"headers": ["SUBSTRING_INDEX(el_index, \"/\", -1)"], "rowcount": 10}]} | dewiki_p |
Uncategorized in-use files | null | SELECT CONCAT("File:", page_title), COUNT(*)
FROM page
JOIN templatelinks ON tl_from = page_id
JOIN globalimagelinks ON page_title = gil_to
WHERE
tl_title = "Uncategorized"
AND tl_namespace = 10
AND page_namespace = 6
GROUP BY page_id
ORDER BY COUNT(*) DESC | {"runningtime": "0.77", "resultsets": [{"rowcount": 50, "headers": ["page_title"]}]} | commonswiki_p |
count globalimagelinks | count global imagelinks | -- database layout: https://www.mediawiki.org/wiki/Manual:Page_table
SELECT p.page_title as Title, concat('https://commons.wikimedia.org/wiki/File:', p.page_title) as complete_link, count(p.page_id) as cnt
FROM globalimagelinks AS g
RIGHT JOIN page AS p ON p.page_title = g.gil_to
INNER JOIN categorylinks as c ON c.cl_f... | {"connection_id": 12981906} | commonswiki_p |
count globalimagelinks | count global imagelinks | -- database layout: https://www.mediawiki.org/wiki/Manual:Page_table
SELECT p.page_title as Title, concat('https://commons.wikimedia.org/wiki/File:', p.page_title) as complete_link, count(p.page_id) as cnt
FROM globalimagelinks AS g
RIGHT JOIN page AS p ON p.page_title = g.gil_to
INNER JOIN categorylinks as c ON c.cl_f... | {"runningtime": "30.46", "resultsets": [{"rowcount": 1093, "headers": ["page_namespace", "page_title"]}]} | commonswiki_p |
Tewiki:Organisations/companies without infoboxes | null | SELECT distinct page_title FROM page,categorylinks
where page_id not in (select tl_from from templatelinks
where tl_from_namespace =0
and tl_namespace =10
and (tl_title like "%సమాచారపెట్టె%" or tl_title like "%Infobox%"))
and page_id=cl_from
... | {"runningtime": "0.09", "resultsets": [{"rowcount": 5, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]} | tewiki |
test | null | #select count(cl_from), cl_to from categorylinks where cl_to like "Book:Pokémon/%" group by cl_to
select page_len, page_namespace, page_title, page_is_redirect from page where page_title like "COIBot/XWiki%" and page_id not in (select cl_from from categorylinks) | {"runningtime": "0.13", "resultsets": [{"rowcount": 50, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | metawiki |
{{uw-block}} transclusions in block summaries (enwiki) | Instances of admins using a template that transcludes {{uw-block}} | SELECT l.log_id, l.log_namespace, l.log_title, l.log_timestamp, c.comment_text
FROM logging l
INNER JOIN comment c
ON l.log_comment_id = c.comment_id
WHERE l.log_type = "block"
AND LOWER(c.comment_text) RLIKE ".*\\{\\{uw-(3|a(c?p|d)?|b(io|ot)|copryight|d(isrupt)?|e(f|w?p?)?|gw|h|ipevade|n(fimage|othere|p)|p... | {"runningtime": "2.88", "resultsets": [{"rowcount": 740, "headers": ["actor_name", "page_title", "comment_text"]}]} | enwiki_p |
Tewiki:History articles without Infobox | null | SELECT distinct page_title FROM page,categorylinks
where page_id not in (select tl_from from templatelinks
where tl_from_namespace =0
and tl_namespace =10
and (tl_title like "%సమాచారపెట్టె%" or tl_title like "%Infobox%"))
and page_id=cl_from
... | {"runningtime": "3.58", "resultsets": [{"rowcount": 1, "headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}]} | tewiki |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "1.40", "resultsets": [{"rowcount": 87, "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"]}]} | commonswiki_p |
Redirects created last month | null | SELECT
page_title
FROM page
WHERE page_is_redirect = 1 AND
page_namespace = 0 AND
page_touched > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m%d%H%i%s')
| {"runningtime": "123.46", "resultsets": [{"rowcount": 74718, "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_delet... | wikidatawiki |
' not redirecting to ʻ (enwiki) | null | SELECT page_title
FROM page p1
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_title LIKE "%ʻ%"
AND NOT EXISTS(
SELECT NULL
FROM redirect r
LEFT JOIN page p2 ON r.rd_from = p2.page_id
WHERE p2.page_namespace = 0
AND r.rd_title = p1.page_title
... | {"runningtime": "0.28", "resultsets": [{"rowcount": 118, "headers": ["page_namespace", "page_title"]}]} | enwiki_p |
Label/description/alias stats for [bpy] | 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": "0.78", "resultsets": [{"rowcount": 500, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]} | wikidatawiki_p |
Enwiki user count data | enwiki user analysis | SELECT user_name, user_registration, user_editcount from user LIMIT 455 ORDER BY user_editcount DESC; | {"runningtime": "0.16", "resultsets": [{"headers": ["page_namespace", "page_title", "pr_expiry"], "rowcount": 26}]} | eswiki |
Most edited pages | Most-edited pages | USE enwiki_p;
SELECT
page.page_namespace AS namespace,
revision.rev_page AS page,
page.page_title AS title,
COUNT(revision.rev_id) AS edits
FROM revision LEFT JOIN page ON (revision.rev_page = page.page_id)
WHERE page.page_namespace = 0 -- Chỉ tính không gian chính
GROUP BY page, rev_page
ORDER BY edits DESC
-... | {"runningtime": "0.11", "resultsets": [{"rowcount": 8, "headers": ["actor_name", "COUNT(*)"]}]} | enwiki_p |
Most recently created Swedish words in Swedish wiktionary | null | SELECT DISTINCT
REPLACE(page_title, '_', ' ') AS page
FROM page
JOIN categorylinks
ON cl_from = page_id
JOIN revision ON rev_page = page_id
WHERE cl_to = "English/Verb"
AND page_namespace = 0
ORDER BY rev_timestamp DESC
LIMIT 5000; | {"runningtime": "0.13", "resultsets": [{"rowcount": 8, "headers": ["actor_name", "COUNT(*)"]}]} | enwiktionary_p |
Users with most edits without bot (idwiki) | null | SELECT user_name, user_editcount
FROM user
WHERE user_editcount>9
and user_id not in (select ug_user from user_groups where ug_group = 'bot')
ORDER BY user_editcount desc
limit 500; | {"runningtime": "0.19", "resultsets": [{"rowcount": 3, "headers": ["actor_name", "COUNT(*)"]}]} | frwiki_p |
WLM UK Participants Who Haven't Participated in WLE UK | WSC-UK previous years' participants not active this year | 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_Monuments_2017_in_Ukra... | {"runningtime": "0.29", "resultsets": [{"rowcount": 9, "headers": ["actor_name", "COUNT(*)"]}]} | commonswiki_p |
Indef sysop protected articles | null | WITH items as (
SELECT page_title, log_timestamp, comment_text, actor_name
FROM page
JOIN page_restrictions ON page_id = pr_page
AND pr_type = 'edit'
AND pr_level = 'sysop'
AND pr_expiry = 'infinity'
LEFT JOIN logging_logindex ON log_namespace = page_namespace AND log_title = page_title
... | {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["ips_item_id", "ips_site_id", "ips_site_page"]}]} | enwiki |
Indef semi protected articles | null | WITH items as (
SELECT page_title, log_timestamp, comment_text, actor_name
FROM page
JOIN page_restrictions ON page_id = pr_page
AND pr_type = 'edit'
AND pr_level = 'autoconfirmed'
AND pr_expiry = 'infinity'
LEFT JOIN logging_logindex ON log_namespace = page_namespace AND log_title = page... | {"connection_id": 14954648} | enwiki |
Indef fully protected redirects | null | WITH items as (
SELECT page_title, actor_name, log_timestamp, comment_text
FROM page
JOIN page_restrictions ON page_id = pr_page
AND pr_type = 'edit'
AND pr_level = 'sysop'
AND pr_expiry = 'infinity'
LEFT JOIN logging_logindex ON log_namespace = page_namespace AND log_title = page_title
AND log_... | {"runningtime": "1.69", "resultsets": [{"rowcount": 1000, "headers": ["page_title"]}]} | enwiki |
Cross-namespace redirects | null | SELECT page.page_namespace, redirect.rd_namespace, page.page_title
FROM redirect
INNER JOIN page ON page.page_id = redirect.rd_from
WHERE page.page_namespace != redirect.rd_namespace
LIMIT 50 | {"runningtime": "0.08", "resultsets": [{"headers": ["el_to"], "rowcount": 0}]} | srwiki_p |
Cross-namespace redirects | null | SELECT page.page_namespace, redirect.rd_namespace, page.page_title
FROM redirect
INNER JOIN page ON page.page_id = redirect.rd_from
WHERE page.page_namespace != redirect.rd_namespace
LIMIT 50 | {"runningtime": "0.20", "resultsets": [{"rowcount": 100, "headers": ["el_to"]}]} | srwiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.10", "resultsets": [{"rowcount": 14, "headers": ["actor_name", "manual_accept_count"]}]} | commonswiki_p |
Cross-namespace redirects | null | SELECT page.page_namespace, redirect.rd_namespace, page.page_title
FROM redirect
INNER JOIN page ON page.page_id = redirect.rd_from
WHERE page.page_namespace != redirect.rd_namespace
LIMIT 100 | {"runningtime": "1.35", "resultsets": [{"headers": ["page_title"], "rowcount": 452}]} | ruwiki_p |
Rotlinks welche eventuell durch Blaulink mit Klammerlemma ersetzt werden können | Die Liste enthält Falsch-Positive, z.B. Rotlink Adam Bischof vs. Blaulink Adam (Bischof). Das erste ist ein Sportler, das zweite ein Bischof.
Ursprünglich 544 Stück. | SELECT CONCAT('Rotlink [[',
REPLACE(pl_title, '_', ' '),
']] in {{Benutzer:Wurgl/Unnötige Rotlinks/Edit|1=',
REPLACE(page_title, '_', ' '),
'|2=Rotlink%20durch%20Blaulink%20ersetzt|3=',
REPLACE(pl_title, '_', '%20'),
'|4=',
... | {"runningtime": "1.85", "resultsets": [{"rowcount": 510, "headers": ["actor_name", "COUNT(*)"]}]} | dewiki_p |
Get All בוט_חוקים | Get All בוט_חוקים | use hewikisource_p;
select p.page_title as title from page p
join categorylinks cat on cat.cl_from = p.page_id where cat.cl_to="בוט_חוקים"
| {"runningtime": "11.80", "resultsets": [{"headers": ["page_title", "edits"], "rowcount": 10}]} | hewikisource_p |
Some disambig pages in enwiki | null | SELECT * FROM page
JOIN page_props ON page_id = pp_page
WHERE pp_propname = "disambiguation"
AND LENGTH(page_title) = 3 | {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"]}]} | enwiki_p |
list | null | USE enwiki_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = bn.bnwikisource.org }}") 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 actor_user IS NOT NULL
AND page_namespace IN ('0','1','2','3'... | {"runningtime": "0.94", "resultsets": [{"rowcount": 537, "headers": ["page_id", "page_namespace"]}]} | enwiki_p |
Free files on enwiki with hidden versions | null | SELECT CONCAT("File:", oi_name)
FROM oldimage
JOIN page ON page_title = oi_name AND page_namespace = 6
JOIN categorylinks ON cl_from = page_id
WHERE
oi_deleted & 1 -- deleted file content
AND cl_to = "All_free_media"
Group by oi_name | {"runningtime": "1.40", "resultsets": [{"rowcount": 1, "headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"]}]} | enwiki_p |
Count orphaned User talk: pages | null | SET STATEMENT max_statement_time = 1000 FOR
SELECT CASE
WHEN Pt.page_title REGEXP "/[Aa]rchive" THEN "Archive"
WHEN Pt.page_title REGEXP "/[Ss]andbox" THEN "Sandbox"
WHEN Pt.page_title REGEXP "/talk_page_tutorial" THEN "Tutorial"
WHEN Pt.page_title REGEXP "/TWA(/.*)?$" THEN "TWA"
WHEN Pt.page_title REGEXP "/[12][9... | {"runningtime": "1.25", "resultsets": [{"rowcount": 1, "headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"]}]} | enwiki_p |
Articles linking to a given external link on plwiki | null | SELECT page_title, el_to
FROM page
JOIN externallinks
ON page_id = el_from
WHERE page_namespace = 0
GROUP BY page_title
ORDER BY page_title;
SELECT CONCAT('# ',el_to) as el_to#, COUNT(*) AS counting
FROM page
JOIN externallinks
ON page_id = el_from
WHERE page_namespace = 0
GROUP BY el_to
ORDER BY el_to | {"runningtime": "397.89", "resultsets": [{"rowcount": 55, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lbn", "CONCAT('\"',ips_site_page,'\"')"]}]} | enwiki_p |
Files in both free and non-free categories | null | select *
from page
where
page_namespace = 6 -- file
and page_id in (
select page_id
from page
join categorylinks
on page_id = cl_from
and cl_to = 'محتویات_آزاد'
)
and page_id in (
select page_id
from page
join categorylinks
on page_id = cl_from
and cl_to = 'محتویا... | {"runningtime": "0.72", "resultsets": [{"rowcount": 1, "headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"]}]} | fawiki_p |
Days that there was no RfD (enwiki) | null | SELECT page_title
FROM page
WHERE page_namespace = 4
AND page_title LIKE "Redirects_for_discussion/Log/_%"
AND page_len < 600
ORDER BY page_id DESC
LIMIT 20 | {"runningtime": "70.95", "resultsets": [{"rowcount": 63, "headers": ["ctd_name", "antal"]}]} | enwiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["user_name"]}]} | commonswiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"connection_id": 13928013} | commonswiki_p |
fawiki GFDL files by upload date in cat | null | #USE jawiki_p;
SELECT CONCAT("File:", page_title) as File, img_timestamp, actor_name
FROM templatelinks
JOIN page ON tl_from = page_id
JOIN image ON img_name = page_title AND page_namespace = 6
JOIN actor_image ON img_actor = actor_id
JOIN categorylinks
ON cl_from = page_id
AND cl_type = "file"
AND cl_to = "نامزدهای_ا... | {"runningtime": "0.11", "resultsets": [{"rowcount": 35, "headers": ["CONCAT('[[User:', page_title, ']]')"]}]} | fawiki_p |
No-hard-code cat query | null | SELECT *
FROM categorylinks
JOIN page ON cl_from = page_id
LEFT JOIN templatelinks ON tl_from = page_id AND tl_title = 'X9' AND tl_namespace = 10
WHERE cl_to = 'X9'
AND page_namespace != 14
AND page_title != 'X9'
AND tl_from IS NULL | {"runningtime": "0.42", "resultsets": [{"rowcount": 189, "headers": ["page_title", "rev_timestamp"]}]} | enwiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.15", "resultsets": [{"rowcount": 42, "headers": ["page_title", "rev_timestamp", "MIN(created.rev_timestamp)"]}]} | commonswiki_p |
Tewiki:pages without images | null | SELECT page_title
FROM page p, categorylinks
WHERE
cl_from=page_id
and not exists (select il_from
from imagelinks
where il_from = p.page_id
)
and page_namespace=0
and page_is_redirect=0
and page_id not in (select pp_page from page_props where pp_propn... | {"runningtime": "0.15", "resultsets": [{"rowcount": 18, "headers": ["cl_from", "cl_to", "page_id"]}]} | tewiki |
Number of links to WP:HotCat | null | select count(*) from pagelinks
where pl_namespace = 4
and pl_title = 'HC';
| {"runningtime": "8.82", "resultsets": [{"headers": ["pl_title", "page_id", "rev_timestamp", "pp_value"], "rowcount": 19}]} | enwiki_p |
___ <sport> Team redirects (enwiki) | null | SELECT page_title, rd_title
FROM page
RIGHT JOIN redirect ON page_id = rd_from
WHERE page_namespace = 0
AND page_is_redirect = 1
/* Goal is to match things along the lines of "San Francisco Basketball Team". Excludes prefixes that often come before
teams that *do* have "team" in the name, as well as any... | {"runningtime": "0.48", "resultsets": [{"rowcount": 47, "headers": ["page_title", "rev_timestamp", "MIN(created.rev_timestamp)", "COUNT(DISTINCT(actor.actor_name))"]}]} | enwiki_p |
Files in neither free nor non-free category | null | select *
from page
where
page_namespace = 6 -- file
and page_id not in (
select page_id
from page
join categorylinks
on page_id = cl_from
and cl_to in (
'محتویات_آزاد',
'محتویات_غیر_آزاد'
)
)
and page_is_redirect = 0 | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | fawiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.13", "resultsets": [{"headers": ["pr_page_id", "pr_count", "pr_q0", "pr_q1", "pr_q2", "pr_q3", "pr_q4", "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_mode... | commonswiki_p |
Unvollständige Klammerlemmata | null | SELECT page_title AS Artikel, REPLACE(pl_title, '_', ' ') AS Rotlink
FROM page, pagelinks
WHERE pl_from = page_id
AND page_namespace = 0
AND pl_namespace = 0
AND (pl_title like "%()" OR pl_title like "%(\_)" OR pl_title LIKE "%(%,)%" OR pl_title LIKE "%(%,\_)%")
AND NOT EXISTS (SELECT 1
... | {"runningtime": "4.47", "resultsets": [{"headers": ["user_id", "user_name", "user_real_name"], "rowcount": 200}]} | dewiki_p |
IDWIKI Recent Edits | null | select
CONCAT(substr(rc_timestamp,1,4),"-",substr(rc_timestamp,5,2), "-",substr(rc_timestamp,7,2)," ",substr(rc_timestamp,9,2)+7,":",substr(rc_timestamp,11,2)) as 'Timestamp',
actor_name,
rc_title,
cast(rc_new_len as int) - cast(rc_old_len as int) as 'total diff',
CONCAT('https://id.wikipedia.org/w/index.php?title=',r... | {"runningtime": "4.49", "resultsets": [{"rowcount": 200, "headers": ["user_id", "user_name", "DATE_FORMAT(user_registration,\"%Y\")"]}]} | idwiki |
Get nlwiki page schema | null | DESCRIBE plwiki_p.externallinks; | {"runningtime": "4.05", "resultsets": [{"rowcount": 1, "headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}]} | plwiki |
অসমীয়া লেবেল | অসমীয়া লেবেল | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lar", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='aswiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.07", "resultsets": [{"rowcount": 1, "headers": ["page_title", "page_is_redirect", "page_len"]}]} | wikidatawiki_p |
bpy lebel | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lar", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='bpywiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl... | {"runningtime": "0.08", "resultsets": [{"headers": ["page_title", "page_is_redirect", "page_len", "pp_propname"], "rowcount": 1}]} | wikidatawiki_p |
হিন্দি লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lhi", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='hiwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.10", "resultsets": [{"rowcount": 10, "headers": ["page_title", "page_is_redirect", "page_len", "pp_value"]}]} | wikidatawiki_p |
উর্দু লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lur", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='urwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.88", "resultsets": [{"rowcount": 263, "headers": ["page_title", "page_is_redirect", "page_len", "pp_value"]}]} | wikidatawiki_p |
groups | 198.207.223.xxx | SET statement max_statement_time = 3 for
select ug_group from user, user_groups
where ug_user = user_id
and user_name = 'DGG'
limit 10; | {"runningtime": "118.34", "resultsets": [{"headers": ["pages", "date"], "rowcount": 372}]} | enwiki_p |
various wikis trials | null | use wikidatawiki;
select *
from wb_property_info
limit 1; | {"runningtime": "27.08", "resultsets": [{"rowcount": 9158, "headers": ["concat(\"Category:\",page_title)", "page_len"]}]} | wikidatawiki |
F10 speedies | Deletions of pages in the Template: namespace containing "T2" (as a distinct word) in the log comment.
For [[WT:CSD#RfC: Removing T2]] circa 16 June 2020. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
log_title AS pagename,
comment_text
FROM logging
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_namespace = 6
AND comment_text RLIKE '\\bF10\\b'
ORDER BY log_id DESC
... | {"runningtime": "1.40", "resultsets": [{"rowcount": 21, "headers": ["actor_name", "deletions"]}]} | enwiki |
F3 speedies | Deletions of pages in the Template: namespace containing "F3" (as a distinct word) in the log comment. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
log_title AS pagename,
comment_text
FROM logging
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_namespace = 6
AND comment_text RLIKE '\\bF3\\b'
ORDER BY log_id DESC
L... | {"runningtime": "0.08", "resultsets": [{"rowcount": 2, "headers": ["log_title", "COUNT(*)"]}]} | enwiki |
proofread-fathima-வெற்றிக்கு எட்டு வழிகள் | 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... | {"runningtime": "1.04", "resultsets": [{"rowcount": 234, "headers": ["page_title", "rd_namespace", "rd_title", "pagelinks"]}, {"rowcount": 0, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest",... | tawikisource |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.13", "resultsets": [{"headers": ["user_name", "TIMESTAMP(user_registration)", "(UNIX_TIMESTAMP(user_registration) - UNIX_TIMESTAMP(\"20210401070000\"))/3600/24/30"], "rowcount": 31}]} | commonswiki_p |
Articles without images | null | SELECT page_namespace, page_title FROM page
LEFT JOIN imagelinks on il_from = page_id
WHERE il_from IS NULL
AND page_namespace = 0
AND page_is_redirect = 0
LIMIT 2000 | {"runningtime": "686.50", "resultsets": [{"rowcount": 533, "headers": ["CONCAT(\"Q\",ips_item_id)", "Lbn", "CONCAT('\"',ips_site_page,'\"')"]}]} | enwiki |
test | null | select page.page_title,page.page_id,revision.rev_page ,revision.rev_timestamp from pagelinks
inner join page
on page.page_id = pagelinks.pl_from
inner join revision
on page.page_id = revision.rev_page
where pagelinks.pl_title="ألعاب_فيديو" and pagelinks.pl_from_namespace=0 and pagelinks.pl_namespace = 100
order by re... | {"runningtime": "6652.04", "resultsets": [{"rowcount": 40, "headers": ["dp_title", "lp_title"]}]} | arwiki |
Articles without images | null | SELECT page_namespace, page_title FROM page
LEFT JOIN imagelinks on il_from = page_id
WHERE il_from IS NULL
AND page_namespace = 0
AND page_is_redirect = 0
LIMIT 2000 | {"runningtime": "1.17", "resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 34}]} | ckbwiki |
Articles without images | null | SELECT page_namespace, page_title FROM page
LEFT JOIN imagelinks on il_from = page_id
WHERE il_from IS NULL
AND page_namespace = 0
AND page_is_redirect = 0
LIMIT 2000 | {"runningtime": "0.05", "resultsets": [{"rowcount": 0, "headers": ["page_id"]}]} | bnwiki |
de লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lde", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='dewiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.03", "resultsets": []} | wikidatawiki_p |
Show enwiki tables | null | SHOW TABLES FROM enwiki_p; | {"runningtime": "0.03", "resultsets": []} | enwiki_p |
Replica query effectiveness (page revision actors) | null | USE enwiki_p;
SELECT * FROM revision_userindex WHERE rev_page = 18382391 AND rev_timestamp >= "20210624000000" ORDER BY rev_id DESC LIMIT 200 | {"runningtime": "0.48", "resultsets": [{"headers": ["page_title", "cl_to", "cl_from", "cl_type", "ll_lang", "ll_title", "rd_title"], "rowcount": 10}]} | enwiki_p |
enwikt mnw: link | A query for extracting mnw: links based on enwiktionary.
| use enwiktionary_p;
select page_title, group_concat(pl_title) from pagelinks
inner join page
on
page_id = pl_from
where
page_namespace=0 and pl_title REGEXP "^mnw:"
group by page_title | {"runningtime": "0.25", "resultsets": [{"rowcount": 42, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 8, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 13, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | enwiktionary_p |
enwikt mnw: link | A query for extracting mnw: links based on enwiktionary.
| use enwiktionary_p;
select page_title, group_concat(pl_title) from pagelinks
inner join page
on
page_id = pl_from
where
page_namespace=0 and pl_title REGEXP "^mnw:"
group by page_title | {"runningtime": "0.26", "resultsets": [{"rowcount": 42, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 8, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 13, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | enwiktionary_p |
Articles without image | null | SELECT concat('[[', page_title, ']]') FROM page
LEFT JOIN imagelinks on il_from = page_id
WHERE il_from IS NULL
AND page_namespace = 0
AND page_is_redirect = 0
LIMIT 2000 | {"runningtime": "0.50", "resultsets": [{"headers": ["prefix", "count"], "rowcount": 296}]} | bnwiki |
locksuppressed | null | select * from user where user_name = 'Barbaro Reyes Cho'; | {"runningtime": "25.75", "resultsets": [{"rowcount": 4, "headers": ["user_name", "rc_this_oldid", "comment_text"]}]} | enwiki_p |
By Language Query Wikidata | null | USE wikidatawiki_p;
DESCRIBE wb_terms;
SELECT COUNT(*) FROM wb_terms
WHERE term_type = 'label' AND term_language = "de"; | {"runningtime": "0.28", "resultsets": [{"rowcount": 76, "headers": ["edit_month", "edit_count"]}]} | wikide |
nlwiki Articles without filelinks | null | SELECT COUNT(*)
FROM page
WHERE
page_namespace=0 AND
page_is_redirect=0 AND
NOT EXISTS (SELECT * FROM imagelinks WHERE il_from_namespace=0 AND page_id=il_from) AND
NOT EXISTS (SELECT * FROM page_props WHERE page_id=pp_page AND pp_propname='disambiguation')
| {"runningtime": "0.06", "resultsets": [{"headers": ["\u0627\u0644\u0645\u0642\u0627\u0644\u0629", "\u062d\u062c\u0645 \u0627\u0644\u0645\u0642\u0627\u0644\u0629", "\u062a\u0642\u064a\u064a\u0645 \u0627\u0644\u062c\u0648\u062f\u0629"], "rowcount": 0}]} | nlwiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.