title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Highest edit count (enwiki, last 365 days) | null | SET @rev = (SELECT MIN(rev_id)
FROM revision
WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s"));
SELECT COUNT(*) AS 'Edits',
actor_name AS `User`
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE rev_id >= @rev
GROUP BY `User`
ORDER ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 20}], "runningtime": "48.86"} | enwiki_p |
Most active all-German speakers on Commons in 2021 | null | USE commonswiki_p;
#SELECT * FROM revision_compat limit 1;
SELECT
edit_username,
edits_after
FROM categorylinks
INNER JOIN page ON page.page_id = cl_from
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_after
FROM revision_compat
WHERE rev_tim... | {"resultsets": [{"headers": ["el_from", "page_title", "el_to"], "rowcount": 28208}], "runningtime": "189.11"} | commonswiki_p |
nlwiki External links that could perhaps better be wikilinks | null | SELECT page_namespace, page_title, el_to
FROM externallinks, page
WHERE
el_from=page_id AND
page_namespace IN (0, 6, 10, 14, 100, 828) AND
el_to REGEXP '^https?://nl\\.wik[a-z]+\\.org/wiki/[^\\?]+$'
LIMIT 1000 | {"resultsets": [{"headers": ["yeard", "actor_name", "count(actor_name)"], "rowcount": 199}], "runningtime": "1.76"} | nlwiki |
SDC edits by user and edit summary #WMSE-WLM-israel | 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": ["year", "month", "page_namespace", "count"], "rowcount": 22}], "runningtime": "2.96"} | commonswiki_p |
[done] *** | null | use enwiki_p; select page_namespace, page_title, page_is_redirect, rd_title from page join redirect on page_id = rd_from where page_title like "%***%"; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 90}], "runningtime": "15.21"} | enwiki |
List of all redirects with {{R to section}} | Maybe I'll use this to look for {{R to section}} redirects that don't redirect to a #section | SELECT page_title
FROM templatelinks
JOIN page ON tl_from = page_id
WHERE page_is_redirect = 1
AND tl_title = 'R_to_section'
ORDER BY page_title ASC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 222}], "runningtime": "13.79"} | enwiki |
enwiki inactive autopatrol users | 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 ('autoreviewer')
JOIN actor
ON actor_user = user_id
JOIN revision_userindex
ON rev_id = (SELECT rev_id FROM... | {"resultsets": [{"headers": ["afl_id", "afl_filter", "afl_user", "afl_user_text", "afl_ip", "afl_action", "afl_actions", "afl_var_dump", "afl_timestamp", "afl_namespace", "afl_title", "afl_wiki", "afl_deleted", "afl_patrolled_by", "afl_rev_id"], "rowcount": 0}], "runningtime": "99.42"} | enwiki_p |
nlwiki Template redirect deletions | null | SELECT log_timestamp, actor_name, log_title, comment_text
FROM logging, actor, `comment`
WHERE
log_type='delete' AND
log_action='delete' AND
log_namespace=10 AND
LEFT(log_timestamp, 4)='2021' AND
log_actor=actor_id AND
log_comment_id=comment_id AND
comment_text REGEXP '(?i)doorverwijzing|redire... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 19}], "runningtime": "4.26"} | nlwiki |
Fix Klammern im Wikilink | Automagische Edits vom Apperbot bzgl. Klammern | SELECT CONCAT('[[', IF(page_namespace = 10, 'Vorlage:', ''), REPLACE(page_title, '_', ' '), ']]') AS Artikel,
CONCAT('[[Spezial:Diff/', rev_id, '|(diff)]]') As Difflink
FROM page, revision_userindex, actor, comment
WHERE rev_actor = actor_id
AND actor_name = 'APPERbot'
AND rev_comment_id = comment_id
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 36}], "runningtime": "3.31"} | dewiki_p |
Bot: +Wartungskategorie | Automagische Edits vom Apperbot bzgl. Klammern | SELECT CONCAT('[[', IF(page_namespace = 10, 'Vorlage:', ''), REPLACE(page_title, '_', ' '), ']]') AS Artikel,
CONCAT('[[Spezial:Diff/', rev_id, '|(diff)]]') As Difflink
FROM page, revision_userindex, actor, comment
WHERE rev_actor = actor_id
AND actor_name = 'APPERbot'
AND rev_comment_id = comment_id
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 0}], "runningtime": "0.07"} | dewiki_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... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 43}], "runningtime": "39.37"} | 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... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 191}], "runningtime": "29.88"} | commonswiki_p |
Test | null | USE arwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'المجموع'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[مستخدم:', actor_name, '|', actor_name, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as to... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 1107}], "runningtime": "81.40"} | arwiki_p |
zhwiki: pages contain redirect from wp to wpj | null | USE zhwiki_p;
SELECT pl_from, COUNT(*) AS `cnt`
FROM pagelinks
LEFT JOIN (
SELECT * FROM redirect
WHERE rd_namespace = 102
) rd ON pl_namespace = 4 AND pl_title = rd_title
LEFT JOIN page ON rd_from = page_id
WHERE page_namespace = 4 AND rd_title IS NOT NULL
GROUP BY pl_from | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 13}], "runningtime": "3.09"} | zhwiki_p |
RDAB | null | select page_namespace, page_title from page where page_title like "%(Disambiguation)";
select page_namespace, page_title from page where page_title regexp "[^Dd]isambiguation"
or page_title regexp "d[^i]*sambiguation"
or page_title regexp "di[^s]*ambiguation"
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 137}], "runningtime": "122.14"} | enwiki |
[done] RDAB 2 | null | select page_namespace, page_title from page where page_title regexp "d.isambiguation"
or page_title regexp "di.sambiguation"
or page_title regexp "dis.ambiguation"
or page_title regexp "disa.mbiguation"
... | {"resultsets": [{"headers": ["CONCAT(\"Draft:\",page_title)", "rev_timestamp_", "actor_name_"], "rowcount": 4923}], "runningtime": "36.63"} | enwiki |
Superseded oxfordjournals.org links | null | USE enwiki_p;
SELECT COUNT(el_to) as links
FROM externallinks
WHERE el_index LIKE "http://org.oxfordjournals%";
SELECT SUBSTRING_INDEX(REPLACE(el_to, "http://", ""), ".", 1) AS subdomain, COUNT(*) as links
FROM externallinks
WHERE el_index LIKE "http://org.oxfordjournals%"
GROUP BY subdomain
ORDER BY links DESC; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 174}], "runningtime": "12.96"} | 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... | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 106}], "runningtime": "0.20"} | commonswiki_p |
Personen mit Klammerlemma | Personen mit Klammerlemma in der deWP Stand 26. April 2021 | USE dewiki_p;
SELECT page_title
FROM page, templatelinks
WHERE page_namespace = 0
AND page_title like '%\_(%)'
AND tl_from = page_id
AND tl_namespace = 10
AND tl_title = 'Personendaten' | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 10}], "runningtime": "0.08"} | dewiki_p |
enwiki mainspace creations by autopatrolled users | null | SELECT *
FROM recentchanges
WHERE rc_new = 1
AND rc_namespace = 0
AND rc_patrolled = 2
AND rc_timestamp > 20210326000000
ORDER BY rc_timestamp DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 21}], "runningtime": "2.06"} | enwiki_p |
enwiki mainspace creations by autopatrolled users | null | SELECT COUNT(*)
FROM recentchanges
WHERE rc_new = 1
AND rc_namespace = 0
#AND rc_patrolled = 2
AND rc_timestamp > 20210326000000
ORDER BY rc_timestamp DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 105}], "runningtime": "23.43"} | enwiki_p |
enwiki mainspace creations by autopatrolled users | null | SELECT *
FROM recentchanges
WHERE rc_new = 1
AND rc_namespace > 0
AND rc_patrolled = 2
AND rc_timestamp > 20210326000000
ORDER BY rc_timestamp DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 62}], "runningtime": "5.95"} | enwiki_p |
Personen mit Klammerlemma | Personen mit Klammerlemma in der deWP Stand 26. April 2021 | USE dewiki_p;
SELECT DISTINCT page_title
FROM page, templatelinks
WHERE page_namespace = 0
AND page_title like '%\_(%)'
AND tl_from = page_id
AND tl_namespace = 10
AND (
page_title RLIKE "\\(.*ischer?_.*\\)"
OR page_title RLIKE "\\(.*deutscher?_.*\\)"
OR page_title RLIKE "\\(.*yscher?_.... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 28}], "runningtime": "0.13"} | dewiki_p |
Move protected pages (sysop only) on enwiki, includes protection date | As of 04/26/21, 23,251 pages on enwiki are move protected (sysop only). The majority of these are infinitely protected. | SELECT page_title,
pr_type,
pr_level,
pr_expiry,
(
SELECT log_timestamp
FROM logging
WHERE log_action = 'protect'
AND log_title = page_title
ORDER BY log_timestamp DESC
LIMIT 1
) AS log_timestamp_2
FROM page
JOIN page_restrictions ON pr_id = page_id
WHER... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 0}], "runningtime": "0.05"} | enwiki |
Move protected pages (sysop only) on enwiki, includes protection date | As of 04/26/21, 23,251 pages on enwiki are move protected (sysop only). The majority of these are infinitely protected. | SELECT page_title,
pr_type,
pr_level,
pr_expiry,
MAX(log_timestamp)
FROM page
JOIN page_restrictions ON pr_id = page_id
LEFT JOIN logging_logindex ON log_title = page_title
WHERE pr_type = 'move'
AND pr_level = 'sysop'
AND MAX(log_timestamp) < DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -10 YEAR), "%Y%m%d%H%i%s... | {"connection_id": 1011446022} | simplewiki |
Move protected pages (sysop only) on enwiki, includes protection date | As of 04/26/21, 23,251 pages on enwiki are move protected (sysop only). The majority of these are infinitely protected. | SELECT page_title,
pr_type,
pr_level,
pr_expiry,
MAX(log_timestamp)
FROM page
JOIN page_restrictions ON pr_id = page_id
LEFT JOIN logging_logindex ON log_title = page_title
WHERE pr_type = 'move'
AND pr_level = 'sysop' | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 13}], "runningtime": "65.07"} | enwiki |
Pre-10/2009 move protections, not indef edit-protected | Currently move-protected pages that do not have any protection-related log entries after 7 October 2009, and are not currently indefinitely edit-protected to sysop as well.
For [[WP:RAQ#Indefinite move-protections placed long ago on articles]] circa 27 April 2021. | SELECT page_namespace, page_title, pr1.pr_expiry
FROM page
JOIN page_restrictions pr1 ON pr1.pr_page = page_id
LEFT JOIN logging_logindex ON log_page = page_id AND log_type = 'protect' AND log_action != 'unprotect'
LEFT JOIN page_restrictions pr2
ON pr2.pr_page = page_id
AND pr2.pr_type = 'edit'
AND ... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 22}], "runningtime": "2.91"} | enwiki |
Move protected pages (sysop only) on enwiki | As of 04/26/21, 31,699 pages on enwiki are move protected (sysop only). The majority of these are infinitely protected. | SELECT CONCAT(
CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:'
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 0}], "runningtime": "0.06"} | enwiki |
user pages with no user on metawiki | null | Use metawiki_p;
Select page_title, page_len from page left join user on replace(page_title,"_"," ") = user_name
Where page_namespace = 2
And page_is_redirect = 0
And user_name is null
And page_title not regexp ".+/.*|[0-9]+(\.[0-9]+)+"; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 23}], "runningtime": "0.15"} | metawiki |
Top recent spam blacklist editors (en) | null | SELECT actor.actor_name, COUNT(*) FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
WHERE revision.rev_page = 12242061
AND rev_timestamp BETWEEN 20200101000000 AND 20210101000000
GROUP BY actor.actor_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 132}], "runningtime": "1.65"} | enwiki_p |
Top recent spam blacklist editors (meta) | null | SELECT actor.actor_name, COUNT(*) FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
WHERE revision.rev_page = 13107
AND rev_timestamp BETWEEN 20200101000000 AND 20210101000000
GROUP BY actor.actor_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 97}], "runningtime": "6.36"} | metawiki_p |
Top recent spam blacklist editors (es) | null | SELECT actor.actor_name, COUNT(*) FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
WHERE revision.rev_page = 583967
AND rev_timestamp BETWEEN 20200101000000 AND 20210101000000
GROUP BY actor.actor_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 27}], "runningtime": "1.30"} | eswiki_p |
Top spam blacklist editors (meta) | null | SELECT actor.actor_name, COUNT(*) FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
WHERE revision.rev_page = 13107
AND rev_timestamp BETWEEN 20110101000000 AND 20120101000000
GROUP BY actor.actor_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 371}], "runningtime": "12.84"} | metawiki_p |
Number of spam blacklist log hits | null | SELECT COUNT(*) FROM logging
WHERE log_type = "spamblacklist"
AND log_timestamp BETWEEN 20200901000000 AND 20201001000000 | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 22}], "runningtime": "0.25"} | enwiki_p |
Files on ms no file page | null | #USE glwiki_p;
#SELECT CONCAT("# [[:File:", a.img_name, "]]") AS Wiki, CONCAT("[[:File:", b.img_name, "]]") AS Commons #, b.img_timestamp
#SELECT CONCAT("# [[:File:", a.img_name, "]]") AS File
#FROM image a
#LEFT JOIN page p ON p.page_title = a.img_name AND p.page_namespace = 6
#WHERE p.page_title IS NULL
SELECT CON... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 25}], "runningtime": "3.08"} | mswiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"headers": ["concat(\"Module:\",page_title)", "page_len"], "rowcount": 1991}], "runningtime": "20.80"} | bnwiki_p |
পরিক্ষক পরিসংখ্যান | পরিক্ষক পরিসংখ্যান | use bnwiki_p;
SELECT
user_name user,
count(*) as review_cnt
FROM
logging
JOIN actor ON log_actor = actor_id
JOIN user ON actor_user = user_id
WHERE
log_type = 'review'
AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i')
#AND log_timestamp > CONCAT( YEAR( DATE_SUB( NOW(), INTERVAL... | {"resultsets": [{"headers": ["page_title"], "rowcount": 40}], "runningtime": "4.75"} | bnwiki_p |
সর্বোচ্চ নিবন্ধ প্রণেতা পরিসংখ্যান | null | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"headers": ["page_title"], "rowcount": 730}], "runningtime": "5.37"} | bnwiki_p |
Highest edit count (enwiki, last 365 days) | null | SETSETSETSET @rev = (SELECT MIN(rev_id)
FROM revision
WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s"));
SELECT COUNT(*) AS 'Edits',
actor_name AS `User`
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE rev_id >= @rev
GROUP BY `Use... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"], "rowcount": 3026}], "runningtime": "32.54"} | bnwiki_p |
সর্বোচ্চ নিবন্ধ প্রণেতা পরিসংখ্যান | null | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"headers": ["title", "backlinks"], "rowcount": 20000}], "runningtime": "113.67"} | bnwiki_p |
Most used templates on bnwiki | null | SELECT DISTINCT CONCAT("{{S|",page_title,"}}") AS template, COUNT(DISTINCT tl_from) AS counting, pr_type, pr_level
FROM page
JOIN templatelinks ON page_title = tl_title AND tl_namespace = 10 AND tl_from_namespace = 0
LEFT JOIN page_restrictions ON pr_page = page_id
WHERE page_namespace = 10 AND page_is_redirect = 0 /... | {"resultsets": [{"headers": ["iw_prefix", "iw_url", "iw_local", "iw_trans", "iw_api", "iw_wikiid"], "rowcount": 0}], "runningtime": "0.06"} | bnwiki_p |
পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | USE bnwiki_p;
SELECT page_title, redirect.rd_namespace, redirect.rd_title FROM page
JOIN redirect ON rd_from = page.page_id
WHERE rd_namespace <> 0
AND page_namespace = 0
AND page_title NOT LIKE '%:%'
LIMIT 100 | {"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": 500}], "runningtime": "1.00"} | bnwiki_p |
পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | USE bnwiki_p;
SELECT page_title, redirect.rd_namespace, redirect.rd_title FROM page
JOIN redirect ON rd_from = page.page_id
WHERE rd_namespace <> 0
AND page_namespace = 0
AND page_title NOT LIKE '%:%'
LIMIT 100 | {"resultsets": [{"headers": ["fa_id", "fa_name", "fa_archive_name", "fa_storage_group", "fa_storage_key", "fa_deleted_user", "fa_deleted_timestamp", "fa_deleted_reason_id", "fa_size", "fa_width", "fa_height", "fa_metadata", "fa_bits", "fa_media_type", "fa_major_mime", "fa_minor_mime", "fa_description_id", "fa_actor", "... | bnwiki_p |
পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | পুনঃনির্দেশ এর দ্বারা অপসারণকৃত পাতা | USE bnwiki_p;
SELECT page_title, redirect.rd_namespace, redirect.rd_title FROM page
JOIN redirect ON rd_from = page.page_id
WHERE rd_namespace <> 0
AND page_namespace = 0
AND page_title NOT LIKE '%:%'
LIMIT 100 | {"resultsets": [{"headers": ["fa_id", "fa_name", "fa_archive_name", "fa_storage_group", "fa_storage_key", "fa_deleted_user", "fa_deleted_timestamp", "fa_deleted_reason_id", "fa_size", "fa_width", "fa_height", "fa_metadata", "fa_bits", "fa_media_type", "fa_major_mime", "fa_minor_mime", "fa_description_id", "fa_actor", "... | bnwiki_p |
rowiki users having over 700 edits + all bots, sorted by edit count | This takes into account bots that don't have official bot status, but are nonetheless members of Categorie:Roboți Wikipedia. It also tells whether an account is an admin or a bot. | SELECT ss_total_edits FROM site_stats;
SELECT SUM(user_editcount) FROM user
WHERE user_editcount < 1000;
SELECT user.user_id AS user_id, user.user_name AS user_name, user.user_editcount AS user_editcount,
CASE
WHEN (ug.user_admin > 0 OR ue.user_admin > 0) THEN 1
ELSE 0
END AS user_admin,
CASE
WHEN (ug.user_bot... | {"resultsets": [{"headers": ["ug_user", "ug_expiry", "user_id", "user_name", "user_registration", "user_editcount"], "rowcount": 0}, {"headers": ["ug_user", "ug_group", "ug_expiry", "user_name"], "rowcount": 0}], "runningtime": "0.25"} | bnwiki_p |
Most active pending changes reviewers (last 30 days) on bnwiki | null | SELECT actor.actor_name, COUNT(logging.log_actor) AS manual_accept_count
FROM logging
JOIN actor ON actor.actor_id = logging.log_actor
WHERE logging.log_type = 'review' AND logging.log_action = 'approve' AND datediff(now(), logging.log_timestamp) < 30
GROUP BY logging.log_actor
ORDER BY manual_accept_count DESC
LIMIT 1... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 500}], "runningtime": "0.79"} | bnwiki |
Pre-10/2009 move protections | Currently move-protected pages that do not have any protection-related log entries after 7 October 2009.
Extraction of the most recent log entry (hence timestamp, action, name, and comment) is in some cases dubious and in others apparently self-contradictory, as it relies on a namespace/title match. For example, [[Us... | SELECT page_namespace,
page_title,
pr1.pr_expiry AS 'Move expiry',
pr2.pr_level AS 'Edit protection',
page_is_redirect,
log_timestamp,
log_action,
actor_name,
comment_text
FROM page
JOIN page_restrictions AS pr1 ON pr1.pr_page = page_id
LEFT JOIN page_restrictions... | {"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": 0}], "runningtime": "0.06"} | enwiki |
WPCleaner removing big chuncks of text (frWP) | Lists revisions in mainspace with the WPCleaner tag (id 52) which are 10,000+ bytes smaller than the previous version. | SELECT page_title, Rn.rev_timestamp, Rn.rev_id, actor_name, Rn.rev_len AS new_len, Ro.rev_len AS old_len
FROM revision Rn
JOIN change_tag ON ct_rev_id = Rn.rev_id AND ct_tag_id = 52
JOIN revision Ro ON Ro.rev_id = Rn.rev_parent_id AND Ro.rev_len > 0 AND Rn.rev_len + 10000 < Ro.rev_len
JOIN page ON page_id = Rn.rev_page... | {"resultsets": [{"headers": ["il_from", "il_to", "il_from_namespace"], "rowcount": 10}], "runningtime": "0.07"} | frwiki |
Empty talks on plwiki | null | SELECT CONCAT("# [[Dyskusja:",page_title,"]]") AS page_title
FROM page
WHERE page_namespace = 1 AND page_len = 0;
SELECT CONCAT("# [[Dyskusja Wikipedii:",page_title,"]]") AS page_title
FROM page
WHERE page_namespace = 5 AND page_len = 0;
SELECT CONCAT("# [[Dyskusja pliku:",page_title,"]]") AS page_title
FROM page
WHE... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 1}], "runningtime": "0.07"} | plwiki_p |
Empty article talks on plwiki | null | USE plwiki_p;
SELECT concat("# [[Dyskusja:",page_title,"]]") AS page_title
FROM plwiki_p.page
WHERE page_namespace = 1 AND page_len = 0
ORDER BY page_title; | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 2}], "runningtime": "59.33"} | plwiki_p |
একাউন্ট বিহীন ব্যবহারকারী পাতা | null | USE bnwiki_p;
SELECT
page_namespace,
REPLACE(page_title,'_',' ') AS page_title,
GROUP_CONCAT(REPLACE(cl_to,'_',' ') SEPARATOR ' | ') AS cl_to
FROM `page` LEFT JOIN `categorylinks` ON page_id=cl_from
WHERE
page_is_redirect=0 AND
page_namespace IN (2, 3) AND
page_title NOT REGEXP '([1-9][0-9\.]+[0-9]|[... | {"resultsets": [{"headers": ["ns", "page_title", "rd", "name", "cat", "commas"], "rowcount": 329}], "runningtime": "91.85"} | bnwiki |
সুরক্ষিত ব্যবহারকারী পাতা | null | select page_title, pr_level, pr_expiry from page_restrictions, page
where pr_page = page_id
and page_namespace = 3
and pr_type = 'edit'
and page_title not like '%/%'
; | {"resultsets": [{"headers": ["ns", "page_title", "rd", "name", "cat", "commas"], "rowcount": 1454}], "runningtime": "110.36"} | bnwiki_p |
২৫টি সর্বাধিক সম্পাদিত নিবন্ধ | null | USE bnwiki_p;
SELECT rc_title, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
GROUP BY rc_title ORDER BY num_edits DESC
LIMIT 25; | {"resultsets": [{"headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 5}], "runningtime": "0.08"} | bnwiki_p |
সামাজিক নেটওয়ার্কের লিঙ্কযুক্ত নিবন্ধ | null | USE bnwiki_p;
SELECT CONCAT('# [[',page_title,']]') as page_title
FROM page
JOIN externallinks
ON page_id = el_from
WHERE page_namespace = 0
AND (el_to LIKE 'http%://%.facebook.%/%'
OR el_to LIKE 'http%://facebook.%/%'
OR el_to LIKE 'http%://fb.%/%'
OR el_to LIKE 'http%://%.fb.%/%'
OR el_to LIKE 'http%://twitter.%/%'
O... | {"resultsets": [{"headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 5}], "runningtime": "0.17"} | bnwiki_p |
অনাধ ব্যবহারকারী আলাপ পাতা | null | use bnwiki_p;
SELECT CONCAT("# [[Dyskusja wikipedysty:",p1.page_title,"]]") AS page_title
FROM page AS p1
WHERE p1.page_title NOT LIKE '%/%'
AND p1.page_namespace = 3
AND NOT EXISTS (SELECT 1
FROM page AS p2
WHERE p2.page_namespace = 2
AND p1.page_title = p2.page_title) | {"resultsets": [{"headers": ["page_title"], "rowcount": 7}], "runningtime": "179.95"} | bnwiki |
সবচেয়ে দীর্ঘতম শিরোনাম | null | USE bnwiki_p;
SELECT page_title, LENGTH(page_title) AS length
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
ORDER BY length DESC
LIMIT 10 | {"resultsets": [{"headers": ["page_title"], "rowcount": 2}], "runningtime": "103.52"} | bnwiki |
দীর্ঘতম ব্যবহারকারী নাম | null | USE bnwiki_p;
SELECT user_name, length(user_name), user_editcount
FROM user
WHERE user_editcount > 5
AND length(user_name) > 40
AND NOT EXISTS(SELECT * FROM ipblocks WHERE ipb_user = user_id)
ORDER BY length(user_name) DESC
LIMIT 500; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 5}], "runningtime": "0.09"} | bnwiki |
খালি নিবন্ধ | null | USE bnwiki_p;
SELECT CONCAT("# [[",page_title,"]]") AS page_title
FROM page
WHERE page_namespace = 0 AND page_len = 0; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 1}], "runningtime": "0.32"} | bnwiki |
Move protected pages (sysop only) on enwiki | As of 04/26/21, 31,699 pages on enwiki are move protected (sysop only). The majority of these are infinitely protected. | SELECT CONCAT(
CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:'
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "re... | enwiki |
Last 1000 day edits (arwiki) | null | SELECT
DATE_FORMAT(rev_timestamp, "%Y-%m-%d") AS day,
COUNT(rev_timestamp) AS revisions
FROM revision
GROUP BY day DESC
LIMIT 1000; | {"resultsets": [{"headers": ["file", "actor_name"], "rowcount": 958}], "runningtime": "27.80"} | arwiki |
Most new page patrols (all time) | May be off a little bit. Isn't exactly matching https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Top_new_article_reviewers. Appears to only count "page curation log" / "mark as reviewed". Does not take into account AFD's, draftificaitons, etc. | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
user_name,
COUNT(*)
FROM pagetriage_log
JOIN user ON user_id = ptrl_user_id
WHERE ptrl_reviewed IN (1, 2)
GROUP BY user_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["concat(\"Module:\",page_title)", "page_len"], "rowcount": 1991}], "runningtime": "46.74"} | arwiki |
Post-10/2009 move protections, main ns, !sysop edit prot | Currently move-protected pages that have had a protection-related log entry since 7 October 2009, restricted to pages currently in the main namespace and not currently edit-protected sysop.
There's no hard guarantee that the most recent protection log entry is related to the move protection, and it's hard to filter fo... | SELECT log_title,
pr1.pr_expiry AS 'Move expiry',
pr2.pr_level AS 'Edit protection',
page_is_redirect,
log_timestamp,
log_action,
actor_name,
comment_text
FROM logging
LEFT JOIN actor_logging ON actor_id = log_actor
LEFT JOIN comment_logging ON comment_id = log_comment_i... | {"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "7.57"} | enwiki |
Pre-10/2009 move protections, main ns, !sysop edit prot | Currently move-protected pages that do not have any protection-related log entries after 7 October 2009, restricted to pages currently in the main namespace and not currently edit-protected sysop.
See parent query for comments on log accuracy.
See query 54424 for move protections after 7 October 2009.
For [[WP:RAQ#I... | SELECT page_title,
pr1.pr_expiry AS 'Move expiry',
pr2.pr_level AS 'Edit protection',
page_is_redirect,
log_timestamp,
log_action,
actor_name,
comment_text
FROM page
JOIN page_restrictions AS pr1 ON pr1.pr_page = page_id
LEFT JOIN page_restrictions AS pr2 ON pr2.pr_page ... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len"], "rowcount": 9160}], "runningtime": "25.07"} | enwiki |
পুনঃনির্দেশকৃত পাতায় পুনঃনির্দেশ | null | USE bnwiki_p;
SELECT rd_from page_title
FROM page, redirect
WHERE rd_title=page_title
AND page_is_redirect = 1
;
LIMIT 20 | {"resultsets": [{"headers": ["pagename"], "rowcount": 282}], "runningtime": "8.03"} | bnwiki_p |
Get a Wikipedia username based on user_id | null | SELECT user_name FROM user
WHERE user_id = 4849142 | {"resultsets": [{"headers": ["QID"], "rowcount": 14}], "runningtime": "0.11"} | wikibase |
লিংক ছাড়া নিবন্ধ | null | USE bnwiki_p;
SELECT
CONCAT("[[",page_title,"]]") AS নিবন্ধ
FROM page
LEFT JOIN pagelinks
ON pl_from = page_id
WHERE pl_namespace IS NULL AND page_is_redirect = 0 AND page_namespace = 0; | {"resultsets": [], "runningtime": "0.03"} | bnwiki |
SELECT COUNT(*) FROM externallinks | null | SELECT COUNT(*)
FROM externallinks | {"resultsets": [{"headers": ["actor_name", "edits"], "rowcount": 17}], "runningtime": "1.49"} | enwiki |
উপাত্ত হিন্দি লেবেল | 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_... | {"resultsets": [{"headers": ["user_name"], "rowcount": 54826}], "runningtime": "72.65"} | wikidatawiki |
উপাত্ত উর্দু লেবেল | 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_... | {"resultsets": [{"headers": ["ug_user", "ug_group", "ug_expiry"], "rowcount": 5}], "runningtime": "0.07"} | wikidatawiki_p |
উপাত্ত আরবি লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lar", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='arwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"resultsets": [{"headers": ["ug_user", "ug_group", "ug_expiry"], "rowcount": 10}], "runningtime": "0.08"} | wikidatawiki_p |
Thanks statistics | null | use bnwiki_p;
SELECT
user_name user,
count(*) as thanks_cnt
FROM
logging
JOIN actor ON log_actor = actor_id
JOIN user ON actor_user = user_id
WHERE
log_type = 'thanks'
AND log_action IN ('thanks', 'approve2', 'approve-i', 'approve2-i')
#AND log_timestamp > CONCAT( YEAR( DATE_SUB( NOW(), INTERVAL ... | {"resultsets": [{"headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 5}], "runningtime": "0.08"} | bnwiki_p |
patrolling stats (bnwiki) | Last 6000 days patrolling statistics | use bnwiki_p;
SELECT
user_name user,
count(*) as rollback_cnt
FROM
logging
JOIN actor ON log_actor = actor_id
JOIN user ON actor_user = user_id
WHERE
log_type = 'rollback'
AND log_action IN ('rollback', 'approve2', 'approve-i', 'approve2-i')
#AND log_timestamp > CONCAT( YEAR( DATE_SUB( NOW(), INT... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "re... | bnwiki_p |
খণ্ড ত যুক্ত নিবন্ধ | null | USE bnwiki_p;
SELECT page_title
FROM page
WHERE page_namespace = 0 -- article namespace only
AND page_is_redirect = 0 -- non-redirects
AND Word_Search RLIKE "আকাস"; | {"resultsets": [{"headers": ["page_title", "actor_name", "rev_timestamp", "page_len"], "rowcount": 97}], "runningtime": "0.92"} | bnwiki |
পাতার শিরোনাম | null | SELECT page_title
FROM page
WHERE page_namespace = 0 -- article namespace only
AND page_is_redirect = 0 -- non-redirects
AND page_title LIKE "%বাংলা%"; | {"resultsets": [{"headers": ["user_name"], "rowcount": 1}], "runningtime": "0.07"} | bnwiki |
SHEIKH's subpages | null | SELECT CONCAT('[[User:', page_title, ']]')
FROM page
WHERE page_namespace = 2 -- User:
AND page_title LIKE 'SHEIKH/%'
AND page_title NOT LIKE 'SHEIKH/drafts/%'; | {"resultsets": [{"headers": ["user_name"], "rowcount": 1}], "runningtime": "0.07"} | bnwiki |
Missing bnwiki Articales | null | SELECT CONCAT("[[:en:",page_title,"]]"), count(*), page_len
FROM langlinks
JOIN categorylinks ON ll_from = cl_from
AND cl_to="Wikipedia_articles_incorporating_text_from_the_20th_edition_of_Gray's_Anatomy_(1918)"
JOIN page on ll_from = page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND NOT EXISTS (SELECT *
... | {"resultsets": [{"headers": ["rc_timestamp", "rc_title", "actor_name"], "rowcount": 1000}], "runningtime": "2.98"} | bnwiki |
مقالات يبدأ تاريخها بتحويل | null | USE bnwiki_p;
SELECT CONCAT('# [[', page_title, ']]') AS page_title, rev_comment
FROM page, revision
WHERE page.page_id = revision.rev_page
AND rev_comment LIKE '%Move_to%'
AND page_namespace = 0
AND rev_parent_id = 0
AND page_is_redirect = 0
ORDER BY rev_comment
#LIMIT 10; | {"resultsets": [{"headers": ["day"], "rowcount": 1}], "runningtime": "1.77"} | bnwiki |
أسماء صور بأرقام هندية | null | USE bnwiki_p;
SELECT CONCAT('# [[', page_title, ']]') AS page_title
FROM page
WHERE page_title REGEXP '(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z)'
AND page_namespace = 0
AND page_is_redirect = 0 | {"resultsets": [{"headers": ["day", "count"], "rowcount": 31}], "runningtime": "0.53"} | bnwiki |
En. Categories Search | null | USE enwiki_p;
SELECT page_title AS page_title
FROM page
WHERE page_namespace = 14 and page_is_redirect = 0
AND page_title REGEXP '(Islam|Islamic)'
AND page_title NOT REGEXP '(Wikipedia)'
#LIMIT 100
; | {"resultsets": [{"headers": ["day", "count"], "rowcount": 31}], "runningtime": "6.92"} | enwiki |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"headers": ["page_title"], "rowcount": 100}], "runningtime": "75.44"} | bnwiki_p |
Look up for WikiEdu OAuth CID | null | SELECT
*
FROM
recentchanges
INNER JOIN change_tag ON recentchanges.rc_id = change_tag.ct_rc_id
INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_tag_def.ctd_id
INNER JOIN comment ON recentchanges.rc_comment_id = comment.comment_id
WHERE
comment_text LIKE 'User has enrolled in %'
LIMIT
5 | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 3}, {"headers": ["day", "count"], "rowcount": 31}], "runningtime": "18.02"} | enwiki_p |
Recent WikiEd enrollments | null | SELECT DISTINCT
actor_name
FROM
recentchanges
INNER JOIN change_tag ON recentchanges.rc_id = change_tag.ct_rc_id
INNER JOIN actor ON recentchanges.rc_actor = actor.actor_id
WHERE
ct_tag_id = 530 -- WikiEdu: OAuth CID: 1232
AND actor_user IS NOT NULL | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 3}], "runningtime": "4.01"} | enwiki_p |
Most new page patrols (all time) | May be off a little bit. Isn't exactly matching https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Top_new_article_reviewers. Appears to only count "page curation log" / "mark as reviewed". Does not take into account AFD's, draftificaitons, etc. | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
user_name,
COUNT(*)
FROM pagetriage_log
JOIN user ON user_id = ptrl_user_id
WHERE ptrl_reviewed IN (1, 2)
GROUP BY user_name
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["user_name", "user_editcount", "COUNT(rev_id)"], "rowcount": 66}], "runningtime": "11.60"} | enwiki |
labels with ~1~ | labels with ~1~ | SELECT wbit_item_id as id, wbxl_language as language, wbx_text as text FROM wbt_item_terms LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id LEFT JOIN wbt_type ON wbtl_type_id = wby_id LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id LEFT JOIN wbt_text ON wbxl_text_id = wbx_id WHERE wby_name = 'l... | {"resultsets": [{"headers": ["actor_name", "count"], "rowcount": 20}], "runningtime": "9.44"} | wikidatawiki |
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 = "Xover"; | {"resultsets": [{"headers": ["CONCAT(\"Draft:\",page_title)", "rev_timestamp_", "actor_name_"], "rowcount": 4919}], "runningtime": "33.85"} | commonswiki_p |
Edits for a given index's pages | null | SELECT rev.rev_timestamp, pp.pp_propname, pp.pp_value
FROM revision AS rev
JOIN page as p on rev.rev_page = p.page_id
JOIN pagelinks as pl on p.page_title = pl.pl_title
JOIN page_props as pp on p.page_id = pp.pp_page
WHERE pl.pl_from=3607517 AND pl.pl_namespace=104
AND rev.rev_timestamp > 20210429000000; | {"resultsets": [{"headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 5}], "runningtime": "0.08"} | enwikisource |
Pages linked from index with proofread status | null | SELECT pl.pl_title, p.page_id, pp.pp_propname, pp.pp_value
FROM page AS p
RIGHT JOIN pagelinks as pl on p.page_title = pl.pl_title
LEFT JOIN page_props as pp on p.page_id = pp.pp_page
WHERE pl.pl_from=3607517 AND pl.pl_namespace=104
AND (pp.pp_propname = 'proofread_page_quality_level' OR p.page_id IS NULL); | {"resultsets": [{"headers": ["concat('# [[',REPLACE(page_title,'_',' '),']]')"], "rowcount": 6722}], "runningtime": "251.78"} | enwikisource |
Pre-10/2009 move protections, main ns, !sysop edit prot | Currently move-protected pages that do not have any protection-related log entries after 7 October 2009, restricted to pages currently in the main namespace and not currently edit-protected sysop.
See parent query for comments on log accuracy.
See query 54424 for move protections after 7 October 2009.
For [[WP:RAQ#I... | SELECT page_title,
pr1.pr_expiry AS 'Move expiry',
pr2.pr_level AS 'Edit protection',
page_is_redirect,
log_timestamp,
log_action,
actor_name,
comment_text
FROM page
JOIN page_restrictions AS pr1 ON pr1.pr_page = page_id
LEFT JOIN page_restrictions AS pr2 ON pr2.pr_page ... | {"resultsets": [{"headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 1}]... | enwiki |
Nortreus blacklisting | null | SET @pat='(?i)nortreus';
SELECT DISTINCT page_namespace, page_title, 1 AS existing
FROM page
WHERE page_title RLIKE @pat
UNION
SELECT DISTINCT ar_namespace, ar_title, 0
FROM archive
WHERE ar_title
RLIKE @pat; | {"connection_id": 506828456} | enwiki |
Most active IP users | null | SELECT page_namespace,
page_title,
page_latest,
rev_id,
rev_len,
comment_text
FROM page
JOIN revision ON page_latest = rev_id
JOIN comment ON rev_comment_id = comment_id
WHERE page_namespace = 3
AND rev_len > 50000
AND page_title REGEXP '^[0-9]'
GROUP BY page_title
ORDER BY rev_len DESC
LIMIT 1000 | {"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", "comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 10}], "runningtime": "0.10"} | enwiki |
Most active IP users - debug | null | SELECT page_namespace,
page_title,
page_latest,
rc_cur_id,
rc_new_len,
comment_text
FROM page
JOIN recentchanges ON page_id = rc_cur_id
JOIN comment_recentchanges ON rc_comment_id = comment_id
WHERE page_namespace = 3
AND rc_new_len > 50000
AND page_title REGEXP '^[0-9][0-9]?[0-9]?[0-9]?([.]|:)'
AND... | {"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", "comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 10}], "runningtime": "0.15"} | enwiki |
top reviewer in bnwiki of all time | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি অমীমাংসিত সম্পাদনা পর্যালোচনাকারী | USE bnwiki_p;
-- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as revie... | {"connection_id": 1019054285} | bnwiki |
Find most recent additions of labels by certain users in Bengali | This list only considers changes from the past 30 days due to the $wgRcMaxAge setting.
(Ripped from wdvd's code and modified a bit.)
Thanks, Adam, for further modifications!
Mahir256 is in this list for comparisons only--no effect on the rankings of others is to be assumed. | USE wikidatawiki_p;
SELECT current_date;
SELECT rc_user_text as Username, COUNT(*) as Number_of_labels_added
FROM (
SELECT rc_user_text,
rc_title, comment_text
# count(comment_text) as added
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
WHERE comment_text REGEXP '... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | wikidatawiki_p |
Enwiki rev 1007692649 - reporting creation of svwwiki | null | SELECT * FROM revision AS rev
JOIN page AS p ON p.page_id = rev.rev_page
WHERE rev.rev_id = 1007692649 | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "18.70"} | enwiki |
WP:T current threads | null | -- rework this with JOINs instead of subSELECTs
SELECT page.page_title,
revision.rev_timestamp,
MIN(created.rev_timestamp),
COUNT(DISTINCT(actor.actor_name))
FROM page
INNER JOIN revision ON page.page_latest = revision.rev_id
INNER JOIN revision AS created ON page.page_id = created.rev_page
INNER JOIN templa... | {"resultsets": [{"headers": ["users", "pages", "deleted", "content_translated_pages", "content_translated_deleted"], "rowcount": 1}], "runningtime": "3.92"} | huwiki_p |
PR stats for an index | null | SELECT *, (pr_count - pr_q4 - pr_q0) as toProofreadOrValidate
FROM pr_index
INNER JOIN page on page.page_id = pr_page_id
WHERE page_namespace=106
AND page_title = "Ulysses,_1922.djvu"
; | {"resultsets": [{"headers": ["Title"], "rowcount": 59}], "runningtime": "0.17"} | enwikisource |
PR stats for indexes in a category | null | SELECT pr_index.*,
(pr_count - pr_q4 - pr_q0) as toProofreadOrValidate,
page_title
FROM pr_index
INNER JOIN page on page.page_id = pr_page_id
INNER JOIN categorylinks on categorylinks.cl_from = pr_page_id
WHERE
page_namespace=106
AND cl_to = "Monthly_Challenge_(May_2021)"
; | {"resultsets": [{"headers": ["Tables_in_mediawikiwiki_p"], "rowcount": 96}], "runningtime": "0.18"} | enwikisource |
zhwiki: pages contain redirect from wp to wpj | null | USE zhwiki_p;
SELECT pl_from #, pl_namespace, pl_title
FROM pagelinks
LEFT JOIN (
SELECT rd_title, page_namespace, page_title FROM redirect
LEFT JOIN page ON rd_from = page_id
WHERE rd_namespace = 102 AND page_namespace = 4
) rd ON pl_namespace = page_namespace AND pl_title = page_title
WHERE rd_title IS NOT NULL... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | zhwiki_p |
zhwiki: Search active block comments | null | SELECT ipb_id, comment_text
FROM ipblocks
LEFT JOIN comment ON ipb_reason_id = comment_id
WHERE comment_text REGEXP "([Ss]ockpuppeteer|[Ss]pm)"
ORDER BY ipb_id DESC
| {"resultsets": [{"rowcount": 106, "headers": ["CONVERT(cl_to USING utf8)", "COUNT(*)"]}], "runningtime": "608.46"} | zhwiki_p |
zhwiki: Search active protected_titles comments | null | SELECT pt_namespace, pt_title, comment_text
FROM protected_titles
LEFT JOIN comment ON pt_reason_id = comment_id
WHERE comment_text REGEXP "([Ss]ockpuppeteer|[Ss]pm)"
ORDER BY pt_timestamp DESC | {"runningtime": "0.46", "resultsets": [{"rowcount": 264, "headers": ["title", "Page_len"]}]} | zhwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.