title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
(source, destination) id pairs of all mainspace internal links (Chinese) | null | SELECT pl_from AS source_page, page_id AS target_page FROM pagelinks JOIN page ON pl_title=page_title
WHERE page_namespace=0 AND pl_namespace=0; | {"runningtime": "0.06", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | zhwiki |
(source, destination) id pairs of all mainspace internal links (Arabic) | null | SELECT pl_from AS source_page, page_id AS target_page FROM pagelinks JOIN page ON pl_title=page_title
WHERE page_namespace=0 AND pl_namespace=0; | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | arwiki |
(source, destination) id pairs of all mainspace redirections (Arabic) | null | SELECT rd_from AS source_page, page_id AS target_page FROM redirect JOIN page on rd_title=page_title
WHERE rd_namespace=0; | {"runningtime": "0.08", "resultsets": [{"rowcount": 1, "headers": ["page_title"]}]} | arwiki |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPBN%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"runningtime": "3.97", "resultsets": [{"headers": ["actor_name", "\u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0430\u0442\u0435\u0439"], "rowcount": 20}]} | bnwiki |
Biografien mit Klammerlemma am 5. September 2020 in der deWP | null | 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' | {"runningtime": "378.48", "resultsets": [{"rowcount": 1, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}, {"rowcount": 107, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}]} | dewiki_p |
Biografien mit Klammerlemma am 5. September 2020 in der deWP | null | 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' | {"runningtime": "143.43", "resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 81}]} | dewiki_p |
Pivoted Personenkategorien Gender | null | /*SELECT * FROM page WHERE page_namespace = 14 AND page_title = 'Person'*/
WITH recursive personenkategorien as (
SELECT p.page_title FROM categorylinks cl
JOIN page p ON p.page_id = cl.cl_from
WHERE cl_type = 'subcat' and cl_to = 'Person'
UNION
SELECT p.page_title FROM categorylinks cl
JOIN personenkategorien as pk O... | {"runningtime": "0.30", "resultsets": [{"rowcount": 1, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}, {"rowcount": 1, "headers": ["COUNT(*)"]}, {"rowcount": 116, "headers": ["page_title", "cl_to", "cl_type"]}]} | dewiki_p |
User data | null | SELECT user_name, user_id, user_registration, user_editcount FROM user WHERE user_name IN ('Putnik'); | {"runningtime": "19.00", "resultsets": [{"headers": ["user_name"], "rowcount": 482}]} | ruwiki |
Reviewer stats (bnwiki) | null | 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... | {"runningtime": "165.81", "resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 43}]} | bnwiki_p |
Tewiki | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"runningtime": "0.48", "resultsets": [{"rowcount": 204, "headers": ["page_title"]}]} | tewiki |
Begriffsklärungsseiten mit 30 oder mehr verlinkten Personen | null | SELECT CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]'),
count(Person.page_title) AS AnzahlPersonenLinks
FROM page AS BKL, templatelinks AS BTL, pagelinks, page AS Person, templatelinks as PTL
WHERE BKL.page_namespace = 0
AND BKL.page_title NOT LIKE '%_(Familienname)'
AND BTL.tl_from = BKL.page_id
... | {"runningtime": "129.52", "resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 987}]} | dewiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"runningtime": "18.21", "resultsets": [{"rowcount": 249, "headers": ["CONCAT('# [[', page_title, ']] (', COUNT(*), ')')"]}]} | tewiki |
Begriffsklärungsseiten mit 30 oder mehr verlinkten Personen | null | SELECT CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]'),
count(Person.page_title) AS AnzahlPersonenLinks
FROM page AS BKL, templatelinks AS BTL, pagelinks, page AS Person, templatelinks as PTL
WHERE BKL.page_namespace = 0
AND BKL.page_title NOT LIKE '%_(Familienname)'
AND BTL.tl_from = BKL.page_id
... | {"connection_id": 31701990} | dewiki_p |
New edits marked as patrolled | null | SELECT log_params FROM logging
WHERE log_type = "patrol"
AND log_action = "patrol"
AND log_namespace = 0
AND log_timestamp BETWEEN 20210101000000 AND 20210701000000 | {"connection_id": 31702774} | azwiki_p |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"runningtime": "1.10", "resultsets": [{"rowcount": 100, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | enwiki |
New edits marked as patrolled | null | SELECT * FROM logging
WHERE log_type = "patrol"
AND log_action = "patrol"
AND log_timestamp BETWEEN 20201201000000 AND 20210101000000
AND log_params NOT LIKE '%"5::previd";s:1%' # Ignore new page patrols
AND log_params LIKE '%"6::auto";i:0%' # Ignore autopatrols
LIMIT 50 | {"runningtime": "78.98", "resultsets": [{"rowcount": 10, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 10, "headers": ["actor_name"]}, {"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 5, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 5, "headers... | dawiki_p |
Sock counts by sockmaster | null | SELECT catpage.page_title, COUNT(DISTINCT sockcat.cl_from)
FROM categorylinks clinks
INNER JOIN page catpage ON catpage.page_id = clinks.cl_from
INNER JOIN categorylinks sockcat ON sockcat.cl_to = catpage.page_title
WHERE clinks.cl_to = "Wikipedia_sockpuppets"
AND clinks.cl_type = "subcat"
AND catpage.page_title NOT L... | {"runningtime": "55.81", "resultsets": [{"rowcount": 10, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 10, "headers": ["actor_name"]}, {"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 5, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 5, "headers... | enwiki_p |
Edits description for "Autism" page | Edits description for "Autism" page | select *
from revision
where rev_page = 25 | {"runningtime": "0.03", "resultsets": []} | enwiki_p |
2021 eligible voters for Board elections - FINAL | Query to get lists of eligible voters for 2021 Board elections based on contributions to individuals. Please note that this query doesn't exactly reflect the voting eligibility criteria - while the eligibility criteria counts are across wikis, the counts in this query are based on the selected wiki only. | use metawiki_p;
select
user_name,
twofifty.cnt as edits,
onefive.cnt as recent_edits
from user
join
(
select
actor_user,
count(*) cnt
from revision_userindex
join actor_revision
on rev_actor = actor_id
join page
on page_id = rev_page
where
rev_timestamp < '20210705000000' -- edits p... | {"runningtime": "0.31", "resultsets": [{"rowcount": 14, "headers": ["User", "Count"]}]} | metawiki_p |
Thanks in metawiki | 1) Total number of thanks, users who thanked and who were thanked.
2) Most thanking users
3) Most thanked users
4) Most thanking users by target. | USE metawiki_p;
SELECT COUNT(*), COUNT(DISTINCT log_actor), COUNT(DISTINCT log_title)
FROM logging_logindex
WHERE log_action = "thank"
/*AND log_timestamp > DATE_ADD(NOW(), INTERVAL -1 MONTH)*/;
SELECT log_actor, COUNT(*) FROM logging_logindex
WHERE log_action = "thank"
#AND log_timestamp > DATE_ADD(NOW(), INTERVAL -1... | {"runningtime": "7.46", "resultsets": [{"rowcount": 1314, "headers": ["CONCAT('# [[:File:', p.page_title, ']]')"]}]} | metawiki_p |
Bengali Wikipedia Section Translation edits | null | use igwiki_p;
-- When appropriate, change 'contenttranslation' to 'sectiontranslation'
set @cx_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'sectiontranslation'
);
select
date_format(rev_timestamp, "%Y-%m-%d %H:%i:%s") as 'Time',
rev_id as 'Revision ID',
actor_name as 'Us... | {"runningtime": "3.11", "resultsets": [{"rowcount": 500, "headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i"]}]} | igwiki_p |
AAAAAAAAAH | null | select gu_id, gu_name, gu_home_db, gu_locked, gu_hidden from globaluser WHERE gu_locked = 1 LIMIT 100; | {"runningtime": "0.53", "resultsets": [{"rowcount": 0, "headers": ["rc_actor", "actor_name"]}]} | centralauth |
exact text search in Wikidata labels/descriptions/aliases | Query to search for an exact string in labels, descriptions or aliases of any item in any language (but not other statements or entity types). | SELECT CONCAT('Q', wbit_item_id), wbxl_language, wby_name, wbx_text -- use CONCAT('P', wbpt_property_id) when searching wbt_property_terms
FROM wbt_item_terms -- can also be wbt_property_terms, but not lexicographical data
JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id -- use wbpt_term_in_lang_id when searchin... | {"runningtime": "300.84", "resultsets": [{"rowcount": 3, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | wikidatawiki_p |
Tewiki: user-wise WPWPTE to village pages | null | select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_id
and page_id=rev_page
and comment_text like "%WPWPTE%"
and page_id in (select cl_from from categorylinks where (cl_to = 'భారతదేశ_గ్రామాలు'
OR
... | {"connection_id": 32063456} | tewiki |
Template count in ruwiki | null | select
count(page_id)
from
page
where
page_namespace = 10 and -- Template
page_is_redirect <> 1; -- Don't count redirects | {"runningtime": "0.47", "resultsets": [{"rowcount": 243, "headers": ["Title", "Page_len"]}]} | jawiki_p |
Global lock info | null | SELECT *,(select comment_text from comment where comment_id=logging_userindex.log_comment_id) as 'comment' FROM logging_userindex
#inner join comment on comment_id=log_comment_id
where log_type='globalauth' and log_action='setstatus' and log_params like '%locked%'
limit 10; | {"runningtime": "22.31", "resultsets": [{"rowcount": 9147, "headers": ["concat(\"Category:\",page_title)", "page_len"]}]} | metawiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.16", "resultsets": [{"rowcount": 14, "headers": ["edits", "edits_per_day", "actor_name"]}]} | commonswiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"runningtime": "0.32", "resultsets": [{"rowcount": 134, "headers": ["file", "actor_name"]}]} | commonswiki_p |
Infoboxes by number of transclusions in ruwiki | null | USE ruwiki_p;
SELECT
CONCAT('[[ш:', REPLACE(page_title, '_', ' '), ']]'),
(
SELECT
COUNT(*)
FROM templatelinks
WHERE tl_title = page_title
AND tl_namespace = page_namespace
) as transclusion_count
FROM page
JOIN categorylinks
ON cl_from = page_id
WHERE
page_nam... | {"runningtime": "1.92", "resultsets": [{"headers": ["rc_actor", "actor_name"], "rowcount": 118}]} | ruwiki_p |
Mediawiki namespace pages | null | USE bnwiki_p;
SELECT CONCAT('# [[মিডিয়াউইকি:',page_title,']]') AS page_title
FROM page
WHERE page_namespace = 8
AND page_is_redirect = 0
ORDER BY page_title ASC; | {"runningtime": "15.30", "resultsets": [{"rowcount": 4, "headers": ["Database"]}, {"rowcount": 109, "headers": ["Tables_in_enwiki_p"]}, {"rowcount": 5, "headers": ["actor_id", "actor_user", "actor_name"]}, {"rowcount": 4, "headers": ["actor_id"]}, {"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}, {"... | bnwiki |
Label/description/alias stats for Bengali | Since the migration away from wb_terms, and since the Grafana dashboard which previously displayed these stats is broke, the only way to get semi-immediate statistics on these is for a single language at a time. (There are pages, such as https://wikidata-analytics.wmcloud.org/app/WD_LanguagesLandscape and https://www.w... | datawiki_p;
SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang... | {"runningtime": "15.96", "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", "user_name"], "rowcount": 1}]} | wikidatawiki_p |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
ORDER BY COUNT(*) DESC; | {"connection_id": 411324} | incubatorwiki |
External links: English Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"connection_id": 533022} | enwiki_p |
External links: German Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"connection_id": 533023} | dewiki_p |
External links: Pashto Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"connection_id": 533033} | pswiki_p |
External links: Arabic Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"runningtime": "1.25", "resultsets": [{"headers": ["page_title"], "rowcount": 500}]} | arwiki_p |
External links: Urdu Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"runningtime": "0.61", "resultsets": [{"rowcount": 255, "headers": ["page_title"]}]} | urwiki_p |
External links: Turkish Wikipedia: .af | null | select el_to, count(*) from externallinks where el_index like 'http://af.%' or el_index like 'https://af.%' group by el_to order by count(*) desc; | {"runningtime": "0.48", "resultsets": [{"rowcount": 254, "headers": ["page_title"]}]} | trwiki_p |
Random sample of 20k edits for Vietnamese Wikipedia (2020-21) | null | SELECT rev_id
FROM revision
JOIN actor on rev_actor = actor_id
WHERE rev_timestamp BETWEEN "20200801" AND "20210801"
AND (actor_user NOT IN (SELECT ug_user
FROM user_groups
WHERE ug_group = "bot")
OR actor_user IS NULL)
AND actor_name NOT REGEXP "([Bb]ot|AWB)$"
ORDER BY RAND(... | {"runningtime": "7.65", "resultsets": [{"headers": ["Draft", "Article"], "rowcount": 0}]} | viwiki |
תיקוני זכר/נקבה | להלן רשימת קישורים לעריכות בוויקיפדיה של תיקוני זכר נקבה.
ניתן לחלץ את העריכות באמצעות API
https://he.wikipedia.org/w/api.php?action=help&modules=compare | use hewiki_p;
select concat('https://he.wikipedia.org/w/index.php?diff=', rev_id) from revision inner join page on rev_page=page_id where page_namespace=0 and rev_comment like '%שתי שקל%'; | {"runningtime": "0.31", "resultsets": [{"headers": ["Page", "Redlink"], "rowcount": 100}]} | hewiki_p |
תיקוני זכר/נקבה | להלן רשימת קישורים לעריכות בוויקיפדיה של תיקוני זכר נקבה.
ניתן לחלץ את העריכות באמצעות API
https://he.wikipedia.org/w/api.php?action=help&modules=compare | use hewiki_p;
select rev_parent_id as fromrev,rev_id as torev from revision inner join page on rev_page=page_id inner join `comment` as cmt on cmt.comment_id=rev_comment_id WHERE rev_parent_id != 0 AND cmt.comment_text like '%שתי שקל%'; | {"runningtime": "6.61", "resultsets": [{"rowcount": 3699, "headers": ["Page"]}]} | hewiki_p |
تصنيفات للنقل | null | use arwiki_p;
select CONCAT('* [[:تصنيف:',page_title, ']]>') AS cat1
, REPLACE(CONCAT('[[:تصنيف:', page_title, ']]'), 'إنتاج' , 'بدأ_عرضها_في' ) as cat2
from page
where page_namespace = 14 and page_is_redirect = 0 and page_title REGEXP "(19[0-9][0-9]|20[0-9][0-9])"
and page_title not like "%/%"
and page_title not l... | {"runningtime": "0.08", "resultsets": [{"rowcount": 6, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}]} | arwiki_p |
تصنيفات للنقل | null | use arwiki_p;
select CONCAT('* [[:تصنيف:',page_title, ']]>') AS cat1
, REPLACE(CONCAT('[[:تصنيف:', page_title, ']]'), 'عرضت_في' , 'بدأ_عرضها_في' ) as cat2
from page
where page_namespace = 14 and page_is_redirect = 0 and page_title REGEXP "(19[0-9][0-9]|20[0-9][0-9])"
and page_title not like "%/%"
and page_title not... | {"runningtime": "0.09", "resultsets": [{"headers": ["rev_id", "ct_rev_id", "comment_text", "ctd_name"], "rowcount": 10}]} | arwiki_p |
Ukrainian Independence Month 2021 on UKWP | List of articles created for the Investigative Journalism Week on UkWiki | USE ukwiki_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... | {"runningtime": "0.16", "resultsets": [{"rowcount": 31, "headers": ["CONCAT('[[', IF (pt.pt_namespace=14,':',''), '{{ns:', CAST(pt.pt_namespace AS CHAR), '}}:', pt.pt_title, ']]')", "pt_create_perm"]}]} | ukwiki_p |
All books on enWikisource | null | SELECT p.page_id, p.page_title, p.page_latest, tl.tl_title
FROM templatelinks as tl INNER JOIN page as p
ON p.page_id = tl.tl_from
WHERE tl.tl_from_namespace = 0
AND p.page_title NOT LIKE '%/%'
AND tl.tl_namespace = 106
ORDER BY p.page_latest; | {"runningtime": "2.36", "resultsets": [{"rowcount": 100, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | enwikisource |
Reviewer stats (bnwiki) | null | 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... | {"runningtime": "0.99", "resultsets": [{"headers": ["page_title"], "rowcount": 484}]} | bnwiki_p |
عدد الصفحات | عدد الصفحات والروابط لرابط | # عدد الصفحات
select count(DISTINCT(el_from)) as num_pages from externallinks
where el_to like "%rasoolona.com%"
and (el_to not like "%archive.org%");
# عدد الروابط بعد حذف المكرر
select count(DISTINCT(el_to)) as num_links from externallinks
where el_to like "%rasoolona.com%"
and (el_to not like "%archive.org%");
... | {"runningtime": "0.19", "resultsets": [{"rowcount": 60, "headers": ["user_id", "user_registration", "COUNT(*)"]}]} | arwiki |
all previous names of articles | null | SELECT log_page, GROUP_CONCAT(log_title)
FROM logging
where log_namespace = 0 and log_type = "move" and log_page > 0
GROUP BY log_page
limit 1000 | {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["iwl_title"]}]} | hewiki |
creation time for all articles | null | select rev_page, min(rev_timestamp) as created
from revision
left join page
on revision.rev_page = page.page_id
where page_namespace=0
group by rev_page
limit 5000 | {"runningtime": "0.08", "resultsets": [{"rowcount": 4, "headers": ["file", "actor_name"]}]} | hewiki |
#WPWP #WPWPHU számossága (nem végleges) | null | use huwiki_p;
SELECT count(1) AS WPWPHU_darab FROM comment
WHERE comment_text LIKE '%#WPWPHU%'
| {"runningtime": "0.14", "resultsets": [{"rowcount": 19, "headers": ["file", "actor_name"]}]} | huwiki |
উপাত্ত বাংলা লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lbn", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='bnwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.08", "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_editc... | wikidatawiki_p |
Begriffsklärungsseiten mit 30 oder mehr verlinkten Personen | null | SELECT CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]'),
count(Person.page_title) AS AnzahlPersonenLinks
FROM page AS BKL, templatelinks AS BTL, pagelinks, page AS Person, templatelinks as PTL
WHERE BKL.page_namespace = 0
AND BKL.page_title NOT LIKE '%_(Familienname)'
AND BTL.tl_from = BKL.page_id
... | {"runningtime": "5.43", "resultsets": [{"headers": ["page_title", "user_name"], "rowcount": 1413}]} | dewiki_p |
Begriffsklärungsseiten mit 32 oder mehr verlinkten Personen | null | SELECT CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]'),
count(Person.page_title) AS AnzahlPersonenLinks
FROM page AS BKL, templatelinks AS BTL, pagelinks, page AS Person, templatelinks as PTL
WHERE BKL.page_namespace = 0
AND BKL.page_title NOT LIKE '%_(Familienname)'
AND BTL.tl_from = BKL.page_id
... | {"runningtime": "89.69", "resultsets": [{"rowcount": 4103, "headers": ["Page"]}]} | dewiki_p |
Begriffsklärungsseiten mit 33 oder mehr verlinkten Personen | null | SELECT CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]'),
count(Person.page_title) AS AnzahlPersonenLinks
FROM page AS BKL, templatelinks AS BTL, pagelinks, page AS Person, templatelinks as PTL
WHERE BKL.page_namespace = 0
AND BKL.page_title NOT LIKE '%_(Familienname)'
AND BTL.tl_from = BKL.page_id
... | {"runningtime": "31.45", "resultsets": [{"rowcount": 0, "headers": ["wikitext"]}]} | dewiki_p |
Mulheres e homens criados em março de 2020 | Quantidade de artigos sobre homens e mulheres criados na Wikipedia em português em março de 2020. Considera só as categorias de pessoas (não wikidata), assim como se o artigo existe no momento de executar a consulta | use ptwiki_p;
SELECT now() as 'última execução';
SELECT if(cl_to = 'Mulheres', 'Mulheres', 'Homens') as genero, count(1) as counted
FROM page
INNER JOIN revision ON rev_page = page_id
INNER JOIN categorylinks ON cl_from = page_id
WHERE rev_timestamp between '20200301000000' AND '20200401000000'
AND rev_parent_id = 0
A... | {"runningtime": "57.46", "resultsets": [{"rowcount": 100, "headers": ["count", "page_title"]}]} | ptwiki_p |
Most recent usernames | null | SELECT TOP user_name FROM user
ORDER BY user_registration
LIMIT 5 | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["Page"]}]} | enwiki_p |
Most recent usernames | null | SELECT user_name, user_registration FROM user
ORDER BY user_registration desc
LIMIT 5 | {"runningtime": "0.16", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | enwiki_p |
TWA Lint | null | select page.page_title,linter.*
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=4 and page.page_title like 'TWA/%'
order by page.page_title | {"runningtime": "2.70", "resultsets": [{"headers": ["category", "parent"], "rowcount": 1638}]} | enwiki |
Longest ruwiki's page titles | null | select page_namespace, replace(page_title, "_", " "), length(page_title) from page where page_is_redirect=0 and length(page_title)>200 order by length(page_title) desc; | {"runningtime": "0.22", "resultsets": [{"rowcount": 62, "headers": ["file", "actor_name"]}]} | enwiki_p |
উপাত্ত বাংলা লেবেল | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lbn", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='bnwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "0.17", "resultsets": [{"rowcount": 25, "headers": ["file", "actor_name"]}]} | wikidatawiki_p |
Username lengths | null | SELECT length(user_name) as len_user_name, char_length(user_name), count(*)
FROM user
WHERE user_registration >= 20010101000000 and user_registration <= 20310101000000
GROUP BY length(user_name), char_length(user_name)
ORDER BY length(user_name), char_length(user_name);
| {"runningtime": "0.20", "resultsets": [{"rowcount": 28, "headers": ["page_title"]}]} | jawiki_p |
Username lengths | null | SELECT char_length(CONVERT (user_name USING UTF8MB4)) char_length, count(*) accounts_with_this_length
FROM user
WHERE user_registration >= 20010101000000 and user_registration <= 20310101000000
GROUP BY char_length
ORDER BY accounts_with_this_length DESC;
| {"runningtime": "0.12", "resultsets": [{"headers": ["file", "actor_name"], "rowcount": 6}]} | jawiki_p |
Username lengths | username lengths | SELECT char_length(CONVERT (user_name USING UTF8MB4)) char_length, count(*) accounts_with_this_length
FROM user
WHERE user_registration >= 20170101000000 and user_registration <= 20310101000000
GROUP BY char_length
ORDER BY accounts_with_this_length DESC;
| {"runningtime": "0.26", "resultsets": [{"rowcount": 4, "headers": ["edits", "edits_per_day", "actor_name"]}, {"rowcount": 7, "headers": ["edits", "edits_per_day", "actor_name"]}]} | metawiki_p |
أكثر مقالات حسب عدد التعديلات | null | select page_title, count(*)
from page
inner join revision on rev_page = page_id
where page_namespace = 0
and page_is_redirect = 0
group by page_title
order by count(*) desc
limit 100; | {"runningtime": "0.57", "resultsets": [{"headers": ["pp_propname", "COUNT(pp_page)"], "rowcount": 32}, {"headers": ["page_id"], "rowcount": 257}]} | arwiki_p |
Most edited articles on yuewiki | null | SELECT page_title, COUNT(page_id) AS edits
FROM revision
JOIN page ON rev_page = page_id
WHERE page_is_redirect = 0 AND page_namespace = 0
GROUP BY page_id
ORDER BY edits DESC
LIMIT 10;
| {"runningtime": "136.95", "resultsets": [{"rowcount": 10, "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_... | zh_yuewiki_p |
most active Dagbani Wikipedia editors in the recent week | null | SELECT ROW_NUMBER() OVER (ORDER BY sl DESC) rank, actor_name, sl FROM
(SELECT actor_name, user_id, COUNT(*) sl FROM revision
JOIN actor ON rev_actor = actor_id
JOIN `user` ON actor_user = user_id
WHERE rev_timestamp > DATE_FORMAT(NOW() - INTERVAL 7 DAY, '%Y%m%d%H%i%s')
GROUP BY actor_name
) aaa
WHERE NOT EXISTS (SELECT... | {"runningtime": "124.56", "resultsets": [{"rowcount": 0, "headers": ["user_id", "user_registration", "user_editcount"]}]} | dagwiki_p |
All dag main namespace articles with their Qid if they have one | ckbwiki main namespace articles with their Qid. If the query works fine. | #dag
use dagwiki_p ;
# select wd.ips_item_id,ckbp.page_title from page as ckbp, wikidatawiki_p.wb_items_per_site as wd where ckbp.page_namespace=0 and kkbp.page_is_redirect = 0 and wd.ips_site_id="ckbwiki" and wd.ips_site_page=ckbp.page_title
select pp.pp_value as Qid, page_title as title from page
left join p... | {"runningtime": "24.96", "resultsets": [{"rowcount": 0, "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_ti... | dagwiki_p |
Files for Deletion Lint | null | select page.page_title,linter_cat,linter_params,count(*) as lint_count
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=4 and linter_cat = 4 and page.page_title like 'Files_for_d%'
and linter_params like '{"name":"i"%'
group by page.page_title,linter_cat,linter_params
having count(*)... | {"runningtime": "15.24", "resultsets": [{"rowcount": 1000, "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... | enwiki |
fawiki pages based on their deleted/supressed rev count | null | SELECT
page_namespace,
page_title,
COUNT(rev_id) deleted_or_suppressed_revs
FROM page
JOIN revision
ON rev_page = page_id
WHERE rev_deleted <> 0
GROUP BY rev_page
ORDER BY COUNT(rev_id) DESC | {"runningtime": "0.12", "resultsets": [{"rowcount": 4, "headers": ["file", "actor_name"]}]} | fawiki_p |
Empty | null | select *
from `user`
where 1
limit 1 | {"runningtime": "0.04", "resultsets": []} | ukwiki_p |
Zollwurfs Artikelanlagen aus Kategorie Inselgruppe | Siehe https://de.wikipedia.org/w/index.php?title=Wikipedia:Fragen_zur_Wikipedia&oldid=214959559#Eigene_Erstautor-Artikel_finden | WITH RECURSIVE Cat AS (SELECT page_title, page_id
FROM page
WHERE page_title = 'Inselgruppe'
AND page_namespace = 14
UNION
SELECT SubCat.page_title, SubCat.page_id
FROM page AS Su... | {"runningtime": "6.33", "resultsets": [{"rowcount": 4, "headers": ["concat (\"\u0646\u0642\u0627\u0634:\",page_title)"]}]} | dewiki_p |
mw reverted count for WPWPBN | জুলাই ২০২১ থেকে কার কত সম্পাদনা পুনর্বহাল/পূর্বাবস্থায় ফেরত এসেছে তার তালিকা। এখানে কেউ নিজের সম্পাদনা পূর্বাবস্থায় ফেরত আনলে সেটিও গণ্য হবে। | 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-reverted')
and rev_timestamp>="2021070100000"
-- and rev_timestamp like "20210822%"
GROUP BY user
ORDER BY cnt DESC... | {"runningtime": "4.74", "resultsets": [{"rowcount": 3146, "headers": ["file", "actor_name"]}]} | bnwiki |
Heavy thanks senders 2021 | Find thanks | select actor_name as sender, replace(log_title, '_', ' ') as receiver, log_timestamp as thank_timestamp
from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id
and log_action = 'thank'
and "20210101" <= log_timestamp
and log_timestamp <= "20211231"
and user_editcount < 2
... | {"runningtime": "324.59", "resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 10}, {"headers": ["page_title"], "rowcount": 1}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 0}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_t... | enwiki |
Heavy thanks senders 2018 | Find thanks | select actor_name as sender, count(log_timestamp) as thanks
from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id
and log_action = 'thank'
and "20180101" <= log_timestamp
and log_timestamp <= "20181231"
and user_editcount < 15
group by actor_name
order by thanks d... | {"runningtime": "16.71", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}, {"rowcount": 11449, "headers": ["page_title"]}]} | enwiki |
Heavy thanks sockmaster | Find thanks | select sender, thanks, created from
(select actor_name as sender, count(log_timestamp) as thanks, user_registration as created
from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id
and log_action = 'thank'
and "20190101" <= log_timestamp
and log_timestamp <= "20191231"
a... | {"runningtime": "0.28", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}, {"rowcount": 100, "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_... | enwiki |
Heavy thanks senders 2019 | Find thanks | select sender, thanks from (select actor_name as sender, count(log_timestamp) as thanks
from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id
and log_action = 'thank'
and "20190101" <= log_timestamp
and log_timestamp <= "20191231"
and user_editcount < 15
group by actor... | {"runningtime": "0.13", "resultsets": [{"rowcount": 3, "headers": ["page_title"]}, {"rowcount": 1, "headers": ["COUNT(page_title)"]}]} | enwiki |
Heavy thanks senders 2020 | Find thanks | select sender, thanks from (select actor_name as sender, count(log_timestamp) as thanks
from actor, user, logging_logindex where actor_id=log_actor and actor_user=user_id
and log_action = 'thank'
and "20200101" <= log_timestamp
and log_timestamp <= "20201231"
and user_editcount < 15
group by actor... | {"runningtime": "1.63", "resultsets": [{"headers": ["site_id", "site_global_key", "site_type", "site_group", "site_source", "site_language", "site_protocol", "site_domain", "site_data", "site_forward", "site_config"], "rowcount": 982}]} | enwiki |
Commons tabular data pages without talk pages | null | # Data namespace is 486, Data talk is 487
SELECT page.page_title
FROM page
WHERE page.page_namespace = 486
AND page.page_title LIKE '%.tab'
AND page.page_title NOT IN (SELECT page_title FROM page WHERE page_namespace = 487) | {"runningtime": "7.69", "resultsets": [{"headers": ["page"], "rowcount": 5000}]} | commonswiki_p |
Tool Labs metadata database | Content of the metadata database; see https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database#Metadata_database for more information. | SELECT * FROM wiki; | {"runningtime": "9.43", "resultsets": [{"rowcount": 1053, "headers": ["page_title", "log_timestamp", "comment_text", "actor_name"]}]} | meta_p |
Zollwurfs Artikelanlagen aus Kategorie Insel | null | WITH RECURSIVE Cat AS (SELECT page_title, page_id
FROM page
WHERE page_title = 'Inselgruppe'
AND page_namespace = 14
UNION
SELECT SubCat.page_title, SubCat.page_id
FROM page AS Su... | {"runningtime": "16.96", "resultsets": [{"headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"], "rowcount": 1000}]} | dewiki_p |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"runningtime": "0.13", "resultsets": [{"rowcount": 5, "headers": ["page_title"]}]} | enwiki |
bnwiki largest articles | null | use bnwiki_p;
SELECT page_title, page_len FROM page WHERE page_namespace=0 ORDER BY page_len DESC LIMIT 500; | {"runningtime": "0.09", "resultsets": [{"rowcount": 13, "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"]}]} | bnwiki |
trwiki:Unexisting links in articles within the scope of Vikiproje Felsefe | null | USE trwiki_p;
SELECT CONCAT("# [[",REPLACE(pl_title,"_"," "),"]]") AS sayfa, COUNT(pl_title) AS counting
FROM pagelinks, page_assessments
WHERE pl_from = pa_page_id
AND pa_project_id=264
AND pl_from_namespace = 0
AND pl_namespace = 0
AND NOT EXISTS
(SELECT p1.page_title FROM page p1
WHERE p1.page_title = pl_title
AND p... | {"runningtime": "0.18", "resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 50}]} | trwiki_p |
Total number of unique IPv4 editors | null | SELECT COUNT(*)
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE
actor_user IS NULL
AND actor_name LIKE "%.%.%.%"
GROUP BY actor_id | {"runningtime": "3.19", "resultsets": [{"rowcount": 1956, "headers": ["page_title"]}]} | enwiki_p |
Total number of unique IPv4 editors | null | SELECT COUNT(*)
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE
actor_user IS NULL
GROUP BY actor_id | {"connection_id": 3084729} | enwiki_p |
Most active users by articles/edits on plwiki | null | USE plwiki_p;
SELECT
CONCAT("#") AS number,
actor_user AS user_id,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS user_name,
COUNT(rev_id) AS user_editcount
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... | {"runningtime": "10.44", "resultsets": [{"rowcount": 43, "headers": ["pa_class", "COUNT(*)"]}]} | plwiki_p |
Most popular actors | List of pages with the most number of editors | SELECT
actor.actor_name AS actor_name,
COUNT(*) AS count
FROM revision LEFT JOIN actor ON (rev_actor = actor_id)
WHERE YEAR(rev_timestamp) = 2021 AND MONTH(rev_timestamp) = 8
GROUP BY actor_name
ORDER BY count DESC
LIMIT 10; | {"runningtime": "9.84", "resultsets": [{"rowcount": 184, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]} | viwiki_p |
Redirects on disambiguation pages on plwiki | https://pl.wikipedia.org/w/index.php?title=Wikipedia:Zadania_dla_bot%C3%B3w&oldid=64388086#Przekierowania
*** missing condition in WHERE clause: `p2.page_namespace = 0` *** | select
p1.page_title as "disambiguation",
p2.page_title as "redirect",
rd_title as "target",
rd_fragment as "fragment"
from pagelinks
inner join page as p1 on p1.page_id = pl_from
inner join page_props on p1.page_id = pp_page
inner join page as p2 on p2.page_title = pl_title
inner join redirec... | {"runningtime": "17.31", "resultsets": [{"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["tl_title"]}, {"rowcount": 6, "headers": ["page_title", "rev_timestamp"]}, {"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "head... | plwiki_p |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"runningtime": "304.78", "resultsets": [{"rowcount": 12, "headers": ["cl_to", "count_cl_to"]}, {"rowcount": 3, "headers": ["page_title"]}, {"rowcount": 7, "headers": ["tl_title", "count_tl_title"]}, {"rowcount": 0, "headers": ["page_title", "pl_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "hea... | enwiki |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND (log_action = 'approve' OR log_action = 'revert')
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_a... | {"runningtime": "107.89", "resultsets": [{"rowcount": 1, "headers": ["pages_with_disambig_but_not_redir"]}, {"rowcount": 987, "headers": ["user_id", "user_name", "user_articles", "user_latestcreation"]}]} | enwiki |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"runningtime": "1635.98", "resultsets": [{"rowcount": 86, "headers": ["tl_title"]}]} | enwiki |
Admins by recent unblocks | null | SELECT actor_name,
Count(rc_id)
FROM recentchanges
JOIN actor
ON rc_actor = actor_id
WHERE rc_log_action = 'unblock'
GROUP BY actor_name
ORDER BY Count(rc_id) DESC; | {"runningtime": "65.36", "resultsets": [{"rowcount": 1160, "headers": ["page_id", "page_title", "page_len", "First revision", "Latest revision"]}]} | enwiki |
Why unblocks happen | null | SELECT actor_name,
rc_title,
comment_text
FROM recentchanges_userindex
JOIN actor
ON rc_actor = actor_id
JOIN comment
ON comment_text = rc_comment_id
WHERE rc_log_action = 'unblock'; | {"runningtime": "0.66", "resultsets": [{"headers": ["pp_propname", "COUNT(pp_page)"], "rowcount": 32}, {"headers": ["page_title"], "rowcount": 264}]} | enwiki |
CSD deletion by bnwiki Admin | null | use bnwiki_p;
SELECT actor_name, count(actor_name) as deletions
FROM logging_userindex
JOIN actor_logging ON log_actor=actor_id
JOIN comment_logging ON comment_id=log_comment_id
WHERE log_type = 'delete'
AND log_action = 'delete'
AND (comment_text LIKE '%WP:CSD%'
or comment_text LIKE '%Wikipedia:CSD%')
g... | {"runningtime": "1.03", "resultsets": [{"rowcount": 460, "headers": ["page_title"]}]} | bnwiki |
Number of locks for Spam-only and others | null | USE metawiki_p;
SELECT
SUBSTR(log_timestamp, 1, 6) AS Month,
COUNT(log_id) AS Locks
FROM logging JOIN comment ON log_comment_id = comment_id
WHERE log_timestamp > '20190000'
AND log_action = 'setstatus'
AND comment_text = 'Spam-only account: spambot'
GROUP BY Month;
SELECT
SUBSTR(log_timestamp, 1, 6) AS Month,
... | {"runningtime": "0.22", "resultsets": [{"rowcount": 6, "headers": ["page_title"]}]} | metawiki_p |
DE Wiki Content Query | null | select * from page join revision on page_id=rev_page join user on user_id=rev_actor where page_latest=rev_id limit 10000; | {"runningtime": "222.22", "resultsets": [{"rowcount": 20, "headers": ["el_to", "num_pages"]}]} | dewiki_p |
Tulu Wiki board voter's list tentative | null | select user_id, user_name, user_editcount from user where user_editcount >300 order by user_editcount desc;
| {"runningtime": "102.93", "resultsets": [{"rowcount": 20, "headers": ["title", "title_length"]}]} | tcywiki |
bnwiki article without wikilink | mlwiki article without wikilink | USE mlwiki_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; | {"runningtime": "24.65", "resultsets": [{"rowcount": 7, "headers": ["dow", "edits"]}]} | mlwiki |
Pages that don't have bn label in wikidata | Pages that don't have Ml label in wikidata | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lml", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='mlwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"runningtime": "46.34", "resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 271}]} | wikidatawiki |
البحث عن مقالات ملخص تعديل معين | null | use arwiki_p;
SELECT page_id, rev_id, comment_text
FROM revision_userindex
INNER JOIN page ON rev_page = page_id
INNER JOIN actor ON rev_actor = actor.actor_id
INNER JOIN comment ON comment_id = rev_comment_id
WHERE rev_timestamp between 20210101000000 and 20211231000000
AND page_namespace = 0
... | {"runningtime": "1.50", "resultsets": [{"rowcount": 5, "headers": ["title", "page_len"]}]} | arwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.