title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
actor user | null | USE enwiki_p;
select actor_id, actor_user as user_id
from actor
where actor_id between 23000000 and 25000000
# MAX:
# 219981645
# 1004927 and 7576023
# 10567094 and 35988602
# 119077847 and 208837721
# 209870110 and 219555606
# 219592159 and 219981645
# 10567094 and 205647155
/*
select user_id, actor_id
from ac... | {"resultsets": [{"headers": ["page_title"], "rowcount": 40139}], "runningtime": "71.59"} | enwiki |
مقالات بلا قالب معلومات | null | select
page.page_title
from page
where page_namespace = 0
and page_is_redirect = 0
and page_id not in (select cl_from from categorylinks where cl_to = 'مقالات_تستعمل_قوالب_معلومات' or cl_to= 'جميع_صفحات_التوضيح'
or cl_to= 'صفحات_مجموعات_صيغ_كيميائية_مفهرسة'
or cl_to like '... | {"resultsets": [{"headers": ["page_title"], "rowcount": 21}], "runningtime": "15.27"} | arwiki_p |
مقالات بلا قالب معلومات | null | select
page.page_title
from page
where page_namespace = 0
and page_is_redirect = 0
and page_id not in (select cl_from from categorylinks where cl_to = 'مقالات_تستعمل_قوالب_معلومات' or cl_to= 'جميع_صفحات_التوضيح'
or cl_to= 'صفحات_مجموعات_صيغ_كيميائية_مفهرسة'
or cl_to like '... | {"resultsets": [{"headers": ["cat", "pages", "subcats", "files", "total"], "rowcount": 50}], "runningtime": "0.13"} | arwiki_p |
Tidy font link bug on Wikipedia namespace | null | select /* CONCAT('*[[Wikipedia:', page_title, ']]') as page_title */
/* , count(*) as page_count*/
CONCAT('*[//en.wikipedia.org/w/index.php?title=Wikipedia:', page_title, '&action=edit&lintedit=true Wikipedia:', page_title, ']') as page_title
from linter
join page on page.page_id = linter.linter_page
where page.page_n... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 2330}], "runningtime": "20.01"} | enwiki |
Current admins and their admin edits(yearwise) | Admins (as of now) and their activity in the specified year in non main and file namespaces to understand the admin category action activity
| SELECT
LEFT(rev_timestamp,4) as year,
user_name,
COUNT(*) as admin_edits
FROM revision
JOIN page ON revision.rev_page = page.page_id
JOIN actor
ON rev_actor=actor_id
JOIN user
ON user_id =actor_user
WHERE
page_namespace NOT IN (0,6)
AND REPLACE(user_name," ","_") in (
Select page... | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 181}], "runningtime": "148.72"} | tewiki_p |
Current admins and their logged edits (yearwise) | Admins (as of now) and their logged action in the specified year logged action to understand the admin category action activity
| SELECT
LEFT(log_timestamp,4) as year,
user_name,
COUNT(*) as admin_edits
FROM logging
JOIN actor
ON log_actor=actor_id
JOIN user
ON user_id =actor_user
WHERE
REPLACE(user_name," ","_") in (
Select page_title
FROM page
join categorylinks ON cl_from=page_id AND cl_type="page"
... | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 9}], "runningtime": "1.25"} | tewiki_p |
IPv6 /64 subnets w/most edits | IPv6 addresses with the most live edits to enwiki, grouped by /64 subnets. While this is the usual size of a block of addresses assigned to an individual (see e.g. [[WP:/64]]), those with the highest edit counts are likely widely dynamic.
For [[WP:VPM#Interesting question about edit counts]] circa 27 June 2022. (The... | SELECT COUNT(*), CONCAT(SUBSTRING_INDEX(actor_name, ':', 4), '::/64') AS subnet
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE actor_user IS NULL
AND actor_name LIKE '%:%'
GROUP BY subnet
HAVING COUNT(*) >= 5000
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["loguser", "log_timestamp", "timestamp_human", "log_title", "edituser", "rev_timestamp", "rev_id", "isAnoniem"], "rowcount": 1}], "runningtime": "0.29"} | enwiki_p |
All edits in ukwiki main namespace in certain period | null | SELECT REPLACE(P.page_title,'_',' ') AS title, COUNT(1) AS edits, R.rev_timestamp AS timestamp
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P ON R.rev_page=P.page_id
WHERE R.rev_timestamp > 20220628100000
AND P.page_namespace = 0
GROUP BY P.page_title
HAVING edits >= 2
ORDER BY edits DESC, R.rev_timestamp DESC | {"connection_id": 2222246} | ukwiki_p |
Count transclusions of templates in [[Category:Single artwork templates]] | null | USE commonswiki_p;
select page_title, page_namespace, count(*) as tot
from page
join templatelinks t1 on page_title = t1.tl_title and page_namespace = t1.tl_namespace
INNER JOIN categorylinks c2 on page_id = c2.cl_from AND c2.cl_to = "Single_artwork_templates"
#AND page_namespace = 14
group by page_id
order by tot , ... | {"resultsets": [{"headers": ["blocks", "actor_name"], "rowcount": 188}], "runningtime": "29.46"} | commonswiki_p |
Edit activitity of main namespace page links from a page | Identify top editors of a page and its internal links to main namespace. Helps in strengthening the team contributing to a prominent article and its links | SELECT
CONCAT("[[User:",user_name,"|",user_name,"]]") as userlink,
COUNT(*) as edits,
MAX(LEFT(rev_timestamp,8)) as latest_edit_date
FROM revision
JOIN page ON revision.rev_page = page.page_id
JOIN actor
ON revision.rev_actor=actor_id
JOIN user
ON user_id =actor_user
WHERE LEFT(rev_timestamp,8) >=... | {"resultsets": [{"headers": ["blocks", "actor_name"], "rowcount": 189}], "runningtime": "20.62"} | tewiki_p |
Edit activitity of main namespace page links from a page | Identify active page edits(>4) and its internal links to main namespace. Helps in strengthening the team contributing to a prominent article and its links | SELECT
CONCAT("[[",REPLACE(page_title,"_"," "),"]]") as acitve_page,
COUNT(*) as edits,
MAX(LEFT(rev_timestamp,8)) as latest_edit_date
FROM revision
JOIN page ON revision.rev_page = page.page_id
JOIN actor
ON revision.rev_actor=actor_id
JOIN user
ON user_id =actor_user
WHERE LEFT(rev_timestamp,8) ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "0.09"} | tewiki_p |
List of links to lesjours.fr in fr.wikipedia.org | This query looks at all links to lesjours.fr in the French wikipedia. | USE frwiki_p;
SELECT page_id, page_title, el_to
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE '%lesjours.fr%' | {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 107}], "runningtime": "0.18"} | frwiki_p |
enwiki proxy/webhost blocks | null | SELECT
ipb_address,
comment_text
FROM
comment_ipblocks
INNER JOIN ipblocks ON ipblocks.ipb_reason_id = comment_ipblocks.comment_id
WHERE
ipb_user = 0
AND (
comment_text LIKE '%open prox%'
OR comment_text LIKE '%webhost%'
) | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.12"} | enwiki_p |
Global proxy/webhost blocks | null | SELECT
gb_address,
gb_reason
FROM
globalblocks
WHERE
gb_reason LIKE '%open prox%'
OR gb_reason LIKE '%webhost%' | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type", "rc_log_acti... | centralauth_p |
Files with incorrect suffix | null | SELECT img_major_mime, img_minor_mime, img_name
FROM image
WHERE CONCAT(img_major_mime, "/", img_minor_mime, ".", LOWER(CONVERT(SUBSTRING_INDEX(img_name, '.', -1) USING latin1))) NOT IN (
"image/x-xcf.xcf", "image/x-bmp.bmp", "image/webp.webp", "image/tiff.tiff", "image/tiff.tif", "image/gif.gif", "image/png.png", "im... | {"connection_id": 9946710} | afwiki_p |
mw-undo | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-undo')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_update... | bnwiki |
WSta கனிச்சாறு6 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["page_title"], "rowcount": 89}], "runningtime": "3.50"} | tawikisource_p |
RightsHistory | null | SELECT log_action, log_timestamp, log_actor, log_title, log_params, log_deleted, log_page, log_id, log_comment_id,
comment.comment_text, comment.comment_data, comment.comment_id
FROM logging
JOIN comment
ON log_comment_id = comment.comment_id
WHERE log_action = 'rights'; | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 3}], "runningtime": "71.14"} | enwiki |
List of links to mediapart.fr in fr.wikipedia.org | This query looks at all links to Mediapart in the French wikipedia. | USE frwiki_p;
SELECT page_id, page_title, el_to
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE '%mediapart.fr/%' | {"resultsets": [{"headers": ["MID", "P921", "QID", "CONCAT(\"File:\",page_title)"], "rowcount": 30}], "runningtime": "0.11"} | frwiki_p |
Talk pages for nonexistent users (excluding IPs) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
user_talk_pages AS (
SELECT page_title FROM page
WHERE page_namespace = 3
AND NOT is_ipv4(page_title)
AND NOT is_ipv6(page_title)
)
SELECT page_title, log_timestamp
FROM user_talk_pages LEFT JOIN new_users ON (page... | {"resultsets": [{"headers": ["rev_id", "page_namespace", "page_title"], "rowcount": 51346}], "runningtime": "54.00"} | bpywiki_p |
Templates used on a specified page with subquery | null | SELECT tl_title,tl_from_namespace from templatelinks
where tl_from= (select page_id from page
where page_title='The_Story_of_Bensurdatu' and page_namespace=0) | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 15}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 5}, {"headers": ["rc_namespace", "rc_... | enwiki |
Pages in an ATU category tagged for notability | null | SELECT page_title,page_id, cl_to,tl_title
FROM categorylinks
LEFT JOIN page ON (cl_from = page_id)
left join templatelinks on (cl_from=tl_from)
WHERE cl_to like "ATU%" and tl_title="Notability"
| {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 50}], "runningtime": "0.98"} | enwiki |
Scrape Wikidata Item IDs from files in Category:Artworks_missing_digital_representation_of_for_2D_work | null | use commonswiki_p;
SELECT concat("M",page_id) AS MID, 'P6243',
REPLACE(el_to,'https://reasonator.toolforge.org/test/?q=','') AS QID#, CONCAT("File:",page_title)
FROM page
JOIN externallinks ON page_id=el_from AND el_to LIKE 'https://reasonator.toolforge.org%'
JOIN categorylinks ON page_id=cl_from AND cl_to='Artworks... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.67"} | commonswiki_p |
Scrape Wikidata Item IDs from files in Category:Artworks_missing_main_subject_for_3D_work | null | use commonswiki_p;
SELECT concat("M",page_id) AS MID, 'P921',
REPLACE(el_to,'https://reasonator.toolforge.org/test/?q=','') AS QID #, CONCAT("File:",page_title)
FROM page
JOIN externallinks ON page_id=el_from AND el_to LIKE 'https://reasonator.toolforge.org%'
JOIN categorylinks ON page_id=cl_from AND cl_to='Artworks... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name", "user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_touched",... | commonswiki_p |
AP districts restructure edits pagewise from 20220403 | AP districts restructure edits from 20220403 with atleast 5 edits | SELECT
page_title,
page_len as page_size,
COUNT(*) as Edits
FROM page
JOIN categorylinks ON cl_from = page_id AND cl_to="ఆంధ్రప్రదేశ్_జిల్లాలు" AND cl_type="page"
JOIN revision ON page_id = rev_page
JOIN actor ON rev_actor = actor_id
JOIN user ON user_id =actor_user
where rev_actor != 0 AND page... | {"resultsets": [{"headers": ["pagename", "page_id", "SUBSTRING_INDEX(page_title, '/', 1)"], "rowcount": 100}], "runningtime": "0.21"} | tewiki_p |
AP districts restructure detailed pagewise edit activity from 20220403 | AP districts restructure detailed pagewise edit activity from 20220403 with users making atleast 5 edits | SELECT
page_title,
user_name,
COUNT(*) as Edits
FROM page
JOIN categorylinks ON cl_from = page_id AND cl_to="ఆంధ్రప్రదేశ్_జిల్లాలు" AND cl_type="page"
JOIN revision ON page_id = rev_page
JOIN actor ON rev_actor = actor_id
JOIN user ON user_id =actor_user
where rev_actor != 0 AND page_namespace=0... | {"resultsets": [{"headers": ["pagename", "page_id", "SUBSTRING_INDEX(page_title, '/', 1)", "page_is_redirect"], "rowcount": 100}], "runningtime": "2.72"} | tewiki_p |
Oldest pages proposed for translation | Convoluted exist queries mean:
For each page:
Find the lowest tp:tag marked revision such that no later revision (ignoring page moves) is not tp:tag marked | select page_id, page_namespace, page_title, page_latest, rt_type,
(select min(rt_revision) from revtag where rt_page=page_id and rt_type="tp:tag"
and not exists (select 1 from revision where rev_page=page_id and rev_id > rt_revision
and (select comment_text from comment_revision where comment_id=rev_c... | {"resultsets": [{"headers": ["user_name", "user_registration", "user_editcount", "ipb_address", "ipb_expiry", "ipb_sitewide"], "rowcount": 0}], "runningtime": "0.21"} | metawiki_p |
nlwiki Article titles in the form "<genus> sp." | null | SELECT page_title, rd_title, rd_fragment, COUNT(pl_from) AS `in-links`
FROM (
SELECT REPLACE(page_title,'_',' ') AS page_title, REPLACE(rd_title,'_',' ') AS rd_title, rd_fragment, pl_from
FROM page LEFT JOIN redirect ON page_id=rd_from AND rd_interwiki='' LEFT JOIN pagelinks ON pl_title=page_title AND pl_namespace=0
... | {"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 5}], "runningtime": "14.65"} | nlwiki |
First AFCH 0.9.1 acceptance | null | select * from logging where log_comment_id = 273174031 order by log_id asc limit 1 | {"connection_id": 18994912} | enwiki_p |
Incubator users (no of "wikis" edited) | null | WITH
base_table AS (
SELECT DISTINCT
REGEXP_SUBSTR(page_title, 'W[a-z]/[a-z]+') AS prefix ,
rev_id,
user_name,
rev_timestamp
FROM
revision rev
JOIN
page p
ON rev.rev_page = p.page_id
JOIN
actor a
ON rev.rev_actor = a.acto... | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 0}], "runningtime": "2.21"} | incubatorwiki |
Incubator users (no of "wikis" edited) | null | WITH
base_table AS (
SELECT DISTINCT
REGEXP_SUBSTR(page_title, 'W[a-z]/[a-z]+') AS prefix ,
rev_id,
user_name,
rev_timestamp
FROM
revision rev
JOIN
page p
ON rev.rev_page = p.page_id
JOIN
actor a
ON rev.rev_actor = a.acto... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 5}], "runningtime": "0.25"} | incubatorwiki |
Incubator users (no of "wikis" edited) | null | WITH
base_table AS (
SELECT DISTINCT
REGEXP_SUBSTR(page_title, 'W[a-z]/[a-z]+') AS prefix ,
rev_id,
user_name,
rev_timestamp
FROM
revision rev
JOIN
page p
ON rev.rev_page = p.page_id
JOIN
actor a
ON rev.rev_actor = a.acto... | {"resultsets": [{"headers": ["pl_title"], "rowcount": 6}], "runningtime": "0.33"} | incubatorwiki |
ukwiki most rollbacked pages (by unique rolled back users) | null | select p.page_namespace, p.page_title, count(distinct r.rev_actor) as rollbacks
from revision_userindex r
join change_tag ct on ct.ct_rev_id = r.rev_id
join change_tag_def ctd on ct.ct_tag_id = ctd.ctd_id
join page p on r.rev_page = p.page_id
where ctd.ctd_name in (
'mw-reverted'
)
and r.rev_timestamp > 202208010... | {"resultsets": [{"headers": ["actor_name", "pages_created"], "rowcount": 95}], "runningtime": "21.38"} | ukwiki_p |
NPP Backlog (by month created) | null | SELECT LEFT(created,6) AS created_yyyymmdd,
COUNT(*) AS unreviewed_count
FROM (
SELECT ptrp_created AS created, ptrp_page_id AS pageid
FROM pagetriage_page, pagetriage_page_tags, page
WHERE pagetriage_page.ptrp_page_id = pagetriage_page_tags.ptrpt_page_id
AND page.page_id = pagetriage_page_tags.ptrpt_p... | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 10}], "runningtime": "0.06"} | enwiki_p |
Find the most-categorised files on Commons | This query finds the ten files on Commons that are in the largest number of categories. | select page_title, count(distinct cl_to) as n_categories
from categorylinks join page on cl_from = page_id
where page_namespace = 6
group by cl_from
order by n_categories desc
limit 10; | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 0}, {"headers": ["rev_id", "rev_page",... | commonswiki_p |
Query test 6 | null | SELECT CONCAT( "# [[:File:", page_title, "]]")
FROM page
WHERE page_namespace = 6
AND page_id IN
(SELECT tl_from
FROM templatelinks
WHERE tl_target_id IN
(SELECT lt_id
FROM linktarget
WHERE lt_namespace = 10
AND lt_title IN ('NowCommons')))
AND page_title NOT IN ('Oil_Prices_1971_2007.svg.png', 'Pepe.jpg', 'Polonin... | {"resultsets": [{"headers": ["count(0)"], "rowcount": 1}], "runningtime": "0.97"} | itwiki_p |
Size of uploads by Fæ | This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects. | USE commonswiki_p;
SELECT COUNT(img_name) AS Count,
ROUND(SUM(img_size/(1<<30))) AS Size_GB
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "1Veertje"or actor_name = "1VeertjeBot"; | {"resultsets": [{"headers": ["img_name", "img_size"], "rowcount": 21}], "runningtime": "42.68"} | commonswiki_p |
log: history of pages | null | -- SET @page = '%OGBODSPORT%';
Select logging.*, LOWER(CONVERT(log_title USING utf8mb4)), LOWER(CONVERT(log_params USING utf8mb4)) from logging
where 1=1
-- and log_type = 'move'
-- and log_title like '%Amir%Arsalan%'
-- and LOWER(CONVERT(log_title USING utf8mb4)) like '%amir%arsalan%'
/* and (
LOWER(CONVERT(log... | {"resultsets": [{"headers": ["rc_id", "rc_title"], "rowcount": 100}], "runningtime": "0.15"} | enwiki_p |
Number of edits Breton lexemes per user | null | select actor_name, count(*) c
from revision_userindex
join page on rev_page=page_id
join actor_revision on rev_actor=actor_id
JOIN pagelinks ON page.page_id=pagelinks.pl_from
where page_namespace = 146
AND pagelinks.pl_title="Q12107" # Breton
group by actor_user
order by c desc;
| {"resultsets": [{"headers": ["user_id", "user_name", "actor_id", "rc_cur_id", "rc_id", "rc_bot", "rc_timestamp", "rc_namespace", "rc_type", "rc_title", "user_page_id", "user_category"], "rowcount": 129}], "runningtime": "0.18"} | wikidatawiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["pagename"], "rowcount": 0}], "runningtime": "0.64"} | enwiki_p |
Telugu Wikipedia articles created by bots (all-time) | null | SELECT actor_name, COUNT(rev_id) AS pages_created
FROM revision
JOIN actor a ON a.actor_id = revision.rev_actor
JOIN user u on u.user_id = a.actor_user
JOIN user_groups ug ON ug.ug_user = u.user_id
WHERE ug_group in ("bot")
AND rev_parent_id = 0
GROUP BY actor_name
ORDER BY pages_created DESC | {"resultsets": [{"headers": ["user_name", "user_registration", "after_thirty_days", "after_sixty_days", "after_ninty_days", "after_onetwenty_days"], "rowcount": 10006}], "runningtime": "15.92"} | tewiki_p |
recentchanges | null | SELECT *
FROM recentchanges
WHERE rc_type IN (1)
AND rc_title REGEXP "[防抗]疫|新冠|疫情"
ORDER BY rc_id DESC
LIMIT 100 | {"resultsets": [{"headers": ["actor_name", "recent_contribs", "recent_abs_diff", "userspace_contribs", "recent_abs_diff_userspace", "sandbox_contribs", "recent_abs_diff_sandbox", "contrib_ratio"], "rowcount": 103}], "runningtime": "179.31"} | zhwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.07"} | enwiki_p |
In use creations (fr) | null | SET
STATEMENT max_statement_time = 120 FOR
SELECT
DISTINCT actor_name,
comment_text
FROM
revision_userindex AS revision
INNER JOIN actor_revision AS actor ON revision.rev_actor = actor.actor_id
INNER JOIN comment_revision AS comment ON revision.rev_comment_id = comment.comment_id
INNER JOIN user ON actor.... | {"resultsets": [{"headers": ["rank", "user_name", "blocks"], "rowcount": 1}], "runningtime": "266.39"} | frwiki |
In use creations (ca) | null | SET
STATEMENT max_statement_time = 120 FOR
SELECT
DISTINCT actor_name,
comment_text
FROM
revision_userindex AS revision
INNER JOIN actor_revision AS actor ON revision.rev_actor = actor.actor_id
INNER JOIN comment_revision AS comment ON revision.rev_comment_id = comment.comment_id
INNER JOIN user ON actor.... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 4}], "runningtime": "51.36"} | cawiki |
Edit summary search | Fork for standing queries | SELECT actor_name AS user, count(actor_name) AS hits
FROM recentchanges
INNER JOIN comment on rc_id = comment_id
LEFT JOIN actor on rc_actor = actor_id
WHERE comment_text LIKE "%Fixed temporal range%"
GROUP BY actor_name
ORDER BY 2 DESC | {"resultsets": [{"headers": ["pr_page", "pr_type", "pr_level", "pr_cascade", "pr_expiry", "pr_id"], "rowcount": 50}], "runningtime": "0.11"} | enwiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-serbia | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["user_name"], "rowcount": 3211}], "runningtime": "88.63"} | commonswiki_p |
non-new enwiki articles needed classification into WikiProjects | null | -- query needs updating for new tamplate changes. https://phabricator.wikimedia.org/T299417
-- SELECT tl_from, tl_namespace, tl_title from templatelinks where tl_from = 5974403;
-- It will change to:
-- SELECT tl_from, lt_namespace, lt_title from templatelinks join linktarget on lt_target_id = lt_id where tl_from = 597... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.13"} | enwiki |
مقالات الجزائر في عام 2021 | null | USE arwiki_p;
SELECT
article.page_title as "المقالة", MIN(revision.rev_id) as "النسخة", actor.actor_name as "المستخدم", revision.rev_actor as "معرف المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len as "حجم المقالة"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ... | {"resultsets": [{"headers": ["img_name", "img_size", "img_width", "img_height", "img_metadata", "img_bits", "img_media_type", "img_major_mime", "img_minor_mime", "img_description_id", "img_actor", "img_timestamp", "img_sha1"], "rowcount": 1}], "runningtime": "0.06"} | arwiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-sweden | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 2}], "runningtime": "47.65"} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLE-sweden | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-india | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["cl_from"], "rowcount": 135}], "runningtime": "0.23"} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-GLAM-nm | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.07"} | commonswiki_p |
kowiki oldest draft | null | select concat("초안:",page.page_title) as 제목,page.page_len as 크기,DATE_FORMAT(revision.rev_timestamp, '%Y-%m-%d %H:%i:%s') as 마지막편집시각,act2.actor_name as 마지막편집자 from page
left join revision on page.page_latest = revision.rev_id
left join actor as act2 on revision.rev_actor = act2.actor_id
where page_namespace=118 and page_... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 2}], "runningtime": "25.62"} | kowiki |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-malta | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 112}], "runningtime": "13.15"} | commonswiki_p |
wiki for school | null | select p0.page_title, a.actor_name, r.rev_timestamp
from categorylinks cl
join page p1
on cl.cl_to = "Статті_про_фізику,_створені_під_час_конкурсу_Вікіпедія_для_школи_(2021_—_2022)"
and cl.cl_from = p1.page_id
join page p0
on p1.page_title = p0.page_title and p0.page_namespace = 0
join revision_userindex r
on p0.p... | {"resultsets": [{"headers": ["file", "actor_name"], "rowcount": 99}], "runningtime": "0.31"} | ukwiki_p |
Chilenos en Wikipedia en español | null | select rc_title as 'Títiulo página', rc_timestamp as 'Fecha de creación', rc_new_len as 'Tamaño',
actor_name as 'Usuario'
from recentchanges
INNER JOIN actor ON rc_actor = actor_id
INNER JOIN page ON page_title = actor_name and page_namespace = 2
INNER JOIN categorylinks ON page_id = cl_from
WHERE rc_new = 1
AND rc_... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.62"} | eswiki_p |
page_links_updated by month, all namespaces | null | select left(page_links_updated,6) as month,count(*),avg(page_len),sum(page_len)
from page
where page_random between 0.001 and 0.002
group by month; | {"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title"], "rowcount": 0}], "runningtime": "0.06"} | enwiki |
page_links_updated by month, mainspace | null | select left(page_links_updated,6) as month,count(*),avg(page_len),sum(page_len)
from page
where page_random between 0.001 and 0.002 and page_namespace = 0
group by month; | {"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title"], "rowcount": 1}], "runningtime": "0.06"} | enwiki |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-latvia | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["REPLACE(REPLACE(REPLACE(el_to, 'https://quickstatements.toolforge.org/#/v1=',''), '%7C','|'),'||','#')"], "rowcount": 48}], "runningtime": "0.11"} | commonswiki_p |
nlwiktionary Use of recently moved categories | null | SELECT page_namespace AS ns, page_title, cl_to, page_is_redirect AS rd
FROM logging, categorylinks, page
WHERE
log_type='move' AND log_namespace=14 AND cl_to=log_title AND cl_from=page_id AND log_timestamp REGEXP '^202' AND
((NOT EXISTS (SELECT * FROM page WHERE page_namespace=14 AND page_title=log_title))
OR... | {"resultsets": [{"headers": ["rc_title", "rc_actor", "nb_revocations", "nb_users_revocated"], "rowcount": 1}], "runningtime": "2.79"} | nlwiktionary |
Most active accounts by number of edits on French lexemes in Wikidata | null | SELECT `actor_name`, COUNT(*) AS `count`
FROM `revision_userindex`, `page`, `actor_revision`, `pagelinks`
WHERE `revision_userindex`.`rev_page` = `page`.`page_id`
AND `revision_userindex`.`rev_actor` = `actor_revision`.`actor_id`
AND `page`.`page_id` = `pagelinks`.`pl_from`
AND `page`.`page_namespace` = 146... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 5000}], "runningtime": "2228.55"} | wikidatawiki_p |
Self-redirects on enwiki | null | SELECT DISTINCT from_page.page_title, pl_title
FROM pagelinks
LEFT JOIN linktarget ON lt_title = pl_title AND lt_namespace = pl_namespace
LEFT JOIN templatelinks ON tl_from = pl_from AND tl_target_id = lt_id
INNER JOIN page to_page ON to_page.page_title = pl_title
INNER JOIN redirect on rd_from = to_page.page_id
I... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 2558}], "runningtime": "9.49"} | enwiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-peru | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 0}], "runningtime": "0.08"} | commonswiki_p |
Top 1000 pages lacking short descriptions | null | SELECT pl_title AS Title
FROM pagelinks
JOIN page ON page_namespace=0 AND page_title=pl_title AND page_is_redirect=0
WHERE pl_from = (SELECT page_id FROM page WHERE page_namespace=2 AND page_title="HostBot/Top_1000_report") AND pl_namespace=0
AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from=page_id AND cl_type... | {"resultsets": [{"headers": ["CONCAT(\"# [[\",p.page_title,\"]]\")", "page_len"], "rowcount": 0}], "runningtime": "0.06"} | enwiki_p |
Files with incorrect suffix | null | SELECT CONCAT("File:", img_name) AS File, CONCAT(img_major_mime, "/", img_minor_mime) AS Mimetype
FROM image
WHERE CONCAT(img_major_mime, "/", img_minor_mime, ".", LOWER(CONVERT(SUBSTRING_INDEX(img_name, '.', -1) USING latin1))) NOT IN (
"image/x-xcf.xcf", "image/x-bmp.bmp", "image/webp.webp", "image/tiff.tiff", "imag... | {"resultsets": [{"headers": ["user_name", "user_id"], "rowcount": 10}, {"headers": ["user_name", "user_id", "actor_id"], "rowcount": 1}], "runningtime": "0.09"} | enwiki_p |
IP blocks for 123.*.*.* | null | SET @address = "123.%";
SELECT ipb_address, ipb_timestamp, ipb_expiry, actor_name, comment_text
FROM ipblocks
JOIN `comment` ON comment_id=ipb_reason_id
JOIN actor ON actor_id=ipb_by_actor
WHERE ipb_address LIKE @address AND ipb_user = 0
ORDER BY ipb_range_start, ipb_range_end DESC, ipb_timestamp | {"resultsets": [{"headers": ["CONCAT(\"# [[\",p.page_title,\"]]\")", "page_len"], "rowcount": 0}], "runningtime": "0.06"} | enwiki_p |
Wiki usernames | null | SELECT concat("* [[User:",user_name,"]]") FROM enwiki_p.user WHERE user_name LIKE "%wiki%" ;
| {"resultsets": [{"headers": ["rank", "page_title", "created_at", "created_by", "page_id", "rev_id", "rev_len"], "rowcount": 1000}], "runningtime": "34.67"} | enwiki_p |
user list samet yücel | null | select user_name, user_registration, user_editcount, ipb_address, ipb_expiry, ipb_sitewide
from user
left join ipblocks on user_name = ipb_address
where 1=1
and (UPPER(CONVERT(user_name USING utf8mb4)) like '%SAMET%'
OR UPPER(CONVERT(user_name USING utf8mb4)) like '%YÜCEL%'
OR UPPER(CONVERT(user_name USIN... | {"resultsets": [{"headers": ["CONCAT(\"https://en.wikisource.org/wiki/Index:\", basename)"], "rowcount": 77}], "runningtime": "1.53"} | enwiki |
global user | null | select
gu_id, gu_name, gu_home_db, gu_locked, gu_registration
from
globaluser
where 1=1
-- and UPPER(CONVERT(gu_name USING utf8mb4)) like '%STA%A%'
-- and UPPER(CONVERT(gu_name USING utf8mb4)) like '%MIRKO%'
and (UPPER(CONVERT(gu_name USING utf8mb4)) like '%SAMET%'
OR UPPER(CONVERT(gu_name USING utf8mb4)) like '%... | {"resultsets": [{"headers": ["CONCAT(\"https://en.wikisource.org/wiki/Index:\", basename)"], "rowcount": 54}], "runningtime": "1.42"} | centralauth_p |
talk page w/o subject page | null | SELECT CONCAT('https://en.wikipedia.org/wiki/', CASE talk.page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 3305}], "runningtime": "7736.53"} | enwiki_p |
Self redirects | null | SELECT concat( "[[{{ns:", p.page_namespace, "}}:", p.page_title, "]]" )
AS "Self redirects"
FROM redirect r
INNER JOIN page p ON p.page_id = r.rd_from
WHERE p.page_namespace = r.rd_namespace
AND p.page_title = r.rd_title
ORDER by p.page_namespace, page_title; | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.18"} | enwiki |
Most used templates | null | SELECT concat('[[قالب:',lt_title,']]'), count(*) as a
FROM templatelinks, linktarget
where lt_namespace = 10
and tl_target_id = lt_id
#and tl_from_namespace = 0
group by lt_title
order by COUNT(lt_title) desc
; | {"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.06"} | arwiki_p |
test1 | null | SET STATEMENT max_statement_time = 600 FOR
SELECT DISTINCT
actor_name,
rc_this_oldid,
comment_text
FROM
recentchanges_userindex AS recentchanges
INNER JOIN comment_recentchanges AS comment ON recentchanges.rc_comment_id = comment.comment_id
INNER JOIN actor_recentchanges AS actor ON recentchanges.rc_actor =... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 10}], "runningtime": "0.08"} | viwiki |
Articles by lint errors (only obsolete HTML tags) | Mainspace pages with most lint errors except for Obsolete HTML tags | 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=2
group by page.page_id
order by count(*) desc, page_title asc
limit 1000; | {"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.04"} | enwiki |
Find images with location in Western Pomerania | null | #use commonswiki_p;
#set @cat1:="All_media_needing_categories_as_of_20%";
#set @cat2:="Media_needing_category_review_as_of_%";
#set @cat3:="Photos_from_Panoramio_needing_categories_as_of_%";
#set @cat3:="Files from Flickr (uncategorized%)";
#set @cat4:="Media with geo-coordinates needing categories";
#set @cat5:="Media... | {"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 55}], "runningtime": "1.28"} | commonswiki_p |
All pages in Portal namespace | null | select ROW_NUMBER() OVER(order by 'Portal page') num, -- get row number
CONCAT('[[Portal:', replace(page_title, '_', ' '), ']]') as 'Portal page' -- Format as wikilink, replace _ with space
from page
where page_namespace = 100 -- filter portal namespace
order by page_title asc; -- arrange in ascending order | {"resultsets": [{"headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i"], "rowcount": 171}], "runningtime": "36.37"} | enwiki_p |
Non-range blocked IP talkpages | Blocked IP address with talkpages. Does not check for range blocks | select CONCAT('[[User talk:', page_title, ']]') as 'IP talkpage' -- Format as wikilink
from page, ipblocks
where ipb_user = 0 -- filter IP addresses
and page_namespace = 3 -- filter User talk namespace
and (page_title REGEXP '(^([0-9]{1,3}[.]){3}[0-9]{1,3}$|^([[:alnum:]]{1,4}[:]){7})') -- IP address regex
and ipb_addre... | {"resultsets": [{"headers": ["pl_from", "source", "target"], "rowcount": 105}], "runningtime": "42.29"} | enwiki |
All redirects from Portal namespace to mainspace | null | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('* [[Portal:', replace(page_title, '_', ' '), ']]') as 'Portal Redirect' -- Format as wikilink, replace _ with space
from redirect
join page on page_id = rd_from
where page_namespace = 100 -- filter portal namespace
and page_is_redirect ... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 6}], "runningtime": "0.07"} | enwiki |
Is an IP address currently blocked? | Check if an IP address is currently blocked. Also checks if the IP is caught by range blocks | SET @ip_address = '78.31.67.68'; -- Enter the IP address you want to check here
select case when count(*) > 0 -- If an entry exists in ipblocks table, it is blocked else not blocked
then 'IP is blocked'
else 'IP is not blocked'
end as 'Blocked or not?'
from ipblocks
where ipb_user = 0 -- Fi... | {"resultsets": [{"headers": ["MAX(rev_timestamp)", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 6}], "runningtime": "0.06"} | enwiki |
Has a user edited after a timestamp? | null | select case when COUNT(*) > 0 -- If an entry exists in filtered revision table, the user has edited else not edited
then 'Has edited'
else 'Has not edited'
end as 'User has edited or not?'
from revision
join actor on rev_actor = actor_id -- link revision and actor table
and acto... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 10}], "runningtime": "0.07"} | enwiki |
User interface pages with protection level set | null | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('[[User:', replace(page_title, '_', ' '), ']]') as 'Page title', -- Format as wikilink, replace _ with space
pr_level as 'Protection level',
pr_type as 'Type',
page_content_model as 'Content model'
from page
join pag... | {"resultsets": [{"headers": ["pl_from", "page_title"], "rowcount": 0}], "runningtime": "0.40"} | enwiki |
List of IP talkpages | null | select CONCAT('[[User talk:', page_title, ']]') as 'IP talkpages' -- format as wikilink
from page
join actor on actor_user is null and actor_name = page_title -- IP with User talk page
where page_namespace = 3 -- filter User talk namespace
and page_title regexp '^(\\d{1,3}(\\.\\d{1,3}){3}|[\\dA-F]{1,4}(:[\\dA-F]{0,4}){... | {"resultsets": [{"headers": ["MAX(rev_id)", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 951}], "runningtime": "1.15"} | enwiki |
Has a page received edits after a timestamp? | Can excludes known maintenance bots | select case when COUNT(*) > 0 -- If an entry exists, the page has been edited else not edited
then 'Yes'
else 'No'
end as 'Page has been edited?'
from revision
join page on page_id = rev_page -- link with page table
where page_title = '121.208.212.82' -- page title without names... | {"resultsets": [{"headers": ["log_type", "AAAA", "count(*)"], "rowcount": 10}], "runningtime": "1.15"} | enwiki |
Inactive non-blocked IP talkpages transcluding a template | null | select CONCAT('[[User talk:', page_title, ']]') as 'IP talkpage' -- format as wikilink so that it can be read by AWB
from page
join templatelinks on page_id = tl_from -- link with templatelinks table
join linktarget on tl_target_id = lt_id -- link with linktarget table
join revision on rev_id = page_latest and rev_tim... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 104}], "runningtime": "11.65"} | enwiki |
Tables from frwiki | null | SHOW TABLES FROM frwiki_p; | {"resultsets": [{"headers": ["AAAA", "Total"], "rowcount": 9}], "runningtime": "8.69"} | frwiki_p |
Get revision schema | null | DESCRIBE frwiki_p.revision; | {"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "59.98"} | frwiki_p |
IP talkpages that have not been edited after a timestamp | null | select CONCAT('[[User talk:', replace(page_title, '_', ' '), ']]') as 'IP talkpage' -- Format as wikilink, replace _ with space
from revision, page
where page_namespace = 3 -- Filter User talk namespace
and page_title regexp '(^([0-9]{1,3}[.]){3}[0-9]{1,3}$|^([[:alnum:]]{1,4}[:]){7})' -- IP address regex
and rev_id = p... | {"resultsets": [{"headers": ["actor_name", "page_title", "COUNT(*)"], "rowcount": 50}], "runningtime": "3.65"} | enwiki |
Bnwiki inactive user with special user groups | null | SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', GROUP_CONCAT(ug1.ug_group) AS 'user_groups'
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop', 'bureaucrat', 'checkuser', 'oversight', 'interface-admin', 'autopatrolled', 'filemover', 'reviewer'... | {"resultsets": [{"headers": ["ipb_address", "ipb_timestamp", "ipb_expiry", "comment_text"], "rowcount": 0}], "runningtime": "0.06"} | bnwiki_p |
nlwiki Ship article with missing ship-category | null | SELECT page_title, REGEXP_REPLACE(REPLACE(page_title,'_',' '),
'^(([A-Z]+[0-9]*|[HZ]r\\.Ms\\.) )?([A-Z].*) \\(.*$', '\\3') AS 'generated-catsort', pp_value AS defaultsort
FROM page LEFT JOIN page_props ON page_id=pp_page AND pp_propname='defaultsort'
WHERE
page_namespace=0 AND
page_is_redirect=0 AND
page_tit... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "0.04"} | nlwiki |
interesting IPv6 | null | SELECT actor_name, COUNT(*)
FROM actor_revision
JOIN revision_userindex ON rev_actor = actor_id AND actor_user IS NULL
WHERE
actor_name RLIKE ".*((DEAD|BEEF|CAFE|BABE|F00D|C0DE|FEED):?){2}.*"
GROUP BY 1
ORDER BY 2 DESC | {"connection_id": 100589910} | enwiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-armenia | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["ipb_address", "actor_name", "ipb_timestamp", "comment_text"], "rowcount": 72}], "runningtime": "7.69"} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-aruba | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["ipb_address", "actor_name", "ipb_timestamp", "comment_text"], "rowcount": 72}], "runningtime": "6.09"} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-poland | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["ipb_address", "actor_name", "ipb_timestamp", "comment_text"], "rowcount": 265}], "runningtime": "5.36"} | commonswiki_p |
Pages Talk vides | null | SELECT page_is_redirect, page_namespace, page_title
FROM page talkpage
WHERE talkpage.page_namespace IN (1)
AND page_len = 0
ORDER BY page_namespace, page_title | {"resultsets": [{"headers": ["\u0c2a\u0c47\u0c1c\u0c40", "\u0c35\u0c30\u0c4d\u0c17\u0c02"], "rowcount": 10247}], "runningtime": "10.04"} | frwiki |
All living people | You can find the same people at https://en.wikipedia.org/wiki/Category:Living_people. But this script returns a list. | SELECT page_title, rev_id, revision.*
FROM page
JOIN categorylinks
ON cl_from = page_id
JOIN revision
ON rev_page = page_id
WHERE cl_to = "Living_people"
limit 0 | {"resultsets": [{"headers": ["categoria"], "rowcount": 146}], "runningtime": "0.78"} | enwiki |
CS1 categories | null | select CONCAT('[[:تصنيف:', cat_title ,']]') as "التصنيف", cat_pages AS "عدد الاستخدامات"
from category
where (cat_title like "%مراجع%" or cat_title like "%CS1%")
ORDER BY cat_pages DESC
; | {"resultsets": [{"headers": ["page_title", "page_namespace", "actor_name", "rev_timestamp", "comment_text"], "rowcount": 33}], "runningtime": "4.23"} | arwiki_p |
উইকিঅভিধানের শীর্ষ সম্পাদকগণ | ৩০ জানু ২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন। | SET @counter:=0;
SELECT
CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং,
CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "... | {"resultsets": [{"headers": ["WikiQuote updated article in #SheSaid 2022", "Current size", "Campaign size increase", "Last update"], "rowcount": 8}], "runningtime": "0.71"} | bnwiktionary_p |
Gap in Geograph uploads | This query demonstrates the gap in uploads from Geograph Britain and Ireland between 1780732 and 1800000. | select substr(cl_sortkey, 1, 6) as block, count(distinct cl_sortkey_prefix) from categorylinks
where cl_to = 'Images_from_Geograph_Britain_and_Ireland'
and cl_type = 'file'
AND cl_sortkey between ' 01770000' and ' 01820000' group by block; | {"resultsets": [{"headers": ["page_title"], "rowcount": 911}], "runningtime": "45.74"} | commonswiki_p |
Pages with specific number of font tag Lint errors | null | select ROW_NUMBER() OVER(order by page_namespace asc, page_title asc) num, -- get row number
CONCAT('[[', case when page_namespace = 2303 then 'Gadget definition talk:'
when page_namespace = 2302 then 'Gadget definition:'
when page_namespace = 2301 then 'Gadget talk:'
when page_namespace = 2... | {"resultsets": [{"headers": ["ss_total_pages", "ss_good_articles"], "rowcount": 1}], "runningtime": "0.07"} | enwiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.