title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
edo - nlwiki_p Anonymous edits rc_patrolled summary | forked from Bdijkstra - show all unpatrolled edits for the last weeks by day/user/lemma | USE nlwiki_p;
# anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION... | {"runningtime": "0.10", "resultsets": [{"rowcount": 0, "headers": ["locked_page", "occurrences"]}]} | nlwiki |
Most edited wikiquote articles for last year interval | null | # Most edited visual arts articles
SELECT article.page_title, COUNT(*)
FROM page AS article
INNER JOIN page AS talk on article.page_title = talk.page_title
INNER JOIN templatelinks
ON tl_from = talk.page_id
INNER JOIN revision ON rev_page = article.page_id
WHERE rev_timestamp > (NOW() - INTERVAL 365 DAY)
AND article.... | {"runningtime": "0.69", "resultsets": [{"rowcount": 300, "headers": ["namespace", "protected_page", "occurrences", "latest_occurence"]}]} | enwikiquote |
Most edited wikiquote articles for last year interval | null | # users with 5 or more unreviewed articles
SELECT rev_actor, actor_name, COUNT(rev_id) articles
FROM revision
JOIN pagetriage_page ON rev_page = ptrp_page_id
JOIN page ON page_id = rev_page
JOIN actor ON rev_actor = actor_id
WHERE rev_parent_id = 0
AND ptrp_reviewed = 0
#AND ptrp_reviewed_updated = 1
AND page_namesp... | {"runningtime": "0.57", "resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]} | enwiki |
অনুপস্থিত ও অন্তর্ভুক্ত | null | select concat("পাতা:", b.tl_title)
from page a
join templatelinks b
on b.tl_from = a.page_id
where a.page_namespace = 0
and b.tl_namespace=104
and b.tl_title not in (
select page_title
from page
where page_namespace = 104
); | {"runningtime": "0.11", "resultsets": [{"rowcount": 30, "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"]}]} | bnwikisource_p |
coloblocks | null | SELECT COUNT(ipb_id) as "blocks", actor.actor_name
FROM ipblocks
JOIN comment ON (ipblocks.ipb_reason_id = comment.comment_id)
JOIN actor ON (ipblocks.ipb_by_actor = actor.actor_id)
WHERE
comment.comment_text REGEXP '{{(colocationwebhost|webhostblock|blocked proxy)}}'
GROUP BY actor.actor_id
ORDER BY blocks DESC | {"runningtime": "0.05", "resultsets": [{"rowcount": 0, "headers": ["pp_value", "page_title", "rev_timestamp", "MIN(revision.rev_id)", "edits"]}]} | enwiki_p |
Recent contributors to Translate namespace at mediawikiwiki | Adapted from https://quarry.wmflabs.org/query/37059 | SELECT
actor_name as user,
substring_index(page_title, '/', -1) AS language,
count(*) AS no_translations,
CONCAT("https://www.mediawiki.org/wiki/Special:Contributions/",actor_name) AS Usercontribs
FROM
page
LEFT JOIN
-- Take only the latest revision of each translation to simplify
revision ON (page_id = rev_p... | {"runningtime": "0.22", "resultsets": [{"rowcount": 6, "headers": ["edits", "edits_per_day", "actor_name"]}, {"rowcount": 8, "headers": ["edits", "edits_per_day", "actor_name"]}]} | mediawikiwiki_p |
Page deletion on ta.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "delete"
AND log_action = "delete"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "0.50", "resultsets": [{"headers": ["pp_value", "page_title", "rev_timestamp", "MIN(revision.rev_id)", "edits", "page_len", "page_restrictions"], "rowcount": 110}]} | tawiki_p |
Page protection on ta.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "protect"
AND log_action = "protect"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "0.28", "resultsets": [{"rowcount": 49, "headers": ["pp_value", "page_title", "rev_timestamp", "MIN(revision.rev_id)", "edits", "page_len", "page_restrictions"]}]} | tawiki_p |
Patrolling on ta.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "patrol"
AND log_action = "patrol"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["filelist"]}]} | tawiki_p |
Deletions on uk.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "delete"
AND log_action = "delete"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "1.63", "resultsets": [{"rowcount": 878, "headers": ["File", "img_timestamp", "actor_name"]}]} | ukwiki_p |
Protections on uk.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "protect"
AND log_action = "protect"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "1.34", "resultsets": [{"headers": ["page_title"], "rowcount": 486}]} | ukwiki_p |
Blocks on uk.wiki | null | SELECT actor_name, COUNT(actor_name) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "patrol"
AND log_action = "patrol"
and log_timestamp > 20210101000000
GROUP BY actor_name
ORDER BY COUNT(actor_name) DESC | {"runningtime": "0.62", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | ukwiki_p |
Deletion summaries on uk.wiki | null | SELECT comment_text, COUNT(*) FROM logging
INNER JOIN comment ON logging.log_comment_id = comment.comment_id
WHERE log_type = "delete"
AND log_action = "delete"
and log_timestamp > 20210101000000
GROUP BY comment_text
ORDER BY COUNT(*) DESC | {"runningtime": "0.33", "resultsets": [{"rowcount": 135, "headers": ["page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | ukwiki_p |
Links to nli.org.il in hewiki | null | SELECT DISTINCT ?item ?itemLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
{
SELECT DISTINCT ?item WHERE {
?item p:P949 ?statement0.
?statement0 (ps:P949) _:anyValueP949.
MINUS {
?item p:P8189 ?statement1.
?statement1 (ps:P8189) _:a... | {"runningtime": "1.36", "resultsets": [{"rowcount": 297, "headers": ["page_title"]}]} | hewiki |
Huggle usage (enwiki) | null | SELECT COUNT(*) FROM change_tag
INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_tag_def.ctd_id
INNER JOIN revision ON change_tag.ct_rev_id = revision.rev_id
WHERE change_tag_def.ctd_name = "huggle"
AND revision.rev_timestamp > 20210101000000 | {"runningtime": "0.23", "resultsets": [{"rowcount": 84, "headers": ["page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | enwiki_p |
Huggle usage | null | SELECT COUNT(*) FROM recentchanges
INNER JOIN comment ON recentchanges.rc_comment_id = comment.comment_id
AND comment_text LIKE "%HG]])%" | {"runningtime": "1.01", "resultsets": [{"headers": ["declined_then_deleted", "actor_name"], "rowcount": 33}]} | arwiki_p |
Number of editors on German Wikipedia with at least 1 edit | null | USE dewiki_p;
SELECT COUNT(user_editcount)
FROM user
WHERE user_editcount >= 1 | {"runningtime": "4.06", "resultsets": [{"rowcount": 100, "headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"]}]} | dewiki_p |
আন্তঃউইকিহীন | null | /* SELECT ips_item_id, ips_site_page
FROM wb_items_per_site
WHERE ips_site_id = 'bnwiki'
*/
SELECT ips_item_id FROM
(SELECT
ips_item_id,
ips_site_id,
COUNT(ips_site_id) as cnt
FROM wb_items_per_site
GROUP BY ips_item_id
HAVING cnt = 1
AND ips_site_id = 'bnwiki') d
ORDER BY ips_item_id DESC; | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "... | wikidatawiki |
Commons random cat | null | #USE commonswiki_p;
SELECT page_title
FROM page AS page
WHERE page_namespace =0
AND page_is_redirect = 0
#AND page_title LIKE "K%"
#cat_title LIKE '%by_quantity%'
#AND cat_title NOT LIKE "Images_from_the_Geograph_British_Isles_project_needing_categories%"
#(cat_title LIKE '%don%require%'
# OR cat_title LIKE ... | {"runningtime": "172.62", "resultsets": [{"rowcount": 596, "headers": ["page_title"]}]} | commonswiki_p |
Comment search recent | null | -- SET STATEMENT max_statement_time = 90 FOR
SELECT DISTINCT
actor_name,
rc_this_oldid,
comment_text
FROM
recentchanges_userindex AS 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... | {"runningtime": "8.24", "resultsets": [{"rowcount": 1, "headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]} | enwiki |
Bnwiki active user list | null | USE bnwiki_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = bn.wikipedia.org }}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN ('0','1','2','3','4... | {"runningtime": "0.81", "resultsets": [{"rowcount": 295, "headers": ["page_title"]}]} | bnwiki_p |
top rollbacker | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-rollback')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"runningtime": "9.02", "resultsets": [{"rowcount": 5098, "headers": ["wbit_item_id", "wbxl_language", "wbtl_type_id", "wbx_text"]}]} | bnwiki |
Bnwiki active user list | null | USE bnwiki_p;
SELECT
CONCAT("# {{#target:",actor_name,"}}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN ('0','1','2','3','4')
AND rev_timestamp BETWEEN 20... | {"runningtime": "5.82", "resultsets": [{"rowcount": 3364, "headers": ["wbit_item_id", "wbxl_language", "wbtl_type_id", "wbx_text"]}]} | bnwiki_p |
Cross-namespace redirects | [[WP:R2]] candidates. | SELECT p.page_id FROM page p
JOIN redirect r ON r.rd_from = p.page_id
WHERE p.page_namespace = 0
AND r.rd_namespace NOT IN (0, #Article
14, # Category
10, # Template
4, # Wikipedia
5, # Wikipedia talk - see Wikip... | {"runningtime": "14.58", "resultsets": [{"rowcount": 8755, "headers": ["wbit_item_id", "wbxl_language", "wbtl_type_id", "wbx_text"]}]} | bnwiki_p |
Empty maintenance categories (arwiki) | null | #USE enwiki_p;
SELECT distinct CONCAT('# [[:Category:',page_title,']]') AS page_title, str_to_date(rev_timestamp, '%Y%m%d%H%i%s') AS rev_timestamp
FROM categorylinks
RIGHT JOIN page
ON cl_to = page_title
JOIN revision
ON rev_page = page_id
WHERE page_namespace = 14
AND rev_parent_id = 0
AND cl_to IS NULL
AND page_title... | {"runningtime": "0.10", "resultsets": [{"headers": ["actor_name", "count(distinct page_title)"], "rowcount": 1}]} | enwiki |
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.06", "resultsets": [{"rowcount": 0, "headers": ["page_title", "page_id"]}]} | bnwiki_p |
Count of Commons featured pictures by uploader | null | select actor_name, count(img_name) as img_count
from image
join actor on img_actor = actor_id
join page on img_name = page_title
join categorylinks on page_id = cl_from
where cl_to = 'Featured_pictures_on_Wikimedia_Commons'
group by actor_name; | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["cat_title"]}]} | commonswiki_p |
pipes in redirects.... maybe | null | select * from redirect where rd_namespace=0 and rd_title like "%|%"; | {"runningtime": "0.11", "resultsets": [{"rowcount": 11, "headers": ["page_title", "tl", "rd_namespace", "rd_title"]}]} | enwiki |
newcomer tasks | null | SELECT
-- DISTINCT actor_name, user_registration
COUNT(DISTINCT actor_name)
FROM
-- revision_userindex AS revision
-- INNER JOIN change_tag ON revision.rev_id = change_tag.ct_rev_id
-- INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_tag_def.ctd_id
-- INNER JOIN actor_revision AS actor ON revision... | {"runningtime": "15.02", "resultsets": [{"headers": ["without category"], "rowcount": 1}, {"headers": ["page_title", "tl", "pl", "rdns", "rd_title"], "rowcount": 11}, {"headers": ["page_title", "tl", "pl", "rdns", "rd_title", "rd_interwiki", "rd_fragment"], "rowcount": 1}, {"headers": ["page_title", "tl", "pl", "rdns",... | enwiki_p |
Pages ending in : | null | /*Select * from page where page_title RLIKE '(\\]|\\}|\\>|\\:|\\.|\\,|\\'|\\"|\\|\\?|\\–|\\—|\\?|\\…|\\!|\\?|\\-|\\?|\\;|\\/|\\\|\\&|\\*|\\^|\\%|\||\\$|\\#|\\@|\\™)$' LIMIT 10;*/
Select * from page where page_namespace = 0 AND page_title RLIKE '\:$' LIMIT 10; | {"runningtime": "1.56", "resultsets": [{"rowcount": 222, "headers": ["page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | enwiki |
APPERBot ohne Bios | null | SELECT CONCAT('[{{fullurl:', REPLACE(page_title, '_', ' '), '|diff=prev&oldid=', rev_id, '}} ', REPLACE(page_title, '_', ' '), ']') AS Artikel, comment_text AS "Kommentar"
FROM page, revision_userindex, actor, comment
WHERE page_namespace = 0
AND page_id = rev_page
AND page_title NOT LIKE 'Liste_der_Biografien... | {"runningtime": "0.32", "resultsets": [{"rowcount": 100, "headers": ["namespace", "title", "last_editor", "last_edit_summary", "last_edit_timestamp"]}]} | dewiki_p |
Jeeputer - fawiki New pages created using content translation in 2021 | All publishings from Content translation tool, repeat publishings are not counted, first time overwriting is counted | select
concat(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2),"-",substr(rev_timestamp,7,2)) as Date_time,
actor_name as User,
page_title, rev_len
from
change_tag,
change_tag_def,
revision,
page,
actor
where
ct_tag_id = ctd_id
and rev_id = ct_rev_id
and page_id = rev_page
and page_namesp... | {"runningtime": "668.24", "resultsets": [{"rowcount": 6, "headers": ["term_type", "term_language", "terms"]}]} | enwikiquote_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": "7.43", "resultsets": [{"rowcount": 3498, "headers": ["ip16", "c"]}]} | enwiki |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding 19 oktober 2021 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"runningtime": "20.79", "resultsets": [{"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["tl_title"]}, {"rowcount": 0, "headers": ["page_title", "rev_timestamp"]}, {"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "head... | nlwiki_p |
Fawiki election 2021 | null | use fawiki_p;
select
user_id,
user_name
from user
join actor
on actor_user = user_id
join
(
select rev_actor
from revision_userindex
join page
on page_id = rev_page
where
page_namespace = 0
and rev_timestamp > '20201018000000' -- last 12 months leading to nomination start date
and rev_tim... | {"runningtime": "9.54", "resultsets": [{"headers": ["wbit_item_id", "wbxl_language", "wbtl_type_id", "wbx_text"], "rowcount": 5098}]} | fawiki_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.22", "resultsets": [{"headers": ["file", "actor_name"], "rowcount": 67}]} | enwiki |
Time between page creation and first flag event (for certain user) | Should count deleted pages... not sure | USE ukwiki_p;
SELECT tbl0.fr_rev_id, tbl5.rev_timestamp as 'First edit', tbl0.fr_timestamp as 'First patrol', TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) as 'Time diff', tbl0.fr_timestamp, page.page_title
FROM flaggedrevs tbl0
INNER JOIN (
SELECT fr_page_id, fr_rev_id
FROM flaggedrevs
LEFT JOIN u... | {"runningtime": "0.81", "resultsets": [{"rowcount": 200, "headers": ["rev_user_text", "recent_user_editcount"]}]} | ukwiki_p |
Hewiki possible disambiguations | null | # select concat(page, "{{כ}} ([[", disambig, "]])") from
select concat(page, "{{כ}} (", lists, ")") from
(select page, count(disambig1) as counter, group_concat(disambig1) as lists from
(select distinct concat('[[', disambig, ']]') as disambig1, page, ns from
((select concat('# [[', case p1.page_namespace when 0 then ... | {"runningtime": "801.06", "resultsets": [{"rowcount": 2394, "headers": ["Datei", "GROUP_CONCAT(CONCAT('https://de.wikipedia.org/w/index.php?curid=', gil_page) SEPARATOR '<br />')"]}]} | hewiki_p |
Fastest patrol | null | USE ukwiki_p;
SELECT tbl0.fr_rev_id, tbl5.rev_timestamp as 'First edit', tbl0.fr_timestamp as 'First patrol', TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) as 'Time diff', tbl0.fr_timestamp, page.page_title
FROM flaggedrevs tbl0
INNER JOIN (
SELECT fr_page_id, MIN(fr_rev_id) as fr_rev_id
FROM flagged... | {"runningtime": "2.69", "resultsets": [{"rowcount": 141, "headers": ["user", "cnt"]}]} | ukwiki_p |
Time between page creation and first flag event (for certain user) | Deleted pages are not in the table. | USE ukwiki_p;
alter session set NLS_DATE_FORMAT ='YYYY-MM-DD HH24:MI:SS';
SELECT tbl0.fr_rev_id, tbl5.rev_timestamp as 'First edit', tbl0.fr_timestamp as 'First patrol', TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) as 'Time diff', tbl0.fr_timestamp, page.page_title
FROM flaggedrevs tbl0
INNER JOIN (
S... | {"runningtime": "1.26", "resultsets": [{"rowcount": 84, "headers": ["rank", "reviews", "username", "re-reviews", "accept", "decline", "reject", "comment", "accept %", "decline %", "reject %", "comment %"]}]} | ukwiki_p |
IDWIKI stats | null | select page_title,page_len from page order by page_len desc; | {"runningtime": "1.39", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | idwiki |
Fawiki election 2021 | null | use fawiki_p;
select
user_id,
user_name
from user
join actor
on actor_user = user_id
join
(
select rev_actor
from revision_userindex
join page
on page_id = rev_page
where
page_namespace = 0
and rev_timestamp > '20201018000000' -- last 12 months leading to nomination start date
and rev_tim... | {"runningtime": "0.35", "resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_... | fawiki_p |
Kategorie:Squashturnier mit Vorlage:Tennisturnier_Zeichenerklärung | Siehe https://de.wikipedia.org/w/index.php?title=Wikipedia:Bots/Anfragen&oldid=216549435#Ersetzung_Vorlage | WITH RECURSIVE Cat AS (SELECT page_title
FROM page
WHERE page_title = 'Squashturnier'
AND page_namespace = 14
UNION
SELECT SubCat.page_title
FROM page AS SubCat, categorylin... | {"runningtime": "7.60", "resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | dewiki_p |
Authors of articles by category [Austria] | null | SELECT DISTINCT A.actor_name, COUNT(1) as articles
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.page P2 ON P1.page_title = P2.page_title
JOIN ukwiki_p.categorylinks CL ON P2.page_id = CL.cl_from
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
A... | {"runningtime": "7.47", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | ukwiki_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": "2.66", "resultsets": [{"rowcount": 4, "headers": ["rc_patrolled", "count"]}, {"rowcount": 10, "headers": ["user", "unpatrolled"]}, {"rowcount": 31, "headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"]}, {"rowcount": 4, "headers": ["rc_namespace", "unpatrolled"]}, {"rowcount... | enwiki |
Count abuse filters | null | SELECT COUNT(*) FROM abuse_filter
WHERE af_timestamp > 20201022000000 | {"runningtime": "487.65", "resultsets": [{"headers": ["rev_user_text", "recent_user_editcount"], "rowcount": 300}]} | tawiki_p |
Commons signatures without built-in translation | null | SELECT user_name, up_value, max(rev_timestamp) as `last edit`, user_editcount
FROM user_properties
JOIN `user` ON up_user = user_id
JOIN actor_revision ON up_user = actor_user
JOIN revision_userindex ON rev_actor = actor_id
WHERE
up_property = "nickname"
AND up_user IN (SELECT up_user
FROM user... | {"runningtime": "1337.05", "resultsets": [{"rowcount": 59, "headers": ["tl_title"]}]} | commonswiki_p |
Thanked in 2021 | Thanks received in 2021 | USE enwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"runningtime": "12.60", "resultsets": [{"rowcount": 8142, "headers": ["page_title"]}]} | enwiki_p |
asnblock query test | null | SELECT ipb_expiry
FROM ipblocks_ipindex
WHERE
ipb_range_start LIKE "B935%"
AND ipb_range_start <= "B9356400"
AND ipb_range_end >= "B93567FF"
AND ipb_sitewide = 1
AND ipb_auto = 0 | {"runningtime": "215.74", "resultsets": [{"headers": ["MID", "P6243", "QID", "CONCAT(\"File:\",page_title)"], "rowcount": 6123}]} | enwiki_p |
count global blocks & locks | null | SELECT COUNT(*) as `current global blocks`
FROM globalblocks;
SELECT COUNT(*) as `current global locks`
FROM globaluser
WHERE gu_locked = 1; | {"runningtime": "0.11", "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": 10}]} | centralauth_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding 23 oktober 2021 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"runningtime": "0.17", "resultsets": [{"headers": ["page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 57}]} | nlwiki_p |
Time between page creation and first flag event (for certain user) | Should count deleted pages... not sure | USE ukwiki_p;
SELECT tbl0.fr_rev_id, tbl5.rev_timestamp as 'First edit', tbl0.fr_timestamp as 'First patrol', TIMESTAMPDIFF(SECOND, tbl5.rev_timestamp, tbl0.fr_timestamp) as 'Time diff', tbl0.fr_timestamp, page.page_title
FROM flaggedrevs tbl0
INNER JOIN (
SELECT fr_page_id, fr_rev_id
FROM flaggedrevs
LEFT JOIN u... | {"runningtime": "0.91", "resultsets": [{"headers": ["CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), ']]')"], "rowcount": 378}]} | ukwiki_p |
Last 26,000 revisions to WP:AFC/recent | null | SELECT revision.rev_timestamp, comment.comment_text
FROM revision
INNER JOIN comment ON revision.rev_comment_id = comment.comment_id
WHERE revision.rev_page = 21063913
ORDER BY revision.rev_timestamp DESC
LIMIT 26000 | {"runningtime": "9.47", "resultsets": [{"rowcount": 3771, "headers": ["page_title"]}]} | enwiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding, 24 oktober 2021 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}]} | nlwiki_p |
Users with most edits in the past month with bots and IPs filtered | List of a user's edit times. | WITH groups AS (
SELECT ug_user, GROUP_CONCAT(ug_group) AS memberships
FROM user_groups
GROUP BY ug_user)
SELECT
actor.actor_name AS thành_viên,
memberships AS nhóm,
COUNT(rev_id) AS lần_sửa_đổi
FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id)
LEFT JOIN groups ON (actor.actor_user ... | {"runningtime": "2.23", "resultsets": [{"rowcount": 72, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]} | viwiki_p |
Users with potentially obfuscated phallic user names | null | select
cast(user_name as char),
cast(user_registration as datetime)
from
user
where
(
cast(user_name as char) like "%Plenis%"
or cast(user_name as char) like "%plenis%"
); | {"runningtime": "0.60", "resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 49}]} | enwiki_p |
Unblocked users who may have obfuscated phallic user names | null | #set statement max_statement_time = 5 for
select
user_name,
cast(user_registration as datetime)
from
ipblocks
right join user on user_id = ipb_user
where
ipb_user is null
and cast(user_name as char) like "%plenis%"; | {"runningtime": "0.47", "resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 100}]} | enwiki_p |
count user reverted edits | null | SELECT COUNT(*)
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
JOIN change_tag ON ct_rev_id = rev_id
WHERE
actor_name = "AntiCompositeNumber"
AND ct_tag_id = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = "mw-reverted") | {"runningtime": "6.64", "resultsets": [{"rowcount": 4013, "headers": ["rank", "actor_name", "sl"]}]} | enwiki_p |
concat sample | null |
select concat("https://en.wikipedia.org/user/", rev_actor,"&page=", rev_page) AS invalid_links from revision limit 10; | {"runningtime": "198.53", "resultsets": [{"headers": ["page_title"], "rowcount": 116749}]} | enwiki_p |
zhwiki users lookup | null | SELECT user_id, user_name, user_registration, user_editcount FROM user
WHERE user_editcount BETWEEN 1 AND 5
AND user_registration BETWEEN 20210920000000 AND 20210927000000; | {"runningtime": "0.23", "resultsets": [{"rowcount": 27, "headers": ["img_name", "img_height", "img_width", "size"]}]} | zhwiki_p |
Links to Draft: from mainspace | Links from mainspace to draft.
This excludes links links that 1) are to the same title (such as from [[!Kung mythology]] to [[Draft:!Kung mythology]]) and 2) the mainspace page transcludes {{R with possibilities}}, which always creates a link to the page's title in draftspace even though it usually doesn't display it.... | SELECT COUNT(*),
CONCAT('Draft:', pl_title) AS title,
NOT EXISTS (SELECT 1
FROM page
WHERE page_namespace = 118
AND page_title = pl_title)
AS 'Draft is redlink'
FROM pagelinks
JOIN page ON page_id = pl_from
WHERE pl_from_namespace = 0
A... | {"runningtime": "1.09", "resultsets": [{"rowcount": 157, "headers": ["tl_namespace", "tl_title", "COUNT(*)"]}]} | enwiki_p |
Most edited pages past month | null | SELECT rc_title, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
GROUP BY 1 ORDER BY 2 DESC
LIMIT 250 | {"runningtime": "0.38", "resultsets": [{"rowcount": 72, "headers": ["page_title"]}]} | nowiki_p |
Edits and users with certain edit summary | null | SELECT page_title, actor_name, r2.rev_timestamp, 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 comment_text LIK... | {"runningtime": "3.99", "resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 15}]} | nowiki_p |
Edit counts past month | null | select actor_name, count(*) as edits from revision
join actor on actor_id = rev_actor
where rev_timestamp > date_format(now() - interval 1 month, '%Y%m%d%H%i%s')
group by rev_actor order by edits desc
limit 100; | {"runningtime": "2.82", "resultsets": [{"rowcount": 802, "headers": ["file", "actor_name"]}]} | nowiki_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": "0.19", "resultsets": [{"headers": ["cat"], "rowcount": 1}]} | dewiki_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": "14.68", "resultsets": [{"rowcount": 1000, "headers": ["main_domain", "total_count"]}]} | dewiki_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 like "%روسيا_البيضاء%")
and page_title not like "%/%" | {"runningtime": "0.44", "resultsets": [{"rowcount": 13, "headers": ["Title", "user", "comment"]}]} | arwiki |
mw reverted count (last 2 month) | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-reverted')
and rev_timestamp>="2021102000000"
and rev_timestamp <= "20211027235959"
GROUP BY user
ORDER BY cnt DESC | {"runningtime": "0.34", "resultsets": [{"rowcount": 165, "headers": ["cl_from", "page_title", "cl_to"]}]} | fawiki |
Commons signatures without built-in translation | null | SELECT CONCAT("[[User talk:", user_name, "]]") as `user`, up_value as `signature`, max(rev_timestamp) as `last edit`
FROM user_properties
JOIN `user` ON up_user = user_id
JOIN actor_revision ON up_user = actor_user
JOIN revision_userindex ON rev_actor = actor_id
WHERE
up_property = "nickname"
AND up_user IN (SELEC... | {"runningtime": "0.09", "resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 11}]} | commonswiki_p |
Malayalam Wikidata stats temp | null | use wikidatawiki_p;
SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text... | {"runningtime": "0.38", "resultsets": [{"rowcount": 28, "headers": ["actor_name", "countt"]}]} | wikidatawiki |
enwikisource registered users per year | null | select count(*),substr(user_registration,1,4) as reg_y from user GROUP BY reg_y
UNION (select count(*), "total" as reg_y from user); | {"runningtime": "7.60", "resultsets": [{"rowcount": 1789, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted"... | enwikisource_p |
One million Malayalam labels | One million Malayalam labels is a event organised by WikiProject Kerala to add and improve Malayalam labels in Wikidata. | SELECT current_date;
SELECT actor_name as Username, COUNT(*) as Number_of_labels_added
FROM (
SELECT actor_name,
rc_title, comment_text
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor
WHERE (comment_text LIKE '%wb... | {"connection_id": 22764332} | wikidatawiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-australia | 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 ... | {"runningtime": "0.27", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-bolivia | 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 ... | {"runningtime": "5.04", "resultsets": [{"rowcount": 16, "headers": ["actor_name", "countt"]}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-chile | 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 ... | {"runningtime": "0.11", "resultsets": [{"rowcount": 9, "headers": ["actor_name", "countt"]}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-colombia | 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 ... | {"runningtime": "2.55", "resultsets": [{"rowcount": 141, "headers": ["user", "cnt"]}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-irland | 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 ... | {"runningtime": "13.65", "resultsets": [{"rowcount": 1000, "headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"]}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-norway | 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 ... | {"runningtime": "0.06", "resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 0}]} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-serbia | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"runningtime": "0.16", "resultsets": [{"rowcount": 13, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}, {"rowcount": 16, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}]} | commonswiki_p |
Count draft MfDs | null | SELECT COUNT(page_title)
FROM page
WHERE page_title LIKE 'Miscellany_for_deletion/%'; | {"runningtime": "0.29", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | enwiki_p |
WikiProject India - Tag & Assess 2021 - Results | This query needs to be re-run, and you are seeing result from an old run | SELECT actor_name, count(DISTINCT page_id)
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 ('AshLin', 'DaxServer',... | {"runningtime": "0.50", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]} | enwiki_p |
Статті КСВП 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM ukwiki_p.revision R
JOIN ukwiki_p.comment C ON R.rev_comment_id=C.comment_id
JOIN ukwiki_p.page P ON R.rev_page=P.page_id
JOIN ukwiki_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 20211005000000
AND C.commen... | {"runningtime": "0.08", "resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | ukwiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-elsalvador | 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 ... | {"runningtime": "0.46", "resultsets": [{"rowcount": 29, "headers": ["actor_name", "countt"]}]} | commonswiki_p |
Unsourced Tambayan Philippines pages | If you happened to click on the "Importance" column, this will sort things improperly. Refresh the page to restore the original (and correct) sort order. | SELECT
REPLACE(p1.`page_title`, "_", " ") AS `Page`,
DATE_FORMAT(`rev_timestamp`, "%Y-%m-%d %H:%i:%s") AS `Last edit`,
`actor_name` AS `Last editor`,
`page_len` AS `Length`,
CONCAT(CASE `t_importance`
WHEN "Unknown-importance_Philippine-related_articles" THEN 1
WHEN "Low-importance... | {"runningtime": "3.78", "resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 15}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 3}, {"headers"... | enwiki_p |
nlwiki Education program remnants | null | SELECT page_id, page_namespace, page_title FROM page WHERE page_namespace IN (446,447);
SELECT * FROM pagelinks WHERE pl_namespace IN (446,447);
SELECT * FROM pagelinks WHERE pl_from_namespace IN (446,447);
SELECT cl_from, cl_to, cl_sortkey_prefix FROM categorylinks, page WHERE page_id=cl_from AND page_namespace IN (44... | {"runningtime": "0.15", "resultsets": [{"headers": ["img_name", "img_height", "img_width", "size"], "rowcount": 32}]} | nlwiki |
WikiDaheim users 2021 (by first revision, by uploader, in prejury) | Uploads by users for WikiDaheim 2021 (only first revisions) | SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count_for_prejury
FROM actor, revision, image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND actor.actor_id = revision.rev_actor
AND image.img_name = page.page_title
and revision.rev_page = ... | {"runningtime": "21.63", "resultsets": [{"rowcount": 1, "headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}]} | commonswiki_p |
Wistalk2 | Fork this query, change "idwiki" with target's Wikipedia language (e.g : "enwiki"), change the @target variable with the target's username, then run it.
See full list of all possible databases here : https://quarry.wmflabs.org/query/4031 | set @target = "Zaar Dinn";
SELECT user_name,
CONCAT(substr(user_registration,1,4),"-",substr(user_registration,5,2), "-",substr(user_registration,7,2)) AS 'sejak',
user_editcount AS 'edit count',
CONCAT(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2), "-",substr(rev_timestamp,7,2)," ",substr(rev_timestamp,9... | {"resultsets": [{"headers": ["Szerkeszt\u0151", "WPWPHU"], "rowcount": 6}], "runningtime": "2.34"} | idwiki |
Project Userbox Lint | null | select page.page_title,linter.*
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=4 and linter_cat=2 and page.page_title like 'Userboxes%' and page.page_title not like '%straw%'
order by page.page_title, linter.linter_id | {"resultsets": [{"rowcount": 1884, "headers": ["sayfa", "counting"]}], "runningtime": "5.81"} | enwiki |
Empty categories linking to redlinked templates | null | select concat("Category:",page_title) from templatelinks join page on page_id=tl_from join category on cat_title=page_title
where tl_namespace=10 and tl_title="Possibly_empty_category" and tl_from_namespace=14 and cat_pages=0
and exists (select 1 from pagelinks where pl_from=page_id and pl_namespace=10
and... | {"runningtime": "0.58", "resultsets": [{"rowcount": 32, "headers": ["actor_name", "countt"]}]} | enwiki_p |
Categories created by bots | null | select page_title,actor_name from page
join revision_userindex on rev_page=page_id
join actor_revision on actor_id=rev_actor where page_namespace=14 and rev_parent_id=0
and LOWER(actor_name) not like "%bot%"
-- and actor_name not in ("EarwigBot V","EarwigBot","Cydebot","JJMC89 bot III","BHGbot",
-- ... | {"resultsets": [{"headers": ["Tables_in_eswiki_p"], "rowcount": 92}], "runningtime": "0.20"} | enwiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-poland | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.07"} | commonswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-sweden | null | SELECT page_title, comment_text
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 996}], "runningtime": "85.96"} | commonswiki_p |
(from Sept 2021) 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": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 10}], "runningtime": "0.37"} | commonswiki_p |
Comment search recent | null | -- SET STATEMENT max_statement_time = 90 FOR
SELECT DISTINCT
actor_name,
rc_this_oldid,
comment_text
FROM
recentchanges_userindex AS 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... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len"], "rowcount": 8849}], "runningtime": "21.15"} | enwiki |
Most used templates on bnwiki | null | SELECT DISTINCT CONCAT("{{t1|",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": ["log_id", "log_type", "log_action", "log_timestamp", "log_deleted", "page_id", "log_page", "actor_name", "actor_user", "log_namespace", "log_title", "log_params", "log_comment_text", "log_comment_data", "log_comment_cid"], "rowcount": 501}], "runningtime": "149.60"} | bnwiktionary_p |
zhwiki: ext-user with 500~550 edits | null | SELECT user_name, user_editcount
FROM (
SELECT ug_user
FROM user_groups
WHERE ug_group = 'extendedconfirmed'
) user_groups
LEFT JOIN user ON ug_user = user_id
WHERE user_editcount >= 500 AND user_editcount <= 550
ORDER BY user_editcount ASC | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 1}], "runningtime": "0.28"} | zhwiki_p |
Most used categories (enwiki) | null | use enwiki_p;
select cl_to, count(cl_from)
from categorylinks
join page p on p.page_namespace=0 and cl_from=p.page_id
#where cl_to="Дискографии"
group by cl_to
order by count(cl_from) desc
limit 1000; | {"connection_id": 38399608} | enwikipedia_p |
Creation user and date for local media files with no license | For images without license information, output created user and date, used the logic of https://quarry.wmcloud.org/query/53676 | set @dbname = 'tewiki';
select
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[:File:", img_name,"]]") as pagename
from image
join page ON page_namespace=6 AND page_title=img_name
join revision ON rev_page = page_id AND rev_parent_id = 0
join actor ON actor_id=rev_actor
whe... | {"resultsets": [{"headers": ["user", "edit_count"], "rowcount": 98}], "runningtime": "6.80"} | tewiki_p |
Placenames clashing with plurals | List singular topics and placenames which are homographs of their plurals, e.g. Queen and Queens. | SET STATEMENT max_statement_time = 1800 FOR
SELECT Ps.page_title, Pp.page_title
FROM templatelinks
/* Pp = Place ending in "s", e.g. "Queens", possible homograph of a plural */
JOIN page Pp ON Pp.page_id = tl_from AND Pp.page_title LIKE "%s" AND Pp.page_namespace = 0
JOIN page Ps ON Ps.page_namespace = 0 AND Ps.page_ti... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.07"} | enwiki_p |
Thanks for 2021 simplewiki | Most thanked people in 2021
Blame Mz7, SQL, and stwalkerster for this | USE simplewiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["user_name", "user_id", "d"], "rowcount": 57}], "runningtime": "55.19"} | simplewiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.