title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
All orphan non-free files linked to project namespace on te.wiki | All orphan non-free files not linked from Article and Wikipedia namespaces | SELECT
ilp.page_title as lnprojpage
from page p
join image ON p.page_namespace=6 AND p.page_title=img_name
JOIN categorylinks c1 ON p.page_id = c1.cl_from
JOIN imagelinks i ON p.page_title = i.il_to AND i.il_from_namespace = 4
join revision ON rev_page = p.page_id AND rev_parent_id = 0
join actor ON... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.07"} | tewiki_p |
sabzevar in file archives | null | SELECT concat ('*[[:File:', fa_name, ']]'), user_name, concat ('{{noping|', actor_name, '}}')
FROM filearchive
JOIN actor ON fa_actor = actor_id
JOIN user ON user_id = fa_deleted_user
WHERE fa_name LIKE '%سبزوار%'; | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
Moves to and from "Ireland" | null | SELECT *
FROM logging
WHERE log_type = "move"
AND log_namespace = 0
AND (log_title = "Ireland"
or "(\"|^)Ireland(\"|$)" RLIKE log_params);
| {"resultsets": [{"headers": ["comment_text", "COUNT(*)"], "rowcount": 12369}], "runningtime": "17.43"} | enwiki_p |
all-uppercase project-namespace redirects | null | SELECT COUNT(*)
FROM page
WHERE page_namespace = 4
AND page_title = UPPER(CONVERT(page_title USING utf8mb4))
AND page_is_redirect = 1; | {"resultsets": [{"headers": ["cl_to", "page_title", "page_len"], "rowcount": 72}], "runningtime": "0.16"} | enwiki_p |
মোট সম্পাদনার সংখ্যা | ১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন। | USE bnwikisource_p;
SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)"
ORDER BY user_editcoun... | {"resultsets": [{"headers": ["cl_to", "page_title", "page_len"], "rowcount": 72}], "runningtime": "0.17"} | bnwikisource_p |
Province | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%$_Province' ESCAPE '$')
| {"resultsets": [{"headers": ["user_name", "user_id", "d"], "rowcount": 55}], "runningtime": "49.01"} | enwiki_p |
Top VE users by frequency on enwiki | Among editors with more than 1,000 VE edits | SELECT RANK() OVER (ORDER BY $frequency DESC),
user_name,
user_editcount,
$VE_edits,
$VE_edits / user_editcount AS $frequency
FROM (SELECT user_name,
user_editcount,
COUNT(*) AS $VE_edits
FROM change_tag
INNER JOIN revision ON ct_rev_id = rev_id
I... | {"resultsets": [{"headers": ["page_id"], "rowcount": 3}], "runningtime": "0.41"} | enwiki_p |
Blank, glitched ClueBot indices (*20*20*20*) | null | SELECT LENGTH(page_title) AS title_length, page_len AS "size", page_namespace AS "ns", page_title AS "title"
FROM page WHERE page_title LIKE "%20%20%20%"
ORDER BY page_len ASC;
| {"connection_id": 58951617} | enwiki_p |
Thanks for 2022 | Most thanked people in 2021
Blame Mz7, SQL, and stwalkerster for this | 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 | {"connection_id": 15738165} | enwiki |
Liczba edycji w plwikisource w 2022 roku | null | USE plwikisource_p;
SET @w:=0;
SELECT @w:=@w+1 AS 'Lp',`Użytkownik`,`Link`,`Liczba edycji`
FROM (SELECT user_name AS 'Użytkownik', CONCAT('[[Wikiskryba:',user_name,'|',user_name,']]') AS 'Link', COUNT(*) AS 'Liczba edycji'
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON actor_user=user_id JOIN page ON rev_... | {"resultsets": [{"headers": ["file", "actor_name"], "rowcount": 3680}], "runningtime": "5.85"} | plwikisource |
Liczba edycji w plwiki w 2021 roku w przestrzeni Moduł | null | USE plwiki_p;
SET @w:=0;
SELECT @w:=@w+1 AS 'Lp',`Użytkownik`,`Link`,`Liczba edycji` AS "Liczba edycji w prestrzeni Moduł"
FROM (SELECT user_name AS 'Użytkownik', CONCAT('[[Wikiskryba:',user_name,'|',user_name,']]') AS 'Link', COUNT(*) AS 'Liczba edycji'
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON acto... | {"resultsets": [{"headers": ["file", "actor_name"], "rowcount": 3603}], "runningtime": "5.17"} | plwiki_p |
AfC accepts in 2021 (WP:AfC/recent) * | This is changes to 'Wikipedia:Articles for creation/recent'
NOTE! Quick and dirty as this does not count any extra edits to that page other than the normal AFCH post | select COUNT(*) as total_accepts
from revision_userindex
where (rev_page = 21063913)
and ( YEAR(rev_timestamp) = 2021 );
select actor_name as editor, COUNT(rev_actor) as accepts,
(select COUNT(rc_id) from recentchanges_userindex where rc_actor = actor_id ) as recent_edits
from revision_userindex
left join ... | {"resultsets": [{"headers": ["cl_from", "page_title"], "rowcount": 72}], "runningtime": "0.20"} | enwiki_p |
All files on hr.wiki with no license | null | #USE glwiki_p;
SELECT CONCAT("Datoteka:", img_name) AS file-- , actor_name
# img_timestamp AS img_creation
# ^^Timestamp of when upload took place. Not necessarily the same timestamp as logging.log_timestamp.
FROM image
JOIN page
ON page_namespace = 6
AND page_title = img_name
JOIN actor_image ON img_actor = actor... | {"resultsets": [{"headers": ["comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 1}], "runningtime": "553.62"} | hrwiki_p |
کارآ | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%کارامد%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["page_namespace", "count(*)"], "rowcount": 2}], "runningtime": "0.65"} | fawiki_p |
Thanks for 2021 frwiki | Most thanked people in 2021
Blame Mz7, SQL, and stwalkerster for this | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000" AND
log_timestamp <= "20220000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 5}, {"headers": ["rc_namespace", "rc_... | frwiki |
Find a patroller for a WikiProject | null | #SELECT DISTINCT `ug_group`
SELECT user.user_name
FROM user_groups JOIN user ON user_groups.ug_user = user.user_id
JOIN page user_page ON user_name = user_page.page_title
JOIN templatelinks ON user_page.page_id=templatelinks.tl_from
WHERE user_groups.ug_group = 'patroller'
AND templatelinks.tl_title = 'User_WP_Anime... | {"resultsets": [{"headers": ["log_title", "log_params", "log_timestamp"], "rowcount": 50}], "runningtime": "0.18"} | enwiki |
IPblock-exempts who have not edited since 2020-01-01 | null | SELECT concat ('*[[User:', actor_name, ']]')
FROM user_groups
JOIN user ON ug_user = user_id
JOIN actor ON actor_user = user_id
JOIN revision ON rev_actor = actor_id
WHERE ug_group = 'ipblock-exempt' AND rev_timestamp < 20200101000000; | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 3}, {"headers": ["rc_namespace", "rc_... | commonswiki_p |
Table tennis team | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%Table_Tennis%_–_%')
and (page_title like '%_–_%team%')
| {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 1808}], "runningtime": "21.23"} | enwiki_p |
redirects to ref- templates | null | SELECT
page_title,
pl_title
FROM pagelinks
JOIN page ON pl_from = page_id
WHERE pl_namespace = 10
AND pl_from_namespace = 10
AND page_is_redirect = 1
AND pl_title LIKE 'Ref-%' | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 11}], "runningtime": "12.05"} | ruwiki_p |
All orphan non-free files on te.wiki | All orphan non-free files not linked from Article and Wikipedia namespaces | SELECT
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[:File:", p.page_title,"]]") as pagename
from page p
join image ON p.page_namespace=6 AND p.page_title=img_name
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0 )... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 181}], "runningtime": "3.77"} | tewiki_p |
Media per user | Files uploaded per user | select
LEFT(rev_timestamp,8) as date,
page_title
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
where
page_is_redirect=0 AND actor_name="Mpradeep"
ORDER BY date,page_title... | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 2}, {"headers": ["page_title"], "rowcount": 14}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 1}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {... | tewiki_p |
Table tennis | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%able_Tennis%_–_%')
and ((page_title like '%_–_%ingles%')
or (page_title like '%_–_%oubles%')
or (page_title like '%_–_%eam%'))
| {"resultsets": [{"headers": ["actor_name", "user_registration"], "rowcount": 519}], "runningtime": "2.08"} | enwiki_p |
Thanks for 2021 frwiki | Most thanked people in 2021
Blame Mz7, SQL, and stwalkerster for this | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000" AND
log_timestamp <= "20220000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["user_name", "d", "user_id"], "rowcount": 62}], "runningtime": "79.96"} | frwiki |
Thanked people for 2021 frwiki per user | null | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000" AND
log_timestamp <= "20220000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["page_title"], "rowcount": 2}], "runningtime": "0.08"} | frwiki |
Singles etc | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–$_%$_Singles' ESCAPE '$')
or (page_title like '%–$_%$_Doubles' ESCAPE '$')
or (page_title like '%–$_%$_Pairs' ESCAPE '$')
or (page_title like '%–$_%$_Triples' ESCAPE '$')
or (page_title like '%–$_%$_Quads' ESCAPE ... | {"resultsets": [{"headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}], "runningtime": "22.17"} | enwiki_p |
Number of PC-protected pages on enwiki | null | SELECT COUNT(*) FROM flaggedpages | {"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", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_mi... | enwiki_p |
Singles etc | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%Wimbledon$_%$_Singles' ESCAPE '$')
or (page_title like '%Wimbledon$_%$_Doubles' ESCAPE '$')
)
| {"resultsets": [{"headers": ["ct_id", "ct_rc_id", "ct_log_id", "ct_rev_id", "ct_params", "ct_tag_id"], "rowcount": 1}], "runningtime": "0.08"} | enwiki_p |
TOP reviewers pl 2021 | null | -- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as review_count_i
FRO... | {"resultsets": [{"headers": ["actor_name", "rev_timestamp", "rev_id", "rev_parent_id"], "rowcount": 0}], "runningtime": "0.06"} | plwiki_p |
nowiki pages containing manual interwikilinks to enwiki | null | SELECT CONCAT("# [[", page_title, "]]")
FROM page
WHERE page_namespace = 0
AND page_id IN (SELECT iwl_from
FROM iwlinks
WHERE iwl_prefix IN ('en'))
AND page_id NOT IN (SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND tl_title IN ('Wikipedia'))
ORDER BY page_title; | {"resultsets": [{"headers": ["Artikel", "Kommentar"], "rowcount": 52}], "runningtime": "0.28"} | nowiki_p |
Nowiki Use of redirect categorylinks | null | SELECT pf.page_namespace AS from_ns, pf.page_title AS from_title, pt.page_title AS to_title
FROM page pf, page pt, categorylinks
WHERE pt.page_namespace=14 AND pt.page_is_redirect=1 AND cl_to=pt.page_title AND cl_from=pf.page_id; | {"resultsets": [{"headers": ["rev_page", "page_title", "page_namespace", "count"], "rowcount": 10}], "runningtime": "0.95"} | nowiki_p |
Thanks actors for 2021 frwiki | People who thanked the most in 2021 | USE frwiki_p;
SELECT actor_name, COUNT(log_id)
FROM logging_logindex
INNER JOIN actor ON actor_id=log_actor
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000" AND
log_timestamp <= "20220000000000"
GROUP BY log_actor
ORDER BY 2 DESC | {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 100}], "runningtime": "0.23"} | frwiki |
All pages in user space which not equal to username on te.wiki | All pages in user space not equal to username. To find users who are using additional root user pages apart from those associated with their account.
There are bugs in logic | SELECT
actor_name,
LEFT(rev_timestamp,8) as date,
REPLACE(page_title, '_', ' ') as pagename
from page p
join revision ON rev_page = p.page_id AND rev_parent_id = 0 AND p.page_namespace=2
join actor ON actor_id=rev_actor
where actor_name != REPLACE(page_title, '_', ' ')
ORDER BY actor_name ASC
LIMI... | {"resultsets": [{"headers": ["cl_to", "page_title", "il_to"], "rowcount": 30}], "runningtime": "0.49"} | tewiki_p |
Edits by users from date | Edits by Non-IP users from date | SELECT
CONCAT("User:",user_name,"|",user_name,"]]") as Username,
COUNT(*) as Edits_since_20200101
FROM revision
JOIN revision_actor_temp
ON revactor_rev=rev_id
JOIN actor
ON revactor_actor=actor_id
JOIN user
ON user_id =actor_user
WHERE LEFT(rev_timestamp,8) > "20191231" AND user_name LIKE "%indicw... | {"resultsets": [{"headers": ["user", "edit_count"], "rowcount": 100}], "runningtime": "10.23"} | tewiki_p |
Thanks for 2021 frwiki | Most thanked people in 2021
Blame Mz7, SQL, and stwalkerster for this | USE frwiktionary_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000" AND
log_timestamp <= "20220000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["page_title", "link_title", "cl_to"], "rowcount": 28}], "runningtime": "0.36"} | frwiktionary_p |
Thanks actors for 2021 frwiki | People who thanked the most in 2021 | USE frwiki_p;
SELECT actor_name, COUNT(log_id)
FROM logging_logindex
INNER JOIN actor ON actor_id=log_actor
WHERE
log_type = "thanks" AND
log_title = "GrandEscogriffe"
GROUP BY log_actor
ORDER BY 2 DESC | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 999}], "runningtime": "112.57"} | frwiki |
Articles created by CX in siwiki in 2021 | null | -- When appropriate, change 'contenttranslation' to 'sectiontranslation'
set @cx_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
SELECT
rev_timestamp,
actor_name,
page_title,
page_namespace,
page_id,
MAX(ct_rev_id)
FROM
`cha... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 100}], "runningtime": "0.23"} | jvwiki_p |
most linked portals from mainspace in ruwiki | null | SELECT
page_title,
COUNT(*) AS number
FROM pagelinks
JOIN page ON pl_title = page_title
WHERE pl_from_namespace = 0
AND pl_namespace = 100
AND page_namespace = 100
GROUP BY pl_title
ORDER BY number DESC; | {"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}], "runningtime": "0.07"} | ruwiki_p |
empty | null | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | {"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": "8.61"} | enwiki_p |
all glocked | null | select gu_name from globaluser where gu_locked=1; | {"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": 0}], "runningtime": "1.21"} | centralauth_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"connection_id": 532305} | eswiki |
mw-undo | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-undo')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 50}], "runningtime": "8.34"} | bnwiki |
All orphan free files on te.wiki | All orphan free files not linked from Article | SELECT
CONCAT("[[:File:", p.page_title,"]]") as pagename,
il_from_namespace
from image
join page p ON p.page_namespace=6 AND p.page_title=img_name
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to
WHERE c1.cl_to = "All_free_media"
LIMIT 100
| {"resultsets": [{"headers": ["1"], "rowcount": 10}], "runningtime": "0.10"} | tewiki_p |
Placenames clashing with plurals (speed test) | List singular topics and placenames which are homographs of their plurals, e.g. Queen and Queens. | SET STATEMENT max_statement_time = 10 FOR
SELECT Ps.page_title, Pp.page_title
FROM page Pp
JOIN page Ps ON Ps.page_namespace = 0 AND Ps.page_title = "Queen"
WHERE Pp.page_namespace = 0 AND Pp.page_title = "Queens"
LIMIT 10; | {"resultsets": [{"headers": ["log_type", "log_action", "log_timestamp", "log_actor", "log_title", "actor_name"], "rowcount": 7}], "runningtime": "4.82"} | enwiki_p |
Placenames clashing with plurals (speed test) | List singular topics and placenames which are homographs of their plurals, e.g. Queen and Queens. | show tables; | {"connection_id": 590849} | enwiki_p |
মোট সম্পাদনার সংখ্যা | ১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন। | SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)"
ORDER BY user_editcount DESC LIMIT 1000; | {"resultsets": [{"headers": ["log_type", "log_action", "log_timestamp", "log_actor", "log_page", "page_id", "page_title", "log_title", "actor_name"], "rowcount": 6}], "runningtime": "5.10"} | bnwiki |
Wikidata: Users number of new items in 2021 | null | SELECT page_title FROM revision JOIN page AS p ON rev_page = page_id
JOIN actor ON rev_actor = actor_id
WHERE actor_name = 'Premeditated'
AND p.page_is_new = 1
AND p.page_namespace = 0
AND DATEDIFF("2021-01-01", rev_timestamp) > 0 AND DATEDIFF("2021-01-01", rev_timestamp) < 365
| {"resultsets": [{"headers": ["log_type", "count(log_namespace)"], "rowcount": 13}], "runningtime": "20.18"} | wikidatawiki_p |
dbname to domain | See https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Metadata_database for detail about the meta_p.wiki table. | select
dbname,
substr( url, 9 ) as domain
from
wiki
; | {"resultsets": [{"headers": ["page_title", "iwl_title"], "rowcount": 262}], "runningtime": "0.61"} | meta_p |
Active Wikipedia sysops | null | SELECT user_name, user_editcount, rev_timestamp AS 'Last edit',
CONCAT(substr(log_timestamp,1,4),"-",substr(log_timestamp,5,2), "-",substr(log_timestamp,7,2)," ",substr(log_timestamp,9,2)+7,":",substr(log_timestamp,11,2)) as 'Last Log',
ug1.ug_group AS 'user_group'
FROM `user`
LEFT JOIN user_groups ug1
ON user_id =... | {"resultsets": [{"headers": ["fr_rev_id", "fr_page_id", "page_title", "fr_quality"], "rowcount": 6820}], "runningtime": "10.78"} | elwiki |
مؤمن | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%مومن%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}], "runningtime": "5.48"} | fawiki_p |
مؤلف | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%مولف%'
AND page_is_redirect = 0; | {"connection_id": 60907562} | fawiki_p |
find a patroller for a given language | null | SELECT user_page.page_title, categorylinks.cl_to
FROM user
JOIN user_groups ON user_groups.ug_user = user.user_id
JOIN page user_page ON user_name = user_page.page_title
JOIN categorylinks ON user_page.page_id=categorylinks.cl_from
WHERE categorylinks.cl_to IN ('User_pl-N',
'User_pl-5',
... | {"resultsets": [{"headers": ["fr_page_id", "fr_rev_id", "page_title", "ar_title"], "rowcount": 257}], "runningtime": "0.83"} | enwiki |
Los 100 usuarios que más ha usado "agradecer" en eu_wiki en 202x | Los 100 usuarios que más ha usado "agradecer" en eu_wiki en 202x | /* Usuario que más ha usado "agradecer" en 20xx en Wikipedia en euskera https://eu.wikipedia.org/wiki/Azala */
SELECT ROW_NUMBER() OVER (PARTITION BY SUBSTR(log_timestamp,1,4) ORDER BY COUNT(*) DESC) AS '#',
actor_name as 'Lankide', COUNT(*) as 'Guztira ( skertu )'
FROM
logging, actor
WHERE
log_type= 'thanks'
AND... | {"resultsets": [{"headers": ["fr_rev_id", "First edit", "First patrol", "Time diff", "fr_timestamp", "page_title"], "rowcount": 97}], "runningtime": "0.44"} | euwiki_p |
أكثر المستخدمين إنشاءً للمقالات في مشروع ويكي طب | null | use arwiki_p;
select concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", COUNT(rev_id) AS "عدد المقالات"
from revision r
inner join actor
on actor_id = rev_actor
inner join page p1
on p1.page_id = rev_page
where (select p2.page_id from page p2
where p2.page_title = p1.page_title
and p2.pag... | {"resultsets": [{"headers": ["user_name", "up_value", "max(rev_timestamp)"], "rowcount": 41}], "runningtime": "20.02"} | arwiki_p |
أكثر المستخدمين تعديلًا في مشروع ويكي طب | null | use arwiki_p;
select concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", COUNT(rev_id) AS "عدد التعديلات"
from revision
inner join actor
on actor_id = rev_actor
inner join page p1
on p1.page_id = rev_page
where (select p2.page_id from page p2
where p2.page_title = p1.page_title
and p2.page... | {"resultsets": [{"headers": ["user_name", "up_value", "last edit"], "rowcount": 41}], "runningtime": "1.19"} | arwiki_p |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"resultsets": [{"headers": ["actor_name", "date", "pagename"], "rowcount": 8900}], "runningtime": "14.30"} | huwiki |
Users by number of created articles on skwiki | null | USE urwiki_p;
SELECT
a.actor_name, COUNT(*) as count
FROM
page p, revision rf, actor_user a
WHERE
rf.rev_page = p.page_id and rf.rev_parent_id = 0 and
a.actor_id = rf.rev_actor and
p.page_namespace = 0 and
p.page_is_redirect = 0
GROUP BY
a.actor_name
ORDER BY
count desc
; | {"connection_id": 61540379} | skwiki |
Most active users by edits on plwiki in last 12 months | null | SELECT
CONCAT("#") AS number, actor_user,
CONCAT("[[user:",actor_name,"|",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 page_namespace = 0
AND actor_user IS NOT NULL
AND rev_timestamp B... | {"resultsets": [{"headers": ["page_title"], "rowcount": 5}], "runningtime": "6622.49"} | urwiki_p |
wikidata: count number of revision of a given user | null | -- SELECT
-- COUNT(*) AS cnt
-- FROM
-- revision_userindex JOIN actor_revision ON rev_actor=actor_id
-- WHERE
-- actor_name='MisterSynergy';
SELECT
COUNT(*) AS cnt
FROM
revision_userindex
WHERE
rev_actor=(SELECT actor_id FROM actor_revision WHERE actor_name='Baryonne28'); | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "4.05"} | wikidatawiki_p |
two-dash Singles and Doubles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–$_%–$_%$_Singles' ESCAPE '$')
or (page_title like '%–$_%–$_%$_Doubles' ESCAPE '$')
)
| {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 0}], "runningtime": "0.07"} | enwiki_p |
2021 NPP reviews of redirects | null | SELECT actor_name as editor, COUNT(logging.log_page) as reviews
FROM logging JOIN actor ON log_actor = actor_id
JOIN page ON page_id = log_page
JOIN user_groups ON ug_user = actor_user
WHERE ug_group IN ('patroller', 'sysop')
AND page_is_redirect = 1
AND page_namespace = 0
AND log_action = 'reviewed'
AND log_type = ... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 1}], "runningtime": "0.08"} | enwiki_p |
nlwiki Templates that are used on only one page | null | /*SELECT pf.page_namespace AS fns, pf.page_title AS `from-title`, tl_namespace AS tns, tl_title AS `to-title`, `count`
FROM (*/
SELECT *, COUNT(*) AS `count`
FROM templatelinks
WHERE tl_namespace=10 AND tl_from_namespace=0
GROUP BY tl_namespace, tl_title
HAVING `count`=1
LIMIT 100/*) tl, page pt, page pf
WHERE... | {"resultsets": [{"headers": ["\u0b87\u0ba8\u0bcd\u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bcd \u0bae\u0bc6\u0baf\u0bcd\u0baa\u0bcd\u0baa\u0bc1\u0baa\u0bcd\u0baa\u0ba3\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b88\u0b9f\u0bc1\u0baa\u0b9f\u0bcd\u0b9f\u0bcb\u0bb0\u0bcd:<br/>"], "rowcount": 0}], "runningtime": "0.82"} | nlwiki |
– X Singles and Doubles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–$_%$_Singles' ESCAPE '$')
or (page_title like '%–$_%$_Doubles' ESCAPE '$')
)
| {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 10}, {"headers": ["count"], "rowcount": 1}], "runningtime": "0.15"} | enwiki_p |
– X Singles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–$_%$_Singles' ESCAPE '$')
)
| {"resultsets": [{"headers": ["pp_value", "COUNT(pp_page)"], "rowcount": 5}, {"headers": ["count"], "rowcount": 1}], "runningtime": "0.30"} | enwiki_p |
– X Doubles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–$_%$_Doubles' ESCAPE '$')
)
| {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 1}, {"headers": ["rc_namespace", "rc_... | enwiki_p |
Most thankful 2021 | Most thankful people in 2020
Blame Mz7, SQL, and stwalkerster for this | USE zhwiki_p;
SELECT actor_name, COUNT(log_id)
FROM logging_logindex
JOIN actor_logging ON actor_id = log_actor
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000"
GROUP BY actor_name
ORDER BY 2 DESC | {"resultsets": [{"headers": ["pp_value", "COUNT(pp_page)"], "rowcount": 5}, {"headers": ["count"], "rowcount": 1}], "runningtime": "0.18"} | zhwiki_p |
IP range usertalk pages on enwiki | null | SELECT page_title,
(SELECT actor_name
FROM actor
WHERE actor_id = (SELECT rev_actor
FROM revision
WHERE rev_page = page_id
ORDER BY rev_timestamp ASC
LIMIT 1)) AS $creator,
CONCAT("https... | {"resultsets": [{"headers": ["num"], "rowcount": 1}], "runningtime": "2.93"} | enwiki_p |
unreviewed, not biography | null | SELECT DISTINCT article.page_title, rev_timestamp
FROM page article
JOIN revision ON article.page_id = rev_page
JOIN pagetriage_page ON rev_page = ptrp_page_id
WHERE rev_parent_id = 0
AND ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND article.page_title NOT IN (
SELECT DISTINCT talkpage.pag... | {"resultsets": [{"headers": ["num"], "rowcount": 1}], "runningtime": "2.94"} | enwiki |
2021 NPP reviews of non-redirects | null | SELECT actor_name, COUNT(logging.log_page) as num
FROM logging JOIN actor ON log_actor = actor_id
JOIN page ON page_id = log_page
JOIN user_groups ON ug_user = actor_user
WHERE ug_group IN ('patroller', 'sysop')
AND page_is_redirect = 0
AND log_action = 'reviewed'
AND log_type = 'pagetriage-curation'
AND log_timestam... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 11}], "runningtime": "3.30"} | enwiki_p |
Longest file names on Commons | null | SELECT page_title, LENGTH(page_title) as `title_len`
FROM page
WHERE page_namespace = 6
AND page_is_redirect = 0
AND LENGTH(page_title) > 100
ORDER BY title_len DESC
LIMIT 500 | {"resultsets": [{"headers": ["title"], "rowcount": 0}], "runningtime": "68.66"} | commonswiki_p |
CKBStats Article Creation by Year | null | SELECT year(r.rev_timestamp) As year, COUNT(*) AS Articles
FROM revision r
join page p on p.page_id=r.rev_page
WHERE p.page_namespace=0 and p.page_is_redirect=0 and r.rev_parent_id=0
GROUP By year; | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 1}, {"headers": ["page_title"], "rowcount": 4}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 2}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"... | ckbwiki |
CKBStats Categories by Years | null | SELECT year(r.rev_timestamp) As year, COUNT(*) AS Articles
FROM revision r
join page p on p.page_id=r.rev_page
WHERE p.page_namespace=14 and p.page_is_redirect=0 and r.rev_parent_id=0
GROUP By year; | {"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 12905}], "runningtime": "21.02"} | ckbwiki |
CKBStats Template by Years | null | SELECT year(r.rev_timestamp) As year, COUNT(*) AS Articles
FROM revision r
join page p on p.page_id=r.rev_page
WHERE p.page_namespace=10 and p.page_is_redirect=0 and r.rev_parent_id=0
GROUP By year; | {"resultsets": [{"headers": ["Page", "History URL"], "rowcount": 44}], "runningtime": "12.13"} | ckbwiki |
Main pl.wiki query 1 | null | #RESULTSET_1
SELECT CONCAT('# [[',page_title,']]') AS page_title, CONCAT('[[',rd_title,']]') AS rd_title
FROM page
JOIN redirect
ON rd_FROM = page_id
AND NOT EXISTS (SELECT * FROM page AS p1 WHERE p1.page_title = rd_title AND p1.page_namespace = rd_namespace)
AND page_namespace = 0
AND rd_namespace = 0;
#RESULTSET_2
SE... | {"resultsets": [{"headers": ["cl_from", "page_title"], "rowcount": 10}], "runningtime": "1.11"} | hewiki_p |
Most thanked 2021 | Most thanked people in 2021
Thanks AntiCompositeNumber for the original 2020 version | 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 | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "0.10"} | enwiki_p |
Redaktorzy szablonów - potencjał | null | select count(rev_page), rev_actor, actor_name
from revision_userindex r
inner join page p on rev_page=page_id
inner join actor_revision a on rev_actor=actor_id
where page_namespace=828 or page_namespace=10
group by rev_actor, actor_name
having count(rev_page)>150
order by 1 desc | {"connection_id": 2398296} | plwiki_p |
Sysops - potencjał | null | select count(rev_page), rev_actor
from revision_userindex r
group by rev_actor
having count(rev_page)>1100
order by 1 desc | {"connection_id": 2398307} | plwiki_p |
trials | Titles with "(The xxx song)" | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%_trials')
| {"connection_id": 2398402} | enwiki |
Trials | Sports titles with "...Trials" | select page_title from page where page_namespace=0
and (page_title like '%Trials%')
and ((page_title like '%Olympic%')
or (page_title like '%Swimming%')
or (page_title like '%Curling%'))
and page_is_redirect=0 | {"resultsets": [{"headers": ["user_name", "user_registration"], "rowcount": 14}], "runningtime": "15.12"} | enwiki |
Links to nli.org.il in hewiki | Links to nli.org.il in hewiki | use hewiki_p;
select
el_from,
page_title,
el_to
from
externallinks,
page
where
el_to like '%/NNL_%' and
el_from = page_id
limit 500000; | {"resultsets": [{"headers": ["page_namespace", "cat_files", "page_title"], "rowcount": 3}], "runningtime": "1.84"} | hewiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding / IP-controle, 7 januari 2022 13:24 CET | # 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... | {"resultsets": [{"headers": ["cl_to", "cl_from", "page_title", "page_namespace"], "rowcount": 5}], "runningtime": "0.08"} | nlwiki_p |
Article deletions on pt.wiki | null | SELECT SUBSTRING(log_timestamp, 1, 6), COUNT(*) FROM logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
WHERE log_type = "delete"
AND log_action = "delete"
AND log_timestamp > 20200101000000
AND log_namespace = 0
AND actor_name NOT IN ( # Seems like ptwiki doesn't have bots deleting articles but keeping th... | {"resultsets": [{"headers": ["user_name"], "rowcount": 10}], "runningtime": "0.09"} | ptwiki_p |
reviewed by non-patrollers | null | # List of all patrollers and admins
#SELECT DISTINCT `ug_group` FROM `user_groups`;
SELECT actor_name, COUNT(logging.log_page) as num
FROM logging JOIN actor ON log_actor = actor_id
JOIN page ON page_id = log_page
JOIN user_groups ON ug_user = actor_user
WHERE actor_user NOT IN (
SELECT ug_user
FROM user_groups
... | {"resultsets": [{"headers": ["page_id"], "rowcount": 2}], "runningtime": "13.60"} | enwiki_p |
T297990 When creating new talk pages, what % of users' edits add a comment? | null | select actor_user, count(*), sum(_added_comment), sum(_added_comment)/count(*)
from (
select actor_user, rc_id, (
select count(*) from change_tag
left join change_tag_def ON ctd_id = ct_tag_id
where ct_rc_id = rc_id
and ctd_name='discussiontools-added-comment'
) as _added_comment
from recentchanges
left joi... | {"connection_id": 28597953} | enwiki_p |
Province | null | select page_title from page where page_namespace=14
and (page_title like '%_Vientiane_Province')
and page_is_redirect=0 | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 32}], "runningtime": "5.17"} | enwiki_p |
Redirects En Wiki | Find all redirects of en wikipedia pages | SELECT /* SLOW */ page.page_title AS source, redirect.rd_title AS destination
FROM redirect, page
WHERE redirect.rd_namespace = 0 AND page.page_id = redirect.rd_from; | {"resultsets": [{"headers": ["CONCAT(\"Razgovor:\", page.page_title)"], "rowcount": 2670}], "runningtime": "3.63"} | enwiki |
reviews last month | null | SELECT DATE_FORMAT(log_timestamp,'%Y-%m-%d') as day, COUNT(log_page)
FROM logging JOIN actor ON log_actor = actor_id
JOIN page ON page_id = log_page
JOIN user_groups ON ug_user = actor_user
WHERE log_action = 'reviewed'
AND log_type = 'pagetriage-curation'
AND page_is_redirect = 0
AND page_namespace = 0
AND log_times... | {"resultsets": [{"headers": ["CONCAT(\"Razgovor Wikipedija:\", page.page_title)"], "rowcount": 3}], "runningtime": "0.09"} | enwiki_p |
new articles last month | null | #SELECT page_title, rev_timestamp
#SELECT DATE_FORMAT(rev_timestamp, "%Y-%m-%d") AS day, COUNT(rev_timestamp) AS revisions
SELECT COUNT(page_title), DATE_FORMAT(rev_timestamp, "%Y-%m-%d") AS day
FROM revision
JOIN page ON page_id = rev_page
WHERE rev_parent_id = 0
#AND page_is_new = 1
AND page_is_redirect = 0
AND pag... | {"resultsets": [{"headers": ["PT", "CONCAT(\"https://en.wikipedia.org/wiki/\", article.page_title)"], "rowcount": 19}], "runningtime": "13.19"} | enwiki_p |
Disambiguators by popularity on enwiki | null | SELECT REGEXP_SUBSTR(page_title, "\\(.*?\\)"), COUNT(*)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0
AND page_title LIKE "_%(_%)"
GROUP BY 1
ORDER BY 2 DESC | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)"], "rowcount": 37}], "runningtime": "0.78"} | enwiki_p |
hewiki most prolific translators | null | usearwiki_p;
SELECT
rev_actor,
actor_name,
count(revision.rev_id) as articles_created
FROM
change_tag,
actor,
revision
WHERE
revision.rev_parent_id = 0 AND
ct_tag_id = (select ctd_id from change_tag_def where ctd_name = 'contenttranslation') AND
rev_id = ct_rev_id AND
rev_actor = actor_id
GROUP BY
rev_actor... | {"resultsets": [{"headers": ["current_date"], "rowcount": 1}, {"headers": ["Username", "Number_of_labels_added"], "rowcount": 14}], "runningtime": "30.14"} | arwiki_p |
Articles created by CX in siwiki in 2021 | null | -- When appropriate, change 'contenttranslation' to 'sectiontranslation'
set @cx_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
SELECT
rev_timestamp,
actor_name,
page_title,
page_namespace,
page_id,
MAX(ct_rev_id)
FROM
`cha... | {"resultsets": [{"headers": ["page_title"], "rowcount": 4043}], "runningtime": "11.99"} | arwiki_p |
work in progress | testing | SELECT day, MAX(unreviewed), MAX(reviewed), MAX(patrolled), MAX(autopatrolled)
FROM (
SELECT day, ptrp_reviewed, num,
IF (ptrp_reviewed = 0, num, 0) AS unreviewed,
IF (ptrp_reviewed = 1, num, 0) AS reviewed,
IF (ptrp_reviewed = 2, num, 0) AS patrolled,
IF (ptrp_reviewed = 3, num, 0) AS autopatrolled
FROM (
... | {"resultsets": [{"headers": ["CONCAT('[[', REPLACE(BKL.page_title, '_', ' '), ']]')", "AnzahlPersonenLinks"], "rowcount": 4307}], "runningtime": "32.95"} | enwiki_p |
14373 District titles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%$_District' ESCAPE '$')
and not (page_title like '%School_District')
and not (page_title like '%Historic_District')
and not (page_title like '%Urban_District')
and not (page_title like '%Rural_District')
and not (page_title... | {"resultsets": [{"headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}], "runningtime": "11.23"} | enwiki_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; | {"resultsets": [{"headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}], "runningtime": "6.14"} | viwiki_p |
2021 NPP "patrols" of non-redirects | NOT RECOMMENDED. Better to search by "page curations" instead. | SELECT actor_name, COUNT(logging.log_page) as num
FROM logging
JOIN actor ON log_actor = actor_id
JOIN page ON page_id = log_page
AND page_is_redirect = 0
AND log_action = 'patrol'
AND log_type = 'patrol'
AND log_timestamp > 20201231235959
AND log_timestamp <= 20211231235959
AND log_namespace = 0
GROUP BY actor_name
OR... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 2}], "runningtime": "0.10"} | enwiki |
List of redirects that need {{R to project namespace}} | null | SELECT CONCAT(CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
WHEN 4 THEN 'Wikipedia:' WHEN 5 TH... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 4}], "runningtime": "0.29"} | enwiki |
pages in a category added in a period | Pages in a category added in a period, useful for getting statistics of people requesting for help by using a template in tewiki | SELECT
page_namespace,
page_title,
cl_timestamp
FROM page
JOIN categorylinks on cl_from = page_id
WHERE cl_to ='సహాయం_చేయబడిన_పేజీలు' AND LEFT(cl_timestamp,10) > "2020-07-16" and LEFT(cl_timestamp,10) < "2022-01-01"
LIMIT 10000; | {"resultsets": [{"headers": ["tl_title"], "rowcount": 127}], "runningtime": "2066.11"} | tewiki_p |
Talk pages without article | User and user talk pages and subpages where the base page name doesn't look like an IP address and isn't a username. | use hywiki_p;
select
id,
ns,
title,
concat(if(ns = 1, "Main", "Talk"), ":", title) as full_title,
content_model,
len,
is_redirect
from (select
page_id as id,
page_namespace as ns,
page_title as title,
page_content_model as content_model,
page_len as len,... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 0}], "runningtime": "43.29"} | hywiki |
search file archives | null | SELECT concat ('*[[:File:', fa_name, ']]'), user_name, concat ('{{noping|', actor_name, '}}')
FROM filearchive
JOIN actor ON fa_actor = actor_id
JOIN .user ON user_id = fa_deleted_user
WHERE fa_name REGEXP '[Jj]3l'; | {"resultsets": [{"headers": ["number", "actor_user", "rev_user_text", "recent_user_editcount"], "rowcount": 8574}], "runningtime": "35.46"} | commonswiki_p |
First query test | null | SELECT * FROM page article WHERE page_is_redirect = 0 ORDER BY page_id limit 1000; | {"resultsets": [{"headers": ["user_name", "ug_group"], "rowcount": 705}], "runningtime": "1.08"} | enwiki |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding, 9 januari 22:24 (CET) 954 unpatrolled | # 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... | {"resultsets": [{"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}, {"headers": ["page_title", "pp_propname"], "r... | nlwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.