title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
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... | {"runningtime": "3.97", "resultsets": [{"rowcount": 819, "headers": ["MID", "P6305", "OTRS", "CONCAT(\"File:\",page_title)"]}]} | null |
Creation user and date for pages | For given pages, output created user and date. | use tewiki_p;
set @dbname = 'tewiki';
select
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[",page_title,"]]") as pagename
-- ctd_name
from
page,
revision,
actor
where
page_id = rev_page and
page_namespace = 0 and
-- rev_id = ct_rev_id and
rev_parent_id = 0 and
... | {"runningtime": "0.35", "resultsets": [{"rowcount": 101, "headers": ["Tables_in_dewiki_p"]}]} | null |
Creation user and date for pages | For given pages, output created user and date. | use tewiki_p;
set @dbname = 'tewiki';
select
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[",page_title,"]]") as pagename,
ctd_name
from
page,
revision,
change_tag,
change_tag_def,
actor
where
page_id = rev_page and
page_namespace = 0 and
rev_id = ct_rev_id... | {"runningtime": "0.38", "resultsets": [{"rowcount": 89, "headers": ["pp_value", "page_title"]}]} | null |
Creation user and date for pages | For given pages, output created user and date. | use tewiki_p;
set @dbname = 'tewiki';
select
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[",page_title,"]]") as pagename
from
page,
revision,
actor
where
page_id = rev_page and
page_namespace = 0 and
rev_parent_id = 0 and
actor_id=rev_actor and
page_title IN (... | {"runningtime": "0.54", "resultsets": [{"rowcount": 100, "headers": ["comment_id", "comment_hash", "comment_text", "comment_data"]}]} | null |
wikidata: deleted items that were created by User:MisterSynergy | null | USE wikidatawiki_p;
SELECT
archive.ar_title AS item,
archive.ar_timestamp AS item_creation_timestamp
FROM
archive JOIN actor_archive ON archive.ar_actor=actor_archive.actor_id
WHERE
archive.ar_namespace=0
AND archive.ar_parent_id=0
AND actor_archive.actor_name='JAnDbot'
ORDER BY
archive.ar_timestamp A... | {"connection_id": 67639348} | null |
Content translation creation statistics, translator name in a month | Main namespace articles that were created using Content Translation and not using Content Translation and subsequently deleted. Edit month as needed | use tewiki_p;
set @dbname = 'tewiki';
set @ct_tag_id = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
select
actor_name,
LEFT(rev_timestamp,8) as date,
CONCAT("[[",page_title,"]]") as pagename,ct_id
from
change_tag,
page,
revision,
a... | {"connection_id": 329664699} | null |
Translation flagged pages not using content translation tool on tewiki | null | USE tewiki_p;
SELECT CONCAT('[[', page_title, ']]') as page_title,
actor_name,
LEFT(rev_timestamp,8) as date
FROM page
INNER JOIN categorylinks ON page_id = cl_from
JOIN revision ON page_id = rev_page
JOIN actor ON actor_id=rev_actor
WHERE cl_to = "అనువదించ_వలసిన_పేజీలు" AND
page_namespace = 0 and... | {"runningtime": "3.66", "resultsets": [{"rowcount": 1000, "headers": ["ct_id", "ct_rc_id", "ct_log_id", "ct_rev_id", "ct_params", "ct_tag_id", "ctd_id", "ctd_name", "ctd_user_defined", "ctd_count", "rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_... | null |
Users evaluating filters | null | use ptwiki_p;
select user_name as 'Usuário', count(*) as 'Avaliações'
from revision
inner join page on rev_page = page_id
inner join actor on rev_actor = actor_id
inner join user on user_id = actor_user
where
page_namespace = 4 and
page_title like 'Filtro_de_edições/Análise/Filtro%'
group by user_name
order by 2 desc | {"runningtime": "0.40", "resultsets": [{"rowcount": 4, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
רשימת ערכים חדשים מטווח תאריכים | null | use hewiki_p;
select page_title from revision inner join page
on page_id = rev_page
where not rev_parent_id
and not page_namespace
and rev_timestamp >= 20200627008300 and rev_timestamp <= 20200717083000
-- and rev_timestamp >= 20190101083000 and rev_timestamp <= 20190527008300
-- and rev_timestamp >= 20191127083000 and... | {"runningtime": "20.34", "resultsets": [{"rowcount": 565, "headers": ["page_title"]}]} | null |
A "Buddhizmussal kapcsolatos témák" vagy "Hinduizmus" sablont hívó lapok | null | use huwiki_p;
-- SELECT * FROM pagelinks where pl_from=1157333 or pl_from=619565;
SELECT * FROM text
where old_text='Nirvána'; | {"runningtime": "29.00", "resultsets": [{"rowcount": 1, "headers": ["timestamp"]}, {"rowcount": 521, "headers": ["wikipage"]}]} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_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_timestam... | {"runningtime": "7.02", "resultsets": [{"rowcount": 500, "headers": ["page_title"]}]} | null |
Special:WantedCategories replica (mw.org) | Cats in red linked categories | use mediawikiwiki_p;
SELECT
page_namespace, page_title,
cl_to
FROM page
JOIN
(SELECT DISTINCT
cl_to , cl_from
FROM categorylinks
LEFT JOIN page
ON cl_to = page_title
AND page_namespace = 14
WHERE page_title IS NULL
AND cl_to NOT LIKE "%/%"
) AS cattmp
ON cattmp.cl_from = page_id
;
| {"runningtime": "422.48", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | 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... | {"runningtime": "0.22", "resultsets": [{"rowcount": 1, "headers": ["actor_user", "actor_name", "cnt"]}]} | 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... | {"runningtime": "0.60", "resultsets": [{"rowcount": 77, "headers": ["source", "target"]}]} | null |
WikiDaheim users 2020 (by first revision, by uploader) | null | USE commonswiki_p;
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count
FROM actor, revision, image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND actor.actor_id = revision.rev_actor
AND image.img_name = page.page_title
and revision.r... | {"runningtime": "0.29", "resultsets": [{"rowcount": 4, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Redirects with subpages | null | use mediawikiwiki_p;
select concat("Extension:",page_title) from page where page_is_redirect=1 and page_namespace=102
and exists (select 1 from page subpage where subpage.page_namespace = page.page_namespace
and subpage.page_title like concat(replace(page.page_title,"_","|_"),"/%") escape "|" and not exists... | {"runningtime": "0.15", "resultsets": [{"rowcount": 3, "headers": ["page_title", "rev_timestamp"]}, {"rowcount": 0, "headers": ["actor_id", "actor_user", "actor_name"]}]} | null |
Most active users by edits on bnwiki in last 3 months | null | USE bnwiki_p;
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 r... | {"runningtime": "0.88", "resultsets": [{"rowcount": 8, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 3, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Capture QuickStatement external links of {{Creator}} templates | null | use commonswiki_p;
SELECT concat(REPLACE(REPLACE(REPLACE(el_to, 'https://quickstatements.toolforge.org/index_old.html#v1=',''),'%09','|'),'%0A','|'),'S4656|\'"https://commons.wikimedia.org/wiki/Creator',page_title,'"')
#SELECT el_to, page_title
FROM externallinks
JOIN page ON page_id = el_from
JOIN categorylinks ON cl_... | {"runningtime": "12.71", "resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}]} | 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... | {"runningtime": "12.54", "resultsets": [{"rowcount": 50, "headers": ["page_namespace", "page_title", "edits"]}]} | null |
Contas pt.wiki bloqueadas em infinito com autoblock | null | use ptwiki_p;
select
ipblocks.ipb_id as `ID de bloqueio`,
user.user_name as `Nome de usuário`
from ipblocks
left join user on ipblocks.ipb_user = user.user_id
where
ipblocks.ipb_user != 0
and ipblocks.ipb_expiry = "infinity"
and ipblocks.ipb_enable_autoblock = TRUE
order by ipb_id; | {"runningtime": "0.82", "resultsets": [{"rowcount": 5, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 3, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | 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... | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"]}]} | null |
Bots ohne Edits in dewiki seit 1. August 2018 | null | USE dewiki_p;
SELECT user_name AS "Bot", MAX(revactor_timestamp) AS "letzter Edit"
FROM user_groups, user LEFT JOIN actor
ON actor_user = user_id
LEFT JOIN revision_actor_temp
ON revactor_actor = actor_id
... | {"runningtime": "44.92", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]} | null |
All P1 and P2 speedies | All deletions in the Portal and Portal talk namespaces labeled either P1 or P2.
For [[WT:CSD#Proposal: Deprecate P1 and P2]] circa 21 Aug 2020. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
CONCAT(CASE log_namespace
WHEN 100 THEN 'Portal:'
WHEN 101 THEN 'Portal talk:'
END, log_title) AS pagename,
actor_name,
comment_text
FROM logging_logindex
JOIN comment_logging ON comment_i... | {"runningtime": "105.94", "resultsets": [{"rowcount": 1516, "headers": ["editor", "accepts", "recent_edits"]}]} | null |
WMUA-UA Photo Competition participants 2012-2019 not active in WLM-UA 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2012_in_Indi... | {"runningtime": "5.28", "resultsets": [{"rowcount": 35, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]} | null |
Deleted revisions demonstration | null | select * from archive_compat where ar_namespace=0 and ar_title="Page_name_goes_here"; | {"runningtime": "0.12", "resultsets": [{"rowcount": 20, "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_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"]}]} | null |
total number of user grouped by log10 | null | use fiwiki_p;
SELECT
SUM(1) AS number_of_users,
MIN(user_editcount) AS min_editcount,
MAX(user_editcount) AS max_editcount,
FLOOR(AVG(user_editcount)) AS avg_editcount,
FLOOR(LOG10(user_editcount)) AS log10_editcount
FROM
user
LEFT JOIN (SELECT ug_user FROM user_groups WHERE... | {"runningtime": "0.62", "resultsets": [{"rowcount": 5, "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_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"]}]} | null |
Total number of user with over X edits without bots | null | use fiwiki_p;
SELECT
SUM(1)
FROM
user
LEFT JOIN (SELECT ug_user FROM user_groups WHERE ug_group='bot') as ug ON ug_user=user_id
LEFT JOIN (SELECT ufg_user FROM user_former_groups WHERE ufg_group='bot') AS ufg ON ufg_user=user_id
WHERE
ufg_user IS NULL
and ug_user IS NULL
and user_e... | {"runningtime": "0.13", "resultsets": [{"rowcount": 18, "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_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"]}]} | null |
Fiwiki FlaggedRevs 2020 reviewers by activity level | null | use fiwiki_p;
select
sum(1) as c,
a.actor_name,
group_concat(distinct(l.log_action)) as log_actions,
l.log_type
from
logging_userindex as l,
actor_logging as a,
(select ug_user as user_id from user_groups where ug_group IN ('sysop', 'editor', 'reviewer')
UNION select ufg_user as user... | {"runningtime": "38.65", "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_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"]}]} | null |
Query for Europe V | null | use fawiki_p;
select page_title
from page
where
page_is_redirect = 0
and page_namespace = 14 -- category
and page_title like 'آموزش_و_پرورش%'
order by page_title | {"runningtime": "0.86", "resultsets": [{"rowcount": 4, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Redirects from main to other namespaces | Redirects from user talk to discussions | use plwiki_p;
select p.page_title AS from_page, r.rd_namespace AS target_namespace, r.rd_title AS to_page
from redirect r, page p
where p.page_id = r.rd_from AND p.page_namespace = 3 AND r.rd_namespace = 1; | {"runningtime": "4.08", "resultsets": [{"rowcount": 1, "headers": ["male", "female", "na"]}]} | null |
نشاط المضيفين + التعديلات في طلبات المضيفين | null | use metawiki_p;
select concat ("{{u|",user_name,"}}") as "username",
(select count(*) from logging
inner join actor on actor_id = log_actor
where actor_user = user_id and log_type = "gblblock") as "Global block",
(select count(*) from logging
... | {"runningtime": "72.83", "resultsets": [{"rowcount": 378, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \")+\"]]\")", "counting"]}]} | 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... | {"runningtime": "32.64", "resultsets": [{"rowcount": 378, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")", "counting"]}]} | null |
Links to redirecting file pages - local | null | USE dewiki_p;
#USE enwiki_p;
#USE eswiki_p;
#USE frwiki_p;
#USE nlwiki_p;
#USE svwiki_p;
SET @w = LEFT (DATABASE(), LENGTH(DATABASE()) - 2);
SELECT now() AS timestamp;
#wikipedia imagelinks
(SELECT CONCAT('# [[', IF (wp.page_namespace = 14, ':{{ns:14}}:', ''), REPLACE (wp.page_title, '_', ' '), ']] ',
'... | {"runningtime": "0.92", "resultsets": [{"rowcount": 10, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 5, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 5, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
specieswiki_p: AND page_title LIKE "%et_al.,2%" | null | USE specieswiki_p;
#SELECT CONCAT(page_title)
SELECT page_title
FROM page AS page
WHERE page_namespace = 0
AND page_len > 100000
#AND page_is_redirect = 1
#AND (page_title LIKE "%peopel%" OR page_title LIKE "%Peopel%")
LIMIT 30; | {"runningtime": "27.23", "resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}]} | null |
fiwiki most used templates | null | USE fiwiki_p;
SELECT
CONCAT (
CASE
WHEN tl.tl_namespace = 10 THEN 'Malline'
WHEN tl.tl_namespace = 828 THEN 'Moduuli'
END,
':',
tl.tl_title
) AS 'Page',
COUNT(*) AS 'Transclusions',
CASE
WHEN COUNT(*) < 1000 AND MOD(COUNT(*), 100) < 60
THEN CONCAT( SUBSTR(COUNT(*), 1, LENGT... | {"runningtime": "614.91", "resultsets": [{"rowcount": 378, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")", "counting"]}, {"rowcount": 2417, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")", "counting"]}, {"rowcount": 821, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"... | null |
all articles from participants | null | use fawiki_p;
select page_title, actor_name, page_len from page, revision, actor
where (1=1)
and page_id = rev_page
and actor_id = rev_actor
and page_namespace = 0
and page_is_redirect = 0
and rev_parent_id = 0
and YEAR(rev_timestamp) = 2020
and MONTH(rev_timestamp) = 6
and actor_name in ('Persia', 'Kasir', 'Gnosis', '... | {"runningtime": "6.82", "resultsets": [{"rowcount": 1, "headers": ["timestamp"]}, {"rowcount": 968, "headers": ["wikipage"]}]} | null |
جائحة | null | USE arwiki_p;
SELECT
article.page_title as "المقالة",
left(revision.rev_timestamp,8) as "تاريخ الإنشاء"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page AND
article.page_namespace = 0
INNER JOIN categorylinks ON
cl_from = article.page_id
WHERE
... | {"runningtime": "110.40", "resultsets": [{"rowcount": 2147, "headers": ["MID", "P6243", "QID", "CONCAT(\"File:\",page_title)"]}]} | null |
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)');
| {"runningtime": "0.42", "resultsets": [{"rowcount": 128, "headers": ["page_namespace", "title", "page_len"]}]} | null |
Dyskusje użytkowników to przekierowania | Redirects from user talk to discussions | use plwiki_p;
select CONCAT('# [[Dyskusja wikipedysty:',REPLACE(p.page_title,'_',' '),']]') AS from_page, CONCAT('# [[',rd_interwiki,':',rd_namespace,':',REPLACE(r.rd_title,'_',' '),']]') AS to_page
from redirect r, page p
where p.page_id = r.rd_from AND p.page_namespace = 3 AND r.rd_namespace = 0; | {"runningtime": "31.78", "resultsets": [{"rowcount": 10000, "headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"]}]} | null |
pl.wiki Redirects from user user talk namespace to article talk namespace | Redirects from user talk to discussions | use plwiki_p;
select CONCAT('# [[Dyskusja wikipedysty:',REPLACE(p.page_title,'_',' '),']]') AS from_page, CONCAT('# [[Dyskusja:',REPLACE(r.rd_title,'_',' '),']]') AS to_page
from redirect r, page p
where p.page_id = r.rd_from AND p.page_namespace = 3 AND r.rd_namespace = 1; | {"runningtime": "0.33", "resultsets": [{"rowcount": 100, "headers": ["el_to", "page_namespace", "page_title"]}]} | 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... | {"runningtime": "0.70", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]} | 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... | {"runningtime": "1.82", "resultsets": [{"rowcount": 522, "headers": ["(CASE\n \tWHEN SUBSTRING(article.page_title, 3, 2)=\"00\" THEN REPLACE(article.page_title,\"_in_science\",\"'de bilim\")\n WHEN SUBSTRING(article.page_title, 4, 1)=\"0\" THEN REPLACE(article.page_title,\"_in_science\",\"'da bilim\")\n WHEN SUB... | null |
تصانيف هجرية بحاجة لإنشاء | null | use arwiki_p;
select concat("تصنيف:", cl_to) from categorylinks where cl_to like "1%"
and cl_to not in (select page_title from page where page_title = cl_to and page_namespace = 14 and page_is_redirect = 0) limit 50; | {"runningtime": "85.58", "resultsets": [{"rowcount": 621, "headers": ["result"]}]} | null |
WLE in Sweden participants, 2020 only | People who have uploaded images during WLE 2020 in Sweden. List ready for mass messaging (https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Earth_in_Sweden/Mass_message) | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2020_in_Sweden"
)
GROUP BY actor_name
O... | {"connection_id": 121074121} | null |
WLM in Sweden participants | People who have uploaded images during WLM in Sweden (2011–2019). List ready for mass messaging (https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Monuments_in_Sweden/Mass_message) | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2019_in_Sweden",
"Images_from_Wik... | {"runningtime": "0.83", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | null |
WikiDaheim users 2020 (by first revision, by uploader) | null | USE commonswiki_p;
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count
FROM actor, revision, image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND actor.actor_id = revision.rev_actor
AND image.img_name = page.page_title
and revision.r... | {"connection_id": 123136961} | null |
WikiDaheim users 2020 (by first revision, by uploader) | null | USE commonswiki_p;
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count
FROM actor, revision, image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND actor.actor_id = revision.rev_actor
AND image.img_name = page.page_title
and revision.r... | {"connection_id": 123136984} | null |
Wikidata-Sitelinks | null | USE dewiki_p;
SELECT CONCAT('Q', ips_item_id), ips_site_id, ips_site_page
FROM wikidatawiki_p.wb_items_per_site LEFT JOIN page
ON REPLACE(ips_site_page, ' ', '_') = page_title
AND page_namespace = 0
WHERE page_title IS NULL
AND ips... | {"connection_id": 123136997} | null |
Wikidata property data types | null | use wikidatawiki_p;
select pi_property_id, pi_type from wb_property_info; | {"runningtime": "8.64", "resultsets": [{"rowcount": 1, "headers": ["ug_user", "ug_group", "ug_expiry"]}, {"rowcount": 1, "headers": ["log_id", "log_timestamp", "log_params"]}]} | null |
Last month's markasduplicate.js usage (Wikidata) | null | USE wikidatawiki_p;
#/*
SELECT rc_timestamp, actor_name, rc_title, page_is_redirect#, comment_text
FROM recentchanges
JOIN comment ON comment_id = rc_comment_id
JOIN actor_recentchanges ON actor_id = rc_actor
JOIN page ON page_id = rc_cur_id
WHERE comment_text LIKE "%duplicate%"
AND rc_namespace = 0
ORDER BY rc_timesta... | {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["log_id", "log_timestamp"]}]} | null |
Tagged log entries on Wikidata | null | USE wikidatawiki_p;
#/*
SELECT *, ct_log_id, ctd_name
FROM change_tag
JOIN change_tag_def ON ctd_id = ct_tag_id
WHERE ct_log_id IS NOT NULL
AND ctd_name NOT IN ("openrefine-3.0", "abusefilter-condition-limit", "mobile edit", "mobile web edit", "advanced mobile edit")
AND ctd_name NOT LIKE "OAuth CID:%"
ORDER BY ct_log_... | {"runningtime": "0.09", "resultsets": [{"rowcount": 7, "headers": ["log_id", "log_timestamp"]}]} | null |
Wikimedia Commons uploads by a particular | null | SELECT rc_id, rc_user_text, rc_title, rc_comment
FROM commonswiki_p.recentchanges
WHERE rc_source = "mw.log"
AND rc_log_type = "upload"
AND rc_user_text LIKE "% Titodutta"; | {"runningtime": "0.57", "resultsets": [{"rowcount": 111, "headers": ["ipb_address", "ipb_timestamp", "ipb_reason_id", "comment_text"]}]} | null |
Titodutta-files 1 | For Titodutta: files on commons between 20190201 and 20200806 | USE commonswiki_p;
SELECT COUNT(*)
FROM revision_userindex
WHERE
rev_actor = (SELECT actor_id
FROM actor
WHERE actor_name = "Titodutta") AND
rev_timestamp >= "20190201" AND rev_timestamp <= "20200806";
| {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "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"]}]} | null |
Titodutta-files 2 | For Titodutta: files on commons between 20190201 and 20200806 - the actor_id is 5449 | USE commonswiki_p;
SELECT rev_actor, rev_page, rev_timestamp
FROM revision_userindex
WHERE
rev_actor = 5449 AND
rev_timestamp >= "20190201" AND rev_timestamp <= "20200806";
| {"runningtime": "51.42", "resultsets": [{"rowcount": 17431, "headers": ["id", "namespace", "title", "is_redirect", "len", "pagelink"]}]} | null |
Titodutta-files 3 | For Titodutta: files on commons between 20190201 and 20200806 - the actor_id is 5449 | USE commonswiki_p;
SELECT revision_userindex.rev_actor, revision_userindex.rev_page, page.page_title, revision_userindex.rev_timestamp
FROM revision_userindex
JOIN page ON revision_userindex.rev_page=page.page_id
WHERE
rev_actor = 5449 AND
rev_timestamp >= "20190201" AND rev_timestamp <= "20200806";
| {"runningtime": "4.16", "resultsets": [{"rowcount": 10, "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"]}]} | null |
Titodutta-files 4 | For Titodutta: files on commons between 20190201 and 20200806 - the actor_id is 5449 | USE commonswiki_p;
SELECT page.page_title
FROM revision_userindex
JOIN page ON revision_userindex.rev_page=page.page_id
WHERE
rev_actor = 5449 AND
rev_timestamp >= "20190201" AND rev_timestamp <= "20200806";
| {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["il_from", "il_to", "il_from_namespace"]}]} | null |
Commons tables | null | USE commonswiki_p;
DESCRIBE image | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"]}]} | null |
Commons image table | Titodutta (id=5449) files timestamped between 2019-02-01 and 2020-08-06 | USE commonswiki_p;
SELECT img_name, img_actor, img_timestamp
FROM image
WHERE img_actor = 5449 AND
img_timestamp BETWEEN "201900201" AND "20200806";
| {"runningtime": "0.53", "resultsets": [{"rowcount": 4, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 3, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Wikidata property data types | null | use wikidatawiki_p;
select pi_property_id from wb_property_info where pi_type != 'external-id'; | {"runningtime": "0.11", "resultsets": [{"rowcount": 1, "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"]}]} | null |
Mainspace pages linking to redirects to pages in [[Category:Wikipedia essays]] or subcats | [[WP:RAQ#Mainspace pages that link to a page in a specific category]] circa 27-30 September 2019.
Assumes the category tree itself hasn't changed since the initial queries. (There has to be some efficient way to generate a list of categories in a tree to a certain depth in pure sql. Doesn't there?)
Related queries:... | -- Redirects in that category tree - mainly to show that there's little, if any, overlap with queries 39227 and 39228
SELECT DISTINCT CONCAT('[[', CASE page_namespace
WHEN 2 THEN 'User:'
WHEN 4 THEN 'Wikipedia:'
ELSE CONCAT('{{... | {"runningtime": "327.72", "resultsets": [{"rowcount": 53, "headers": ["Tries", "Size_MB", "Document"]}]} | null |
tagged image files not to be transferred to the commons | null | USE commonswiki_p;
SELECT DISTINCT p.page_id,p.page_len,p.page_title FROM page p
INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to IN
('Tiroler Kunstkataster object with known ID')
WHERE p.page_namespace = 6 | {"runningtime": "0.03", "resultsets": []} | 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 = pa... | {"runningtime": "0.02", "resultsets": []} | null |
Imagens que estão apenas na Categoria:Imagens de conteúdo restrito | null | USE ptwiki_p;
SELECT CONCAT('Ficheiro:', REPLACE(page_title, '_', ' ')) Página,
actor_name Criada_por
FROM (
SELECT cl1.cl_from pagid
FROM categorylinks cl1
INNER JOIN categorylinks cl2 ON cl1.cl_from = cl2.cl_from
WHERE cl1.cl_to = 'Imagens_de_conteúdo_restrito'
GROUP BY cl1.cl_from HAVING COUNT(*) = 1... | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["img_name", "img_timestamp"]}]} | null |
Long-ish stubs as of Aug 2020 | All pages in a category ending with "stubs" that are 50000-100000 characters long.
For [[WP:VPR#Get rid of stub tags]] circa 22 Jun 2020. | SELECT page_len,
page_namespace,
page_title,
cl_to
FROM page
JOIN categorylinks ON cl_from = page_id
WHERE cl_to LIKE '%stubs'
AND page_len >= 50000 AND page_len <= 100000
GROUP BY cl_to
ORDER BY page_len DESC; | {"runningtime": "7.32", "resultsets": [{"rowcount": 1, "headers": ["Number of articles"]}, {"rowcount": 12, "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",... | null |
test1 | bureaucrat edits on huwp | USE huwiki_p;
SELECT
a.actor_name,
e.edits,
e.last_edit,
l.logs,
l.last_log
FROM actor_user a
LEFT JOIN (
SELECT COUNT(rc_id) AS 'edits', MAX(rc.rc_timestamp) AS 'last_edit', rc_actor AS 'editor'
FROM recentchanges_userindex rc
WHERE rc_type = 0
GROUP BY rc_actor
) AS e ON... | {"connection_id": 139432262} | null |
mlwiki least edited templates | null | USE mlwiki_p;
SELECT page_title AS title, COUNT(*) AS edits FROM revision, `page`
WHERE page_id = rev_page AND page_namespace = 10 AND page_is_redirect = 0
GROUP BY page_id
ORDER BY edits
LIMIT 75000; | {"runningtime": "8.29", "resultsets": [{"rowcount": 403, "headers": ["p", "links", "usages"]}]} | null |
Wikidata items without Bengali label (based on bnwiki) | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), CONCAT("Lml"), CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='mlwiki' 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='ml' LIMIT 1
)
LIMIT 2000
; | {"runningtime": "157.48", "resultsets": [{"rowcount": 12882, "headers": ["el_to", "page", "cnt"]}]} | null |
EntomologyWLE-week-new | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(user_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', ']]') as user_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
... | {"runningtime": "0.76", "resultsets": [{"rowcount": 29, "headers": ["page_title"]}]} | null |
Wikimaniacs of fawiki | null | USE fawiki_p;
SELECT
actor_name,
COUNT(*) total,
SUM(CASE WHEN page_namespace = 0 THEN 1 ELSE 0 END) / COUNT(*) AS article_pct
FROM actor_revision
JOIN revision_userindex
ON actor_id = rev_actor
JOIN page
ON rev_page = page_id
WHERE
rev_timestamp > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 180 DAY), '%Y%m0100000... | {"runningtime": "2.12", "resultsets": [{"rowcount": 25, "headers": ["page_title"]}]} | null |
EntomologyWLE-week-new | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(user_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', ']]') as user_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
... | {"runningtime": "0.26", "resultsets": [{"rowcount": 1, "headers": ["user", "edit_count"]}]} | null |
Scrape bad OTRS from "OTRS accreditation" templates | null | use commonswiki_p;
SELECT concat("-M",page_id) AS MID,
'P6305',
concat('"',REPLACE(el_to,'https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=',''),'"') AS OTRS,
CONCAT("File:",page_title)
FROM page
JOIN templatelinks t1 ON page_id=t1.tl_from and t1.tl_namespace = 10 AND t1.tl_title="O... | {"runningtime": "15.24", "resultsets": [{"rowcount": 68, "headers": ["user_id", "user_name"]}]} | null |
EntomologyWLE-week-improve | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(article, 'Всього'),
user_number,
size_increase,
users
FROM
(
SELECT
CONCAT('[[', REPLACE(page_title, '_', ' '), ']]') as article,
COUNT(1) AS user_number,
SUM(user_size_increase) as si... | {"runningtime": "1.97", "resultsets": [{"rowcount": 38, "headers": ["user_id", "user_name"]}]} | null |
Stubs with no transclusion of Şablon:Web sitesi bilgi kutusu | null | USE trwiki_p;
SELECT
p.page_title
FROM
page p
INNER JOIN categorylinks cl
ON p.page_id = cl.cl_from
AND cl.cl_to = 'Web_sitesi_taslakları'
WHERE
p.page_namespace = 0
AND NOT EXISTS
(SELECT 1 FROM templatelinks
WHERE tl_from = p.page_id
AND tl_from_namespace = 0
AND tl_namespace = ... | {"runningtime": "0.14", "resultsets": [{"rowcount": 12, "headers": ["page_title"]}]} | null |
Show all queriable public databases | Displays a list of the public WMFLabs databases that can be queried through Quarry. There is one database per language and project. | SHOW databases; | {"runningtime": "0.12", "resultsets": [{"rowcount": 8, "headers": ["user", "img_count"]}]} | null |
Watchlist table does not exist | Was it renamed? https://www.mediawiki.org/wiki/Manual:Watchlist_table | DESCRIBE watchlist; | {"runningtime": "158.17", "resultsets": [{"rowcount": 0, "headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"]}]} | null |
Watchlist table does not exist | Was it renamed? https://www.mediawiki.org/wiki/Manual:Watchlist_table | SHOW tables; | {"runningtime": "0.66", "resultsets": [{"rowcount": 12, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 5, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 6, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Most daily edits in Spanish Wikipedia in 2020 | null | use eswiki_p;
select
date_format(rev_timestamp, '%Y-%m-%d') as day,
actor_name,
count(*) as count
from revision
join actor
on actor_id = rev_actor
where actor_name not like '%Bot'
and rev_timestamp like '2020%'
group by 1, 2
order by count(*) desc
limit 100; | {"connection_id": 374953252} | null |
ZScaler Blocks | null | SELECT ipb_address,
actor_name,
comment_text
FROM ipblocks
JOIN actor ON actor_id = ipb_by_actor
JOIN comment ON comment_id = ipb_reason_id
WHERE comment.comment_text LIKE "%zscaler%" COLLATE utf8_general_ci; | {"runningtime": "10.30", "resultsets": [{"rowcount": 17, "headers": ["page_title", "page_id", "page_namespace", "cl_from", "cl_to", "Dummy"]}]} | null |
Discussion tools users at cswiki | null | USE frwiki_p
SELECT actor_name, COUNT(*)
FROM change_tag JOIN revision ON ct_rev_id=rev_id JOIN actor on actor_id=rev_actor
WHERE ct_tag_id=(select ctd_id from change_tag_def where ctd_name="discussiontools")
GROUP BY actor_id
ORDER BY COUNT(*) | {"runningtime": "136.47", "resultsets": [{"rowcount": 93, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}]} | null |
Name search | null | use wikidatawiki_p;
select CONCAT("Q",ips_item_id)
#from wb_terms where term_language = 'en' and term_type = 'label' and term_text LIKE 'taxon_author'
from pagelinks as pl
WHERE pl_title = 'P405'
limit 10;
| {"runningtime": "157.18", "resultsets": [{"rowcount": 15000, "headers": ["count", "page_title"]}]} | null |
list of top 10 article creators | null | use scowiki_p;
select user_name, count(*) as pages, group_concat(page_title)
from revision_userindex r
join page on rev_page = page_id
left join actor on rev_actor = actor_id
left join user on actor_user = user_id
where rev_parent_id = 0
and page_namespace = 0
group by rev_actor with rollup
| {"runningtime": "1.06", "resultsets": [{"rowcount": 347, "headers": ["page_namespace", "page_title", "cl_to"]}]} | null |
মোট সম্পাদনার সংখ্যা | ১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন। | 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... | {"runningtime": "6.50", "resultsets": [{"rowcount": 3, "headers": ["count(p1.page_id)", "min(p1.page_title)"]}]} | null |
Possessives without s after apostrope | null | select page_title from page
where page_namespace=0
and page_is_redirect=0
and (page_title like '%s''_%') | {"runningtime": "0.62", "resultsets": [{"rowcount": 233, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
IDF related pages need image | pages without image | use hewiki_p;
select page_title from page subject
inner join categorylinks cl on cl_from=subject.page_id
where cl.cl_to like '%אלופי_צה"ל%' and subject.page_namespace=0 and not exists(select * from imagelinks where il_from=subject.page_id)
group by page_title; | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["Title", "Rest_URL"]}]} | null |
mytools1 | null | USE idwiki_p;
SELECT page.page_title
FROM page, categorylinks, revision, actor
WHERE page.page_id=categorylinks.cl_from
AND categorylinks.cl_to = "Sastrawan_Indonesia"
AND page.page_id=revision.rev_page
AND revision.rev_actor=actor.actor_id
AND actor.actor_name = "Igho"
GROUP BY ... | {"runningtime": "0.11", "resultsets": [{"rowcount": 1, "headers": ["Title", "Rest_URL"]}]} | null |
mytools2 | null | USE idwiki_p;
SELECT page.page_title
FROM page, categorylinks, revision, actor
WHERE page.page_id=categorylinks.cl_from
AND categorylinks.cl_to = "Pengusaha_Indonesia"
AND page.page_id=revision.rev_page
AND revision.rev_actor=actor.actor_id
AND actor.actor_name = "Igho"
GROUP BY ... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["Title", "Rest_URL"]}]} | null |
Find in [[Category:PD-self]] by uploader | null | USE commonswiki_p;
SELECT actor_name, count(*) as tot
FROM page
INNER JOIN revision ON page_id = rev_page and rev_parent_id = 0
Inner JOIN actor on rev_actor=actor_id
INNER JOIN categorylinks ON cl_from = page_id and cl_to = "PD-self"
where page_namespace = 6
group by actor_name
order by tot desc | {"runningtime": "0.12", "resultsets": [{"rowcount": 1, "headers": ["Title", "Rest_URL"]}]} | null |
External links from pages in either of 2 cats | For [[WP:RAQ#Medical external links survey]] circa 30 Aug 2020. | SELECT site, COUNT(*)
FROM (SELECT REGEXP_REPLACE(el_to, '^(?:[a-z]*:)?//([^/]*)(?:.*)', '\\1') AS site
FROM externallinks
JOIN page ON page_id = el_from
JOIN categorylinks ON cl_from = page_id
WHERE cl_to IN ('All_WikiProject_Medicine_articles', 'WikiProject_Anatomy_articles')) sq
GROUP BY site... | {"runningtime": "7.18", "resultsets": [{"rowcount": 1, "headers": ["page_title"]}]} | null |
Label/description/alias stats for 8th Schedule tongues | (Had to split the query since it kept getting killed lately. The rest of the languages are tracked in query #31655.)
Thanks, Pasleim, for the original query! | use wikidatawiki_p;
SELECT CURRENT_DATE;
SELECT
term_entity_type,
term_language,
count(if(term_type = 'label',1,null)) as labels,
count(if(term_type = 'description',1,null)) as descriptions,
count(if(term_type = 'alias',1,null)) as aliases
FROM wb_terms
WHERE term_language IN (
'as', 'bn', 'gom', 'gom-... | {"runningtime": "25.05", "resultsets": [{"rowcount": 0, "headers": ["Title", "Rest_URL"]}]} | null |
External links from mainspace pages with talk pages in cats | For [[WP:RAQ#Medical external links survey]] circa 30 Aug 2020. | SELECT site, COUNT(*)
FROM (SELECT REGEXP_REPLACE(el_to, '^(?:[a-z]*:)?//([^/]*)(?:.*)', '\\1') AS site
FROM page tp
JOIN page mp ON mp.page_namespace = 0 AND mp.page_title = tp.page_title
JOIN externallinks ON el_from = mp.page_id
JOIN categorylinks ON cl_from = tp.page_id
WHERE cl_to IN ... | {"runningtime": "0.11", "resultsets": [{"rowcount": 10, "headers": ["Title", "Rest_URL"]}]} | null |
Talk archives of BLPs | null | select CONCAT('Talk:', page_title)
from page
where page_namespace = 1
and page_title like '%/Archive%'
and page_is_redirect = 0
and SUBSTRING_INDEX(page_title, '/', 1) in (
select page_title
from page
join categorylinks on cl_from = page_id
where cl_to = 'Biography_articles_of_living_people'
and page_namespace... | {"runningtime": "25.79", "resultsets": [{"rowcount": 0, "headers": ["Title", "Rest_URL"]}]} | null |
External links from mainspace pages with talk pages in cats | For [[WP:RAQ#Medical external links survey]] circa 30 Aug 2020. | SELECT site, COUNT(*) AS LINKS
FROM (SELECT REGEXP_REPLACE(el_to, '^(?:[a-z]*:)?//([^/]*)(?:.*)', '\\1') AS site
FROM page tp
JOIN page mp ON mp.page_namespace = 0 AND mp.page_title = tp.page_title
JOIN externallinks ON el_from = mp.page_id
JOIN categorylinks ON cl_from = tp.page_id
WHERE ... | {"runningtime": "0.22", "resultsets": [{"rowcount": 1, "headers": ["id", "type", "language", "text"]}]} | null |
Recent additions of labels by certain users in Malayalam | (forked code from Mahir. Modified as per requirement a little bit.) | USE wikidatawiki_p;
SELECT current_date;
SELECT rc_actor as Username, COUNT(*) as Number_of_labels_added
FROM (
SELECT rc_actor,
rc_title, comment_text
# count(comment_text) as added
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
WHERE comment_text REGEXP 'wbsetlab... | {"runningtime": "0.17", "resultsets": [{"rowcount": 2, "headers": ["wbtl_id", "wbtl_type_id", "wbtl_text_in_lang_id"]}, {"rowcount": 5, "headers": ["id", "language", "text"]}]} | null |
Changes in Wikidata for some users in a period of time | null | USE wikidatawiki_p;
SELECT actor_name,
rc_title, comment_text, rc_timestamp, rc_namespace
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor
WHERE actor_name IN ('Gnoeee', 'Ranjithsiji', 'Adhitya1997', 'Akbarali')
A... | {"runningtime": "0.98", "resultsets": [{"rowcount": 357, "headers": ["wbit_id", "wbit_item_id", "wbit_term_in_lang_id"]}]} | null |
Most active users by edits on mlwiki in last 3 months | List of active editors in Malayalam Wikipedia
| USE mlwiki_p;
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 r... | {"runningtime": "17.76", "resultsets": [{"rowcount": 0, "headers": ["Benutzerseite", "ist in Kategorie"]}]} | null |
All categories with Wikidata link that aren't using Wikidata Infobox or Taxonavigation | null | use mlwiki_p;
SELECT DISTINCT pp.pp_value, p1.page_title, tl.tl_namespace, tl.tl_title
FROM categorylinks AS c1
JOIN page AS p1 ON c1.cl_from=p1.page_id AND p1.page_namespace=14 AND p1.page_is_redirect=0
JOIN page_props AS pp ON pp.pp_page = p1.page_id AND pp.pp_propname = 'wikibase_item'
LEFT JOIN templatelinks AS tl ... | {"connection_id": 175713737} | null |
Most active new users in this month (bnwiki) | null | USE mlwiki_p;
SELECT user_name AS "User", user_editcount AS "Edit counts", user_registration AS "registration" FROM user
HAVING user_editcount>0 AND user_registration BETWEEN 20160800000000 AND 20160900000000
ORDER BY user_editcount DESC
LIMIT 50; | {"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
Pages that don't have ml label at Wikidata | করতে হবে | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id) as qid,",", CONCAT('"',ips_site_page,'"') as Lml
FROM wb_items_per_site
WHERE ips_site_id='mlwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl... | {"connection_id": 175729620} | null |
Recent additions of labels by certain users in Malayalam | (forked code from Mahir. Modified as per requirement a little bit.) | USE wikidatawiki_p;
SELECT current_date;
SELECT actor_name as Username, COUNT(*) as Number_of_labels_added
FROM (
SELECT actor_name,
rc_title, comment_text
FROM recentchanges
LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id
LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor
WHERE com... | {"runningtime": "1687.85", "resultsets": [{"rowcount": 1, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
RedWarn users | null | USE enwiki_p;
SELECT
actor_name as `Username`,
user_editcount as `Edit count`,
user_registration as `Registration date`,
NOT(ug_group IS NULL) as `30/500`,
COUNT(*) as `RedWarn edits`,
COUNT(*)/user_editcount*100 as `RedWarn %`,
ipb_sitewide as `Currently blocked`
FROM revision_userindex
... | {"runningtime": "0.38", "resultsets": [{"rowcount": 100, "headers": ["rev_id", "rev_page", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_parent_id", "page_namespace", "page_title"]}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.