title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Proofread-Athithya-அன்னைகஸ்தூரிபாயின்நம்மை | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Proofread%")
#... | {"resultsets": [{"rowcount": 38, "headers": ["concat(REPLACE(REPLACE(REPLACE(el_to, 'https://tools.wmflabs.org/quickstatements/index_old.html#v1=',''),'%09','|'),'%0A','|'),'S4656|\\'\"https://commons.wikimedia.org/wiki/File:',page_title,'\"')"]}], "runningtime": "0.36"} | null |
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": [{"rowcount": 4, "headers": ["iwl_title", "P1472", "CONCAT(\"\\\"\", REPLACE(page_title, \"_\", \" \"), \"\\\"\")"]}], "runningtime": "0.11"} | null |
Wikiloves Women 2019 | null | SELECT t.page_id AS PID, r2.rev_id AS CreateRID, r2.rev_timestamp AS CreateTime, r2.rev_user_text AS Creator, r1.rev_id AS LastRID, r1.rev_timestamp AS LastTime, r1.rev_user_text AS LastEditor, r1.rev_len AS LastSize, t.cnt AS Edits, t.page_title AS Title FROM ( SELECT COUNT(*) AS cnt, r.rev_timestamp, p.page_id, p.pag... | {"resultsets": [{"rowcount": 0, "headers": ["concat(REPLACE(REPLACE(REPLACE(el_to, 'https://tools.wmflabs.org/quickstatements/index_old.html#v1=',''),'%09','|'),'%0A','|'),'S4656|\\'\"https://commons.wikimedia.org/wiki/File:',page_title,'\"')"]}], "runningtime": "0.14"} | null |
MexFedTelIns | null | USE enwiki_p;
SELECT
page_namespace,
page_title,
el_to,
COUNT(el_id)
FROM
externallinks
JOIN page ON el_from = page_id
WHERE
el_to LIKE "http://rpc.ift.org.mx/rpc/%" OR
el_to LIKE "https://rpc.ift.org.mx/rpc/%"
GROUP BY page_id | {"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.13"} | null |
GET 'FA' Articles in English Wikipedia | null | SELECT
article.page_id,
article.page_title
FROM categorylinks
INNER JOIN page talk_page ON
talk_page.page_namespace = 1 AND
cl_from = talk_page.page_id
INNER JOIN page article ON
article.page_namespace = 0 AND
article.page_title = talk_page.page_title
WHERE cl_to LIKE "FA-Class%"; | {"resultsets": [{"headers": ["lang", "timestamp", "count"], "rowcount": 1}], "runningtime": "0.26"} | null |
Статті в період Вікімарафону без шаблону Вікімарафону | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp>=20200126000000
AND R.rev_timestamp< 20200202000000
AN... | {"resultsets": [{"rowcount": 532, "headers": ["page_title", "cl_to"]}], "runningtime": "316.88"} | null |
How many different types of logs about article namespace are there in a year? | For enwiki, by year what are the counts of different types of logs? | USE enwiki_p;
SELECT COUNT(*), log_type, log_action, LEFT(log_timestamp,4) as year
FROM logging
GROUP BY log_type, log_action, year | {"resultsets": [{"headers": ["page_title"], "rowcount": 26}], "runningtime": "11.88"} | null |
POTM TAWS JAN20 | Proofread of the month. List of user who have participated in the event. | SELECT
act.actor_name as 'Editor',
ndx.page_title as 'Work',
sum(edp.page_namespace = 250) as 'Page-space: edits',
sum(edp.page_namespace = 252) as 'Index-space: edits',
sum(edp.page_namespace = 0) as 'Main-space: edits',
COUNT(edp.page_id)-sum(edp.page_namespace in (0,250,252)) AS 'Other edits'... | {"resultsets": [{"rowcount": 26, "headers": ["page_title"]}], "runningtime": "5.78"} | null |
Статті в період Вікімарафону без шаблону Вікімарафону | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp>=20200126000000
AND R.rev_timestamp< 20200202000000
AN... | {"resultsets": [{"rowcount": 248916, "headers": ["rev_page"]}], "runningtime": "2158.01"} | null |
1000 maiores editores da ptwiki por número de edição e gênero | null | use ptwiki_p;
select
user_editcount,
user_name,
up_value
from
user u
left join
user_properties up
ON (
u.user_id=up.up_user
and up_property = "gender"
)
left join user_groups ug
on (
... | {"resultsets": [{"rowcount": 6, "headers": ["linter_cat", "count(*)"]}], "runningtime": "9.21"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 16}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "3.75"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 26, "headers": ["reviews", "actor_name", "submitted"]}], "runningtime": "43.39"} | null |
Failure | For https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=842949728#Help_compiling_a_list_of_editors_by_experience_level
Users registered at least a year ago, that are in neither the administrator nor new-page-patroller usergroups, with no blocks in at least a year, at least 5 total pa... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount >= 55000
AND user_editcount <= 56000
AND user_registration < 20190207000000
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT ... | {"resultsets": [{"headers": ["page_title", "COUNT(*)"], "rowcount": 21521}], "runningtime": "75.36"} | null |
Editors by experience level 55000-56000 2019 | For https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=842949728#Help_compiling_a_list_of_editors_by_experience_level
Users registered at least a year ago, that are in neither the administrator nor new-page-patroller usergroups, with no blocks in at least a year, at least 5 total pa... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount >= 55000
AND user_editcount <= 56000
AND user_registration < 20190207000000
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT ... | {"resultsets": [{"headers": ["time", "user", "Namespace", "page", "comment"], "rowcount": 0}], "runningtime": "0.25"} | null |
WSC 2019 Participants | List of articles created for the She Did It Challenge on UkWiki | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT(actor_name) as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
GROUP_CONCAT(
DI... | {"resultsets": [{"headers": ["line"], "rowcount": 65}], "runningtime": "1.60"} | null |
Editors by experience | For [[User talk:Cryptic#A Little help with a query]] circa 7 Feb 2020. | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount BETWEEN 55000 AND 56000
AND user_registration < '20190207000000'
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT EXISTS (SELEC... | {"resultsets": [{"rowcount": 0, "headers": ["page_title"]}], "runningtime": "4.06"} | null |
Large templates @ zhwiki | null | USE zhwiki_p;
SELECT page_title, page_len
FROM page
WHERE page_namespace = 10
ORDER BY page_len DESC
LIMIT 500; | {"resultsets": [{"rowcount": 10, "headers": ["comment_id", "comment_hash", "comment_text", "comment_data"]}], "runningtime": "0.16"} | null |
মোট সম্পাদনার সংখ্যা | ২৮ জানু ২০২০ | USE bnwiki_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_editcount DESC... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept %", "decline %", "reject %"], "rowcount": 151}], "runningtime": "22.88"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"rowcount": 81, "headers": ["reviews", "actor_name", "accept %", "decline %", "reject %"]}], "runningtime": "7.13"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"headers": ["talk_page"], "rowcount": 0}], "runningtime": "0.10"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"rowcount": 909, "headers": ["Database (%_p)"]}], "runningtime": "3.10"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"resultsets": [{"rowcount": 142, "headers": ["c", "actor_name"]}], "runningtime": "333.79"} | null |
Pages created by indefinitely-blocked users | null | USE enwiki_p;
SELECT user_name, user_editcount, ipb_timestamp, ipb_expiry, comment_text, page_title
FROM user
JOIN ipblocks ON ipb_user = user_id
JOIN comment ON ipb_reason_id = comment_id
JOIN revision ON user.user_id = revision.rev_actor
JOIN page ON revision.rev_page = page.page_id
WHERE ipb_expiry = 'infinity' AND... | {"resultsets": [{"rowcount": 21, "headers": ["English", "Simple"]}], "runningtime": "1.73"} | null |
Невідпатрульовані статті в період Вікімарафону | null | SELECT P.page_title, A.actor_name, R.rev_timestamp
FROM ukwiki_p.revision R
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_parent_id = 0
AND P.page_namespace = 0
AND R.rev_timestamp>=20200201140000
AND R.rev_timestamp< 20200201230000
AND P.page_is_redi... | {"resultsets": [{"headers": ["English", "Simple"], "rowcount": 21}], "runningtime": "1.56"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["pl_title", "count(*)"], "rowcount": 194}], "runningtime": "42.19"} | null |
What are number of tagged revisions relevant to vandalisms | [broken]What are the latest 10 thanks and their relevant page and revisions? | # schema: https://www.mediawiki.org/w/index.php?title=Manual:Database_layout/diagram&action=render
SELECT * FROM change_tag_def
WHERE ctd_id IN (14,20,26,29,43,45,52,54,59,60,65,520); | {"connection_id": 12780324} | null |
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... | {"connection_id": 12783021} | null |
pawikisource Wikidata usage stats | null | use plwikisource_p;
/*select * from wbc_entity_usage;*/
SELECT eu_entity_id,page_title FROM wbc_entity_usage JOIN page ON eu_page_id=page_id WHERE page_namespace=0 AND eu_aspect='S'
ORDER BY page_title;
SELECT COUNT(DISTINCT page_title) AS 'number of pages linked to Wikidata as sitelinks' FROM wbc_entity_usage JOIN pa... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment", "ar_comment_id", "ar_user", "ar_user_text", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "ar_content_model", "ar_content_form... | null |
Find the average length of external link | null | SELECT AVG(LENGTH(`el_to`)) FROM `externallinks`; | {"connection_id": 12863178} | null |
Find the max length of external link | null | SELECT MAX(LENGTH(`el_to`)) FROM `externallinks`; | {"connection_id": 2170658} | null |
Find number of external links that probably point to site index (1) | Cannot be done in 30mins so id constraint was set | CREATE TABLE `domains` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`domain` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lang` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAUL... | {"resultsets": [], "runningtime": "0.08"} | null |
Comment ID for files uploaded with UploadWizard | null | USE commonswiki_p;
SELECT comment_id
FROM comment
WHERE comment_text = "User created page with UploadWizard"
; | {"resultsets": [{"headers": ["page_title", "COUNT(*)"], "rowcount": 18345}], "runningtime": "66.39"} | null |
Orphaned fair use images (en) | Returns the list of fair use images that are not presently used in any articles | USE hewiki_p;
SELECT CONCAT('*[[:קובץ:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '),]] '') FROM page p
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)
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.cl... | {"resultsets": [{"rowcount": 20, "headers": ["page_namespace", "page_title", "page_len"]}], "runningtime": "76.66"} | null |
Most blocks | null | use arwiktionary_p;
select
log_title as 'blocked user',
count(*) as times,
group_concat(distinct
date_format(log_timestamp, '%Y-%m-%d %T')
order by log_timestamp separator ',\n')
as dates
from logging_logindex
where
log_namespace = 2
and log_typ... | {"resultsets": [{"rowcount": 10, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "ar_content_model", "ar_content_format"]}], "runningtime": "0... | null |
Big Cats (< 5000) | null | USE commonswiki_p;
SELECT
cat_title,
cat_files
FROM
category
WHERE
cat_files < 3000
ORDER BY cat_files DESC
LIMIT 1000 | {"resultsets": [{"headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"], "rowcount": 0}], "runningtime": "0.09"} | null |
Total count of AfC reviews | Last run 24 Feb '19
This query counts the number of AfC submissions reviewed during the past 30 days by reading the edit comment associated with each review. Includes drafts in the "Draft" namespace and "User" space.
You can re-run this query and get new data at any time by following these steps:
1. log into quarry.w... | use enwiki_p;
select count(rc_id) as edits, actor_name
from recentchanges_userindex
left join actor on rc_actor = actor_id
inner join comment c on rc_comment_id = c.comment_id
where (rc_namespace = 118 or rc_namespace = 2) and (comment_text like "Declining submission:%" or comment_text like "%Publishing accepted%"... | {"resultsets": [{"rowcount": 0, "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"]}], "runningtime": "109.53"} | null |
Census links | null | USE enwiki_p;
SELECT
el_to,
count(el_from) as pages
FROM
externallinks
WHERE
el_index LIKE "https://gov.census.factfinder.%" OR
el_index LIKE "http://gov.census.factfinder.%"
GROUP BY el_to
ORDER BY pages DESC | {"resultsets": [{"rowcount": 38, "headers": ["File name", "Date", "Size", "Uploader's name"]}], "runningtime": "558.75"} | null |
Census linking templates | null | USE enwiki_p;
SELECT
page_namespace,
page_title,
count(el_id) as links
FROM
externallinks
JOIN page on el_from = page_id
WHERE
page_namespace = 10 AND
(el_index LIKE "https://gov.census.factfinder.%" OR
el_index LIKE "http://gov.census.factfinder.%")
GROUP BY page_id
ORDER BY page_title | {"connection_id": 2753892} | null |
Editors by experience level 55000-56000 2019 | For https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=842949728#Help_compiling_a_list_of_editors_by_experience_level
Users registered at least a year ago, that are in neither the administrator nor new-page-patroller usergroups, with no blocks in at least a year, at least 5 total pa... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount >= 55000
AND user_editcount <= 56000
AND user_registration < 20190207000000
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT ... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 315}], "runningtime": "60.68"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["Title", "user", "comment"], "rowcount": 36}], "runningtime": "1.76"} | null |
Average, minimum, maximum edit size per user (failure) | null | use enwiktionary_p;
select
actor_name as user,
avg(convert(`after`.rev_len, signed) - convert(`before`.rev_len, signed)) as 'average size difference',
min(convert(`after`.rev_len, signed) - convert(`before`.rev_len, signed)) as 'minimum size difference',
max(convert(`after`.rev_len, signed) - convert(`before`.r... | {"resultsets": [{"headers": ["wikitext"], "rowcount": 0}], "runningtime": "251.19"} | null |
{{Semi-retired}} users w/o edits after 2018 | Users whose talk page transcludes {{Semi-retired}} (or its redirect {{semiretired}}) who have no (non-deleted) edits after 2018.
For [[WP:VPT#User search by last activity]] circa 10 February 2020. | SELECT DISTINCT CONCAT('[[User talk:', page_title, ']]') AS utpage
FROM templatelinks
JOIN page ON page_id = tl_from
WHERE tl_namespace = 10
AND tl_title IN ('Semi-retired', 'Semiretired')
AND tl_from_namespace = 3
AND NOT EXISTS (SELECT 1 FROM revision_userindex
JOIN actor_revision ON actor... | {"resultsets": [{"headers": ["namespace", "title", "value", "if(pp.pp_value is not null, 'not null', 'null')"], "rowcount": 20}], "runningtime": "11.72"} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type", "rc_log_acti... | null |
Census links | null | USE enwiki_p, eswiki_p;
SELECT
el_to,
count(el_from) as pages
FROM
externallinks
WHERE
el_index LIKE "https://gov.census.factfinder.%" OR
el_index LIKE "http://gov.census.factfinder.%"
GROUP BY el_to
ORDER BY pages DESC | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_title", "comment_text"], "rowcount": 35}], "runningtime": "14.21"} | null |
Articles not connected to Wikidata items by a given user on plwiki | null | USE plwiki_p;
SELECT CONCAT('[[',page_title,']]') AS page_title, DATE_FORMAT(rev_timestamp,"%Y-%m-%d") AS rev_timestamp, CONCAT('[[User:',rev_user_text,']]') AS rev_user_text
FROM page
LEFT JOIN langlinks
ON ll_from = page_id
LEFT JOIN (SELECT * FROM page_props WHERE pp_propname = 'wikibase_item') AS props
ON pp_page =... | {"resultsets": [{"headers": ["page_title", "page_namespace", "ll_title", "pap_project_title", "pa_importance"], "rowcount": 8}], "runningtime": "0.15"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"connection_id": 4028169} | null |
Catalan labels | null | USE wikidatawiki_p;
DESCRIBE wb_terms;
SELECT COUNT(*) FROM wb_terms
WHERE term_type = 'label' AND term_language = "id"; | {"resultsets": [{"rowcount": 27, "headers": ["reviews", "actor_name", "accept %", "decline %", "reject %"]}], "runningtime": "2.77"} | null |
A5 | null | SELECT log.log_timestamp AS `time`, actor_name AS `user`, log.log_namespace AS `Namespace`, log.log_title AS `page`, comment.comment_text AS `comment`
FROM logging AS log
LEFT JOIN actor ON log.log_actor = actor.actor_id
JOIN comment ON log.log_comment_id = comment.comment_id
AND log.log_type = 'delete'
AND log.lo... | {"resultsets": [{"rowcount": 12695, "headers": ["filename", "page_id", "timestamp", "uploader", "template"]}], "runningtime": "40.09"} | null |
Census link types | null | USE enwiki_p;
SELECT
el_to
FROM
externallinks
WHERE
el_index LIKE "http://gov.census.factfinder./bkmk/%"
GROUP BY el_to
ORDER BY el_to | {"resultsets": [{"rowcount": 5, "headers": ["page_id", "page_title"]}], "runningtime": "0.18"} | null |
talk intersect | null | USE enwiki_p;
SELECT page_title
FROM
categorylinks
JOIN page on cl_from = page_id
WHERE
cl_to = "Electronic_dance_music_DJs" AND
page_namespace = 0 AND
page_title IN (SELECT page_title
FROM
categorylinks
JOIN page ON cl_from = page_id
... | {"resultsets": [{"headers": ["Menesis", "Raksti"], "rowcount": 200}], "runningtime": "79.68"} | null |
Wikidata edits with wikimedia-commons-app tag (change_tag_def) | null | use wikidatawiki_p;
select rev_id, rev_user_text, page_title
from change_tag
join revision on rev_id=ct_rev_id
join page on page_id=rev_page where ct_tag_id=(
SELECT ctd_id
FROM change_tag_def
WHERE ctd_name="wikimedia-commons-app"
)
| {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 392}], "runningtime": "10.37"} | null |
Get actor | null | USE zhwiki_p;
SELECT user_id FROM user WHERE user_name = "Trymybestwikipedia";
SELECT actor_id FROM actor WHERE actor_user = 127062; | {"resultsets": [{"rowcount": 16591, "headers": ["pp_value", "page_title", "tl_namespace", "tl_title"]}], "runningtime": "737.10"} | null |
N2 | null | USE ruwiki_p;
SELECT
page_namespace AS namespace,
page_title AS title,
rev_timestamp AS `value`
FROM
page p
JOIN revision r ON p.page_latest = r.rev_id
WHERE p.page_namespace = 0
AND p.page_is_redirect = 0
AND p.page_id not in (
select page_id
from page p JOIN page_props pp... | {"resultsets": [{"headers": ["page_id", "page_title", "count(*)"], "rowcount": 371}], "runningtime": "15.36"} | null |
Average infoboxes per article on English Wikipedia | null | USE `enwiki_p`;
SELECT @infoboxes := (
SELECT COUNT(*)
FROM `templatelinks`
WHERE `tl_from_namespace` = 0
AND `tl_namespace` = 10 -- NS_TEMPLATE
AND `tl_title` LIKE 'Infobox_%'
);
SELECT @articles := (
SELECT `ss_good_articles`
FROM `site_stats`
);
SELECT @infoboxes / @articles AS `ratio`; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"], "rowcount": 28}, {"headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"], "rowcount": 123}, {"headers": ["user_name", "user_editc... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 12}], "runningtime": "604.43"} | null |
Lonely arwiki categories in wikidata items | null | USE arwiki_p;
SELECT CONCAT("# [[تصنيف:",page_title,"]]"), CONCAT("[[:d:",pp_value,"]]")
FROM page
LEFT JOIN langlinks
ON ll_from = page_id
LEFT JOIN (SELECT * FROM page_props WHERE pp_propname = 'wikibase_item') AS props
ON pp_page = page_id
WHERE pp_value is not NULL
AND ll_title IS NULL
AND page_namespace ... | {"resultsets": [{"rowcount": 11, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 6, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "5.55"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 1833}], "runningtime": "191.97"} | null |
Find all cratchats | null | SELECT rev.rev_timestamp, pg.page_title
FROM page AS pg
LEFT JOIN revision_userindex AS rev ON pg.page_latest = rev.rev_id
WHERE pg.page_namespace = 4
AND ((pg.page_title RLIKE "Bureaucrat_chat") OR (pg.page_title RLIKE "crat_chat") OR (pg.page_title RLIKE "Bureaucrat_discussion"))
AND pg.page_is_redirect = 0
ORDER BY ... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 1000}], "runningtime": "10.28"} | null |
Entries of a category | Lists all entries of a category
Listet alle Einträge einer Kategorie auf | USE dewiki_p;
SELECT page_title
FROM page , categorylinks
Where cl_to = 'Begriffsklärung'
AND cl_from= page_id
Limit 100; | {"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 810}], "runningtime": "4.85"} | null |
Fae upgrade resolutions from Nationaalarchief | Limited to last 30 days. | USE commonswiki_p;
SELECT page_title
FROM page
JOIN revision_userindex ON page_id=rev_page AND rev_timestamp between 20200214150000 and 20200214170000
JOIN comment_revision ON comment_id = rev_comment_id
JOIN actor_revision ON rev_actor = actor_id AND actor_name="Fæ"
WHERE comment_text LIKE "Fæ uploaded a new version%... | {"resultsets": [{"headers": ["page_title"], "rowcount": 14}], "runningtime": "54.18"} | null |
Last Vandal Revisions | null | SELECT * FROM change_tag
LEFT JOIN change_tag_def
ON ct_tag_id = ctd_id
LEFT JOIN revision
ON ct_rev_id = rev_id
WHERE ct_tag_id IN (14,20,26,29,43,45,52,54,59,60,65,520)
ORDER BY ct_rev_id DESC;
| {"resultsets": [{"headers": ["page_title", "Comment", "Date"], "rowcount": 18}], "runningtime": "3.10"} | null |
{{Attempting wikibreak}} users w/o edits after 2018 | Users whose talk page transcludes {{Semi-retired}} (or its redirect {{semiretired}}) who have no (non-deleted) edits after 2018.
For [[WP:VPT#User search by last activity]] circa 10 February 2020. | SELECT DISTINCT CONCAT('[[User talk:', page_title, ']]') AS utpage
FROM templatelinks
JOIN page ON page_id = tl_from
WHERE tl_namespace = 10
AND tl_title IN ('attempting wikibreak')
AND tl_from_namespace = 3
AND NOT EXISTS (SELECT 1 FROM revision_userindex
JOIN actor_revision ON actor_id = r... | {"resultsets": [{"rowcount": 18, "headers": ["page_title", "Comment", "Date"]}], "runningtime": "1.31"} | null |
Census links by recoverability | null | USE enwiki_p;
SELECT
SUM(count(DISTINCT(el_to)))
FROM
externallinks
WHERE
el_index LIKE "https://gov.census.factfinder./bkmk/table/%" OR
el_index LIKE "http://gov.census.factfinder./bkmk/table/%"
GROUP BY el_to | {"connection_id": 7522525} | null |
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": ["@deleted", "@restored", "percentage"], "rowcount": 1}], "runningtime": "0.36"} | null |
Recently active users with at least 1000 edits | null | USE itwiki_p;
SELECT
revactor_actor,
actor.actor_name,
user.user_editcount,
user.user_registration,
MAX(revactor_timestamp) AS "Last edit",
COUNT(revactor_timestamp)
FROM revision_actor_temp
JOIN actor ON actor.actor_id = revision_actor_temp.revactor_actor
JOIN user ON actor.actor_user = user.user_id
WHE... | {"resultsets": [{"headers": ["n", "actor_name"], "rowcount": 1924}], "runningtime": "58.37"} | null |
Users with at least 1000 edits | null | USE itwiki_p;
SELECT *
FROM user
WHERE user_editcount > 1000
AND user_id NOT IN (SELECT ug_user from user_groups WHERE ug_group = 'bot')
AND user_id NOT IN (SELECT ipb_user FROM ipblocks WHERE ipb_user != 0)
#SELECT
# revactor_actor,
# MAX(revactor_timestamp)
#FROM revision_actor_temp
#WHERE revactor_actor IN
#(... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 29}], "runningtime": "569.36"} | null |
activiteit testen dutch wiki | null | USE nlwiki_p;
SELECT
revactor_actor,
actor_revision.actor_name,
user.user_editcount,
user.user_registration,
MAX(revactor_timestamp) AS "Last edit",
COUNT(revactor_timestamp)
FROM revision_actor_temp
JOIN actor_revision ON actor_revision.actor_id = revision_actor_temp.revactor_actor
JOIN user ON actor_re... | {"resultsets": [{"rowcount": 76, "headers": ["page_title", "cl_to"]}], "runningtime": "103.68"} | null |
Flagged revision recenct change reviews. Single day | null | use dewiki_p;
-- select t.*, fr_timestamp, fr_flags from (select rc_title, rc_this_oldid, min(fr1.fr_rev_id) as min_fr_rev_id, min(fr2.fr_rev_id) as first_fr_rev_id, rc_timestamp, group_concat(distinct(ctd_name)) as ct from recentchanges LEFT JOIN flaggedrevs as fr1 ON rc_cur_id = fr1.fr_page_id and fr1.fr_rev_id >= r... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 3}], "runningtime": "0.65"} | null |
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... | {"connection_id": 1101483} | null |
Flagged revs pendingLag-average example for phab T177951 | null | use dewiki_p;
select
floor(frs_timestamp/1000000) as d,
frs_stat_key, round(avg(frs_stat_val)) as avg_frs_stat_val
from
flaggedrevs_statistics
where
frs_stat_key="pendingLag-average"
group by d | {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 111}], "runningtime": "0.37"} | null |
Flagged revs pending_pages example for phab T177951 | null | use dewiki_p;
select
frs1.d,
syncedpagesNS0,
reviewedpagesNS0,
reviewedPagesNS0 - syncedPagesNS0 as pending_pages
from
(
select
floor(frs_timestamp/1000000) as d,
frs_stat_key,
round(avg(frs_stat_val)) as syncedPagesNS0
from
flaggedrevs_statistics
... | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 5}], "runningtime": "0.15"} | null |
updateBilderwuensche | Fetch Bilderwunsch from dewiki | USE dewiki_p;
SELECT page.page_title, pagelinks.pl_title
FROM pagelinks JOIN page ON pagelinks.pl_from = page.page_id
WHERE page.page_id IN (SELECT cl_from FROM categorylinks WHERE cl_to = 'Wikipedia:Bilderwunsch_an_bestimmtem_Ort')
AND pagelinks.pl_title LIKE 'Bilderwunsch/code%';
| {"resultsets": [{"headers": ["up_user", "up_property", "up_value"], "rowcount": 200}], "runningtime": "0.86"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 723, "headers": ["user_name"]}], "runningtime": "2.96"} | null |
Number of URLs in the Fa.wikipedia | null | USE fawiki_p;
SELECT Q.Title, count(Q.Title)
FROM (
SELECT SUBSTRING_INDEX(REGEXP_REPLACE(el_to,'https?:\/\/',''), '/', 1) as Title
FROM externallinks ) as Q
GROUP BY Q.Title
HAVING count(Q.Title)>5
order by count(Q.Title) DESC
| {"resultsets": [{"headers": ["base_id", "id", "page_title"], "rowcount": 2628}], "runningtime": "8.26"} | null |
Users with edits on pawikisource (Oct 2018) | null | Use pawikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20181001000000 AND R.rev_timestamp <= 20181031235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"headers": ["page_title", "page_namespace", "pp_value"], "rowcount": 1}], "runningtime": "69.67"} | null |
Users with edits on enwikisource (Jan 2020) | null | Use enwikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20200101000000 AND R.rev_timestamp <= 20200131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"headers": ["page_title", "page_namespace", "pp_value"], "rowcount": 0}], "runningtime": "18.89"} | null |
Users with edits on frwikisource (Jan 2020) | null | Use frwikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20200101000000 AND R.rev_timestamp <= 20200131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"rowcount": 0, "headers": ["page_title", "page_namespace", "pp_value"]}], "runningtime": "21.64"} | null |
Users with edits on pawikisource (Jan 2020) | null | Use pawikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20200101000000 AND R.rev_timestamp <= 20200131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"headers": ["page_title", "page_namespace", "pp_value"], "rowcount": 0}], "runningtime": "24.50"} | null |
Users with edits on itwikisource (Jan 2020) | null | Use itwikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20200101000000 AND R.rev_timestamp <= 20200131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"rowcount": 1, "headers": ["page_title", "page_namespace", "pp_value"]}], "runningtime": "164.60"} | null |
Users with edits on pawikisource (Jan 2019) | null | Use pawikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20190101000000 AND R.rev_timestamp <= 20190131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "4.80"} | null |
Number of anonymus edits of WLF translations | null | USE commonswiki_p;
SELECT COUNT(*) AS 'Edit count' FROM page
INNER JOIN revision ON page_id=rev_page
INNER JOIN ip_changes ON rev_id=ipc_rev_id
WHERE page_namespace=1198
AND page_title REGEXP 'Commons:Wiki_Loves_Folklore/(?:[0-9]+|Page_display_title)/' # main page
# AND page_title REGEXP 'Commons:Wiki_Loves_Fol... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.72"} | null |
Quota di contributi verificati nella Wikipedia in italiano | Patrolled edits on the Italian Wikipedia, it.wiki, it.wikipedia.
Quota giornaliera di modifiche modificate fra le ultime modifiche (30 giorni), sul totale e sulle solo modifiche effettuate da utenti non registrati. Sono escluse modifiche segnate come bot, modifiche fuori dal namespace 0, "finte" ultime modifiche (come ... | USE itwiki_p;
SELECT GIORNO, CONTRIBUTI, PATROLLED, CONCAT(ROUND(PATROLLED * 100 / CONTRIBUTI), ' %') AS PERCENTUALE, CONCAT(ROUND(ANONIMIPATROLLED * 100 / ANONIMI), ' %') AS SoloNonRegistrati
FROM (
SELECT SUBSTR(rc_timestamp, 1, 8) AS GIORNO,
SUM(rc_user > -1) AS CONTRIBUTI,
SUM(rc_patrolled) AS PATROLLED,
S... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "8.52"} | null |
counting pages example for phab:T245498 | null | use fiwiki_p;
select count(distinct(page_id)) from page; | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "3.04"} | null |
Page count example for phab:T245498 | null | use fiwiki_p;
SELECT count(distinct(page_id))
FROM pagelinks
INNER JOIN page ON pl_from = page_id
WHERE page_namespace = 0
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 4}, {"headers": ["page_id", "page_title", "totale", "linter_params", "ptotale"], "rowcount": 12}], "runningtime": "1.19"} | null |
Picasaweb LRN | null | USE commonswiki_p;
SELECT page_title
FROM
page
JOIN externallinks on el_from = page_id
JOIN categorylinks on cl_from = page_id
WHERE
el_index LIKE "%//com.google.picasaweb.%" AND
cl_to = "License_review_needed" | {"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 4}, {"headers": ["page_id", "page_title", "totale", "linter_params", "ptotale"], "rowcount": 10}], "runningtime": "1.36"} | null |
Articles created on Turkish Wikipedia within 1 month of unblock in Turkey | null | USE trwiki_p;
SELECT page_title AS 'Article', rev_timestamp AS 'Time' FROM revision
JOIN page ON rev_page = page_id
WHERE rev_parent_id = 0
AND rev_timestamp > '20200115000000'
AND rev_timestamp < '20200219000000'
AND page_namespace= 0 | {"resultsets": [{"headers": ["actor_name", "revactor_rev", "revactor_actor", "revactor_timestamp", "revactor_page", "comment_text", "page_title", "page_namespace"], "rowcount": 10}], "runningtime": "0.19"} | null |
User talk edits after 2020-02 WMIT message | null | USE metawiki_p;
SELECT page_title, CONCAT("https://meta.wikimedia.org/?diff=", rev_id) AS diff, comment_text
FROM imagelinks
JOIN revision
ON il_from_namespace = 3
AND il_to = "Wikimedia_Italia-logo.svg"
AND rev_page = il_from
AND rev_id > 19820111
AND rev_actor <> 4875
JOIN page
ON page_id = il_from
JOIN comment_revis... | {"resultsets": [{"rowcount": 10, "headers": ["actor_name", "revactor_rev", "revactor_actor", "revactor_timestamp", "revactor_page", "comment_text", "page_title"]}], "runningtime": "8.30"} | null |
Wikidata Edit Count in time frame | This query was used to determine participants with the highest Wikidata edit count in the Parliament of Ghana Challenge that run from 25 January 2020 UTC to 24 February 2020 UTC. See: https://w.wiki/G6n | select actor_name, count(*) as edits
from wikidatawiki_p.revision_userindex r
join wikidatawiki_p.actor a on r.rev_actor = a.actor_id
join wikidatawiki_p.page p on r.rev_page = p.page_id
where actor_name in (
"Masssly",
"Shahadusadik",
"Celestinesucess",
"Muhibudeen",
"Sunkanmi12",
"Oladipupo193",
"Kinvidia",
"Malak10"... | {"resultsets": [{"headers": ["number", "actor_user", "rev_user_text", "recent_user_editcount"], "rowcount": 500}], "runningtime": "87.75"} | null |
Wikipedia Edit Count in time frame | This query was used to determine participants with the highest Wikipedia edit count in the Parliament of Ghana Challenge that run from 25 January 2020 UTC to 24 February 2020 UTC. See: https://w.wiki/G6n | select actor_name, count(*) as edits
from enwiki_p.revision_userindex r
join enwiki_p.actor a on r.rev_actor = a.actor_id
join enwiki_p.page p on r.rev_page = p.page_id
where actor_name in (
"Masssly",
"Shahadusadik",
"Celestinesucess",
"Muhibudeen",
"Sunkanmi12",
"Oladipupo193",
"Kinvidia",
"Malak10",
"Darkemperror",
... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 65}], "runningtime": "183.57"} | null |
AfC review counts, last month | null | use enwiki_p;
select count(rc_id) as reviews, actor_name,
SUM(comment_text like "%Publishing accepted%") as "accept",
SUM(comment_text like "Declining submission:%") as "decline",
SUM(comment_text like "Rejecting submission:%") as "reject",
concat(round(SUM(comment_text like "%Publishing accep... | {"resultsets": [{"rowcount": 1900, "headers": ["actor_name", "concat('http://en.wikipedia.org/wiki/Wikipedia:', page_title)", "comment_text"]}], "runningtime": "14.69"} | null |
Bengali contributors with accounts created July-Nov2019 and 100-1000 edits since July2019 | null | use bnwiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count,
substr(user_registration, 1, 8) as registration_date
from
revision,
actor,
user
where
actor_user = user_id and
user_registration between 20190700000000 and 20191100000000 and
rev_timestamp > 20190700000000 and
rev_act... | {"resultsets": [{"headers": ["actor_name", "concat('http://en.wikipedia.org/wiki/Wikipedia:', page_title)", "comment_text"], "rowcount": 45}], "runningtime": "8.80"} | null |
Javanese Contributors with 1k-40k in past 9 months | null | use jvwiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
actor
where
rev_timestamp > 20190300000000 and
rev_actor = actor_id
group by
rev_actor
having
count(rev_id) between 1000 and 40000
order by
edit_count desc; | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "5.05"} | null |
Users with edits on enwikisource (Jan 2019) | null | Use hywikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20190101000000 AND R.rev_timestamp <= 20190131235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"rowcount": 31, "headers": ["page_title", "cl_to"]}], "runningtime": "257.40"} | null |
Pages that don't have Bengali label at Wikidata | করতে হবে | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), CONCAT("Lbn"), CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='enwiki' AND NOT EXISTS (
SELECT 1 FROM wb_terms WHERE CONCAT("Q", ips_item_id) = term_full_entity_id AND term_type = "label" AND term_language='en' LIMIT 1
)
#LIMIT 500
; | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 15}], "runningtime": "257.32"} | null |
Maanviljelijäluokan lisäykset | Luokkaa pystyy vaihtamaan muokkaamalla "SET @category="%maanviljelijät%";" -riviä. Kirjainkoko merkitsee ja välilyönti on "_" (alaviiva)
| use fiwiki_p;
SET @category="%maanviljelijät%";
select
concat("# ", comment_text, " ", "[[:category:", rc_title, "]]") as text
from
recentchanges_userindex LEFT JOIN categorylinks ON cl_from=rc_cur_id AND cl_to LIKE @category,
actor_recentchanges,
comment_recentchanges
where
rc_comment_id=comment_id ... | {"resultsets": [{"headers": ["number", "user_id", "user_name", "byte_count"], "rowcount": 500}], "runningtime": "227.92"} | null |
List of all locked users | null | USE centralauth_p;
SELECT gu_name
FROM globaluser
WHERE gu_locked = 1; | {"resultsets": [{"rowcount": 1, "headers": ["rev_timestamp"]}], "runningtime": "0.13"} | null |
Ownerless user and user talk pages | 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 = 2, "User", "User_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... | {"resultsets": [{"headers": ["rev_timestamp"], "rowcount": 1}], "runningtime": "0.09"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["base_id", "id", "page_title"], "rowcount": 0}], "runningtime": "0.24"} | null |
Maanviljelijäluokan lisäykset | Luokkaa pystyy vaihtamaan muokkaamalla "SET @category="%maanviljelijät%";" -riviä. Kirjainkoko merkitsee ja välilyönti on "_" (alaviiva)
| use fiwiki_p;
SET @category="%maanviljelijät%";
select
concat("# ", comment_text, " ", "[[:category:", rc_title, "]]") as text
from
recentchanges_userindex LEFT JOIN categorylinks ON cl_from=rc_cur_id AND cl_to LIKE @category,
actor_recentchanges,
comment_recentchanges
where
rc_comment_id=comment_id ... | {"resultsets": [{"rowcount": 3761, "headers": ["page_title"]}], "runningtime": "21.87"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["page_title"], "rowcount": 8049}], "runningtime": "27.47"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.