title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
مقالات ويكيبيديا حسب الموضوع | null | use arwiki_p;
select replace(replace(cl_to, "بوابة_", ""),"/مقالات_متعلقة", "") as "الموضوع", count(cl_from) as "عدد المقالات", ((count(cl_from)/1019000)*100) as "النسبة"
from categorylinks
where cl_to like "بوابة_%متعلقة"
and cl_from in (select page_id from page where page_id= cl_from and page_namespace = 0 and page_i... | {"resultsets": [{"headers": ["\u0627\u0644\u0645\u0642\u0627\u0644\u0629", "\u0627\u0644\u0646\u0633\u062e\u0629", "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u0645\u0639\u0631\u0641 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0625\u0646\u0634\u0627\u0621",... | null |
Empty | null | null | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 148}], "runningtime": "213.72"} | null |
المستخدمون حسب مرات النقل | null | use arwiki_p;
select actor_name, COUNT(*)
from logging
inner join actor
on actor_id = log_actor
where log_type = "move"
and actor_user NOT IN
(SELECT ug_user
FROM user_groups
WHERE user_groups.ug_group='bot')
group by actor_name
ORDER BY COUNT(*) DESC
LIMIT 100;
| {"runningtime": "5.86", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
إحصاءات العام | null | use arwiki_p;
/*عدد التعديلات الكلي*/
select count(*) from revision where rev_timestamp like "2019%";
/*عدد التعديلات البوتية*/
select count(*) from revision
inner join actor
on actor_id = rev_actor
where rev_timestamp like "2019%"
and actor_user in (select ug_user from user_groups where ug_user = actor_user and ug_... | {"runningtime": "886.99", "resultsets": [{"headers": ["user_id", "user_name", "user_editcount", "user_registration"], "rowcount": 11}]} | null |
Most users with added bytes 2019 | null | USE kowiki_p;
SELECT CONCAT("[[User:",user_name,"|",user_name,"]]") AS user_name, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count, COUNT(rev.rev_id) as edit_count
FROM user
JOIN revision rev
ON user_id = rev.rev_user
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
JOIN page
ON pa... | {"resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "user_groups"], "rowcount": 31}], "runningtime": "4.66"} | null |
Pages created by Content Translation in Armenian Wikipedia | null | use hywiki_p;
set @change_tag_id = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
select
distinct(rev_page),
page_title,
page_len
from
revision,
page
where
rev_page = page_id and
page_namespace = 0 and
rev_id in (
select ct_rev_id
from change... | {"runningtime": "4.84", "resultsets": [{"headers": ["page_title"], "rowcount": 4}]} | null |
Ruwiki IWRM.js usage → wikitable | null | USE ruwiki_p;
SELECT
CONCAT('[[User:', actor_name, '|]]') AS User,
COUNT(rev_id) AS Edits
FROM revision
JOIN actor ON rev_actor = actor_id
JOIN change_tag ON ct_rev_id = rev_id
JOIN change_tag_def ON ct_tag_id = ctd_id
WHERE ctd_name = 'iwrm'
GROUP BY rev_actor
ORDER BY edits DESC; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 1}], "runningtime": "0.14"} | 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.31", "resultsets": [{"headers": ["cl_to", "pagecount"], "rowcount": 8}]} | null |
المستخدمون غير النشطين - تحديث | null | use arwiki_p;
select concat("{{مس|",actor_name,"}}") as "اسم المستخدم", ug_group as "الصلاحية"
from actor_revision
inner join user_groups
on actor_user = ug_user
where (ug_group like "editor" or ug_group like "autoreview" or ug_group like "uploader")
and actor_id not in (select rev_actor from revision_userindex where r... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 35}], "runningtime": "117.16"} | null |
مجموع تعديلات البوتات في 2019 | null | use arwiki_p;
select count(*) from revision_userindex
inner join actor_revision
on actor_id = rev_actor
where rev_timestamp like "2019%"
and actor_user in (select ug_user from user_groups where ug_user = actor_user and ug_group = "bot");
| {"resultsets": [{"headers": ["log_timestamp", "log_id", "log_page", "log_action", "log_params"], "rowcount": 1}], "runningtime": "1.80"} | null |
Checking out Categories | null | USE enwiki_p;
SELECT page_id
FROM page
WHERE page_title = 'Mohamed_Abdullahi_Mohamed' | {"resultsets": [{"headers": ["COUNT(rev_actor)"], "rowcount": 25}], "runningtime": "58.00"} | null |
GA/FA and GAN/FAC linked from April 14 | GA/FA and GAN/FAC linked from [[April 14]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["actor_user", "COUNT(revision.rev_actor)"], "rowcount": 202131}], "runningtime": "792.37"} | 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": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | null |
zhwikt page info for Template:Zhushi (T250005) | null | USE zhwiktionary_p;
SELECT *
FROM page
WHERE page_namespace = 10 AND page_title = 'zhushi';
SELECT *
FROM page
WHERE page_namespace = 10 AND page_title = 'Zhushi'; | {"resultsets": [{"headers": ["user_name", "edits"], "rowcount": 31}], "runningtime": "1.59"} | null |
TEST | 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
INNER JOIN categorylinks ON page_id = cl_from AND cl_to = 'بوابة_أعلا... | {"resultsets": [{"headers": ["CONCAT('# [[:File:', page_title, ']]')"], "rowcount": 28}], "runningtime": "4.15"} | null |
GA/FA and GAN/FAC linked from April 15 | GA/FA and GAN/FAC linked from [[April 15]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"runningtime": "6.32", "resultsets": [{"headers": ["page_title"], "rowcount": 50}]} | null |
zhwiki: recent Bluedecklibrary changes | null | USE zhwiki_p;
SELECT
rev_id, rev_timestamp,
/*page_id,*/ page_title, actor_name, comment_text, ug_group
FROM revision
LEFT JOIN page ON revision.rev_page = page.page_id
LEFT JOIN comment ON revision.rev_comment_id = comment.comment_id
LEFT JOIN actor ON rev_actor = actor_id
LEFT JOIN user ON actor_user = user_id
LEFT J... | {"resultsets": [{"headers": ["Tables_in_simplewiki_p"], "rowcount": 92}, {"headers": ["rev_page"], "rowcount": 10}, {"headers": ["rev_page", "page_title", "rev_timestamp"], "rowcount": 10}, {"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_to... | null |
zhwiki: recent changed Bluedecklibrary page | null | USE zhwiki_p;
SELECT rev_timestamp, page_title, actor_name, comment_text, ug_group
FROM page
LEFT JOIN revision ON page_latest = rev_id
LEFT JOIN comment ON rev_comment_id = comment_id
LEFT JOIN actor ON rev_actor = actor_id
LEFT JOIN user ON actor_user = user_id
LEFT JOIN user_groups ON user_id = ug_user
WHERE page_na... | {"resultsets": [{"headers": ["COUNT(rev_id)"], "rowcount": 10}, {"headers": ["editcounts"], "rowcount": 10}, {"headers": ["editcounts", "rev_actor", "user_name"], "rowcount": 10}], "runningtime": "240.08"} | null |
Využití neexistujících podšablon šablony Data státu | null | use cswiki_p;
select pl_title, count(*) from pagelinks where pl_from_namespace%2 like 0 and pl_from_namespace not like 2 and pl_from not like 661530 and pl_namespace like 10 and pl_title like 'Data_státu/%' and pl_title not in (select page_title from page where page_namespace like 10) and pl_title not like 'Data_státu/... | {"runningtime": "35.39", "resultsets": [{"headers": ["page_title", "el_to"], "rowcount": 603}]} | null |
Využití neexistujících podšablon šablony Data státu | null | use cswiki_p;
select pl_title, count(*) from pagelinks where pl_from_namespace%2 like 0 and pl_from_namespace not like 2 and pl_from not like 661530 and pl_namespace like 10 and pl_title like 'Data_státu/%' and pl_title not in (select page_title from page where page_namespace like 10) and pl_title not like 'Data_státu/... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 208}], "runningtime": "172.69"} | null |
~bad chars in wikilinks | chars that should not be used in filenames and links | USE enwikisource_p;
SELECT CONCAT('# [[', IF (page_namespace != 0, CONCAT(':{{ns:', page_namespace,'}}:'), ''), REPLACE(page_title, '_', ' '), ']] ',
'→ [[', IF (pl_namespace != 0, CONCAT('{{ns:', pl_namespace, '}}:'), ''), REPLACE(pl_title, '_', ' '), ']] : ',
REPLACE(
REPLACE... | {"runningtime": "22.95", "resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"], "rowcount": 1699}]} | null |
تخصيص البذور حسب المقالات المشابهة حسب التصنيف | null | use arwiki_p;
select concat("#[[", p1.page_title,"]]--->",
group_concat(DISTINCT concat("<div class = \"stub-value ",cl4.cl_to,"\">", cl4.cl_to, "</div>") SEPARATOR ' '),"</br>")
from page p1
inner join categorylinks cl1
on cl1.cl_from = p1.page_id
inner join categorylinks cl2
on p1.page_id = cl2.cl_from
inn... | {"runningtime": "129.62", "resultsets": [{"headers": ["tl_title", "count_tl_title"], "rowcount": 7}]} | null |
Test | null | SET max_statement_time = 300;
SELECT page_title
FROM revision_userindex
JOIN page ON rev_page = page_id
JOIN logging_logindex ON log_page = rev_page
WHERE log_actor = 0
AND rev_parent_id = 0
AND log_type = "delete"
AND log_action = "delete"
ORDER BY log_timestamp DESC
LIMIT 10 | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 12}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 5}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.89"} | 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": ["totale", "page_count_error", "weight"], "rowcount": 12}, {"headers": ["page_id", "page_title", "page_len", "totale", "linter_params", "ptotale"], "rowcount": 33}], "runningtime": "2.71"} | null |
Number of distinct red links on huwiki | Mainspace-to-mainspace only. | use huwiki_p;
SELECT COUNT(DISTINCT pl_title)
FROM pagelinks LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title
WHERE pl_from_namespace = 0 AND pl_namespace = 0 AND page_title IS NULL ; | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 99}], "runningtime": "235.70"} | null |
T242626 | null | use fawiki_p;
select *
from revision
where rev_id in (27990843, 27993619); | {"connection_id": 27146274} | null |
Non-free SVGs | null | USE enwiki_p;
SELECT COUNT(page_id)
FROM categorylinks
JOIN page ON page_id = cl_from
WHERE
cl_to = "All_non-free_media"
AND page_title LIKE "%.svg"
AND page_namespace = 6 | {"resultsets": [{"headers": ["page_title", "el_to"], "rowcount": 574}], "runningtime": "36.79"} | null |
GA/FA and GAN/FAC linked from April 16 | GA/FA and GAN/FAC linked from [[April 16]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | 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_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 100}], "runningtime": "0.45"} | null |
Missing images | null | use hewiki_p;
SELECT
page_title,
il_to
FROM page
JOIN imagelinks
ON page_id = il_from
WHERE (NOT EXISTS(
SELECT
1
FROM image
WHERE img_name = il_to))
AND (NOT EXISTS(
SELECT
1
FROM commonswiki_f_p.page
WHERE page_title = il_to
AND page_namespace = 6))
AND page_namespace = 0; | {"resultsets": [{"headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params", "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", "... | null |
geotags table | null | use enwikivoyage_p;
SELECT * FROM geo_tags WHERE gt_globe = 'earth' LIMIT 10; | {"runningtime": "2.49", "resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 12}, {"headers": ["page_id", "page_title", "page_len", "totale", "linter_params", "ptotale"], "rowcount": 33}]} | null |
Empty | null | null | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 133}], "runningtime": "172.49"} | null |
Nombre de pages avec le modèle Infobox_Commune_de_France sur la Wikipédia FR | La requête compte le nombre de pages possédant le modèle Infobox_Commune_de_France dans leur révision actuelle. Environ 35 000 serait un bon nombre. | use frwiki_p;
SELECT count(*) as nb_pages_with_template
FROM revision
join page on page_latest = rev_id
JOIN templatelinks
ON tl_from = page_id
WHERE tl_namespace = 10
AND tl_title = "Infobox_Commune_de_France"
AND page_namespace = 0; | {"runningtime": "24.04", "resultsets": [{"headers": ["page_title"], "rowcount": 34}]} | null |
Pages avec le modèle Infobox_Commune_de_France sur la Wikipédia FR | La requête liste les titres des pages possédant le modèle Infobox_Commune_de_France dans leur révision actuelle. | use frwiki_p;
SELECT page_title
FROM revision
join page on page_latest = rev_id
JOIN templatelinks
ON tl_from = page_id
WHERE tl_namespace = 10
AND tl_title = "Infobox_Commune_de_France"
AND page_namespace = 0
order by page_title asc; | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"], "rowcount": 1722}], "runningtime": "28.93"} | null |
Draft 01 | null | SELECT
p1.page_namespace,
p1.page_title
FROM redirect AS rd
JOIN page p1
ON rd.rd_from = p1.page_id
LEFT JOIN page AS p2
ON rd_namespace = p2.page_namespace
AND rd_title = p2.page_title
WHERE rd_namespace >= 0
AND p2.page_namespace IS NULL
ORDER BY p1.page_namespace ASC; | {"resultsets": [{"headers": ["log_title", "log_timestamp"], "rowcount": 77}], "runningtime": "2.60"} | null |
AfC daily review stats (review, accept, decline) | null | use enwiki_p;
select DATE(rc_timestamp) AS date,count(rc_id) as reviews, SUM(comment_text like "%Publishing accepted%") as accepts,
SUM(comment_text like "Declining submission:%") as declines,
SUM(comm... | {"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 12}, {"headers": ["page_id", "page_title", "page_len", "totale", "linter_params", "ptotale"], "rowcount": 33}], "runningtime": "3.81"} | null |
GA/FA and GAN/FAC linked from April 18 | GA/FA and GAN/FAC linked from [[April 18]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"runningtime": "0.16", "resultsets": [{"headers": ["page_id", "distinct_editors", "edit_count", "page_len", "page_namespace", "page_is_redirect"], "rowcount": 10}]} | null |
Articles in certain category by their size | null | SELECT P.page_title, P.page_len
FROM ukwiki_p.page P
JOIN ukwiki_p.page PT ON P.page_title=PT.page_title
JOIN ukwiki_p.categorylinks CL ON PT.page_id=CL.cl_from
WHERE P.page_namespace=0 AND PT.page_namespace=1
AND CL.cl_to="Статті конкурсу «Європейська весна 2020» на тему культура"
ORDER BY P.page_len DESC | {"runningtime": "40.46", "resultsets": [{"headers": ["date", "reviews", "accepts", "declines", "rejects"], "rowcount": 31}]} | null |
All pages without images (Sw.wiki) | null | USE swwiki_p;
select * from page
where page_id not in(select il_from from imagelinks where il_from_namespace=0) #all page ids of pages without images
and page_namespace=0
| {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 111}], "runningtime": "0.71"} | null |
Articles in certain category by their size | null | SELECT P.page_title, P.page_len
FROM ukwiki_p.page P
JOIN ukwiki_p.page PT ON P.page_title=PT.page_title
JOIN ukwiki_p.categorylinks CL ON PT.page_id=CL.cl_from
WHERE P.page_namespace=0 AND PT.page_namespace=1
AND CL.cl_to="Статті_конкурсу_«Європейська_весна_2020»_на_тему_історія"
ORDER BY P.page_len DESC | {"resultsets": [{"headers": ["page_id", "distinct_editors", "edit_count", "page_len", "page_namespace", "page_is_redirect"], "rowcount": 10000}], "runningtime": "62.20"} | null |
Wrong fp_stable in flaggedpages | null | USE dewiki_p;
SELECT * FROM comment
JOIN revision
ON rev_comment_id = comment_id
WHERE comment_id < 10000 AND comment_text like "%File renamed%" | {"runningtime": "6.26", "resultsets": [{"headers": ["date", "total (MiB)", "articles", "average (B)"], "rowcount": 1}, {"headers": ["date", "total (MiB)", "pages", "average (B)"], "rowcount": 1}, {"headers": ["date", "total (MiB)", "pages", "average (B)"], "rowcount": 1}]} | null |
Links to user | null | use enwiki_p;
SELECT PL.pl_title AS user_id, P.page_title AS project
FROM page P
JOIN pagelinks PL
ON PL.pl_from = P.page_id
WHERE PL.pl_namespace = 2 AND P.page_namespace = 4 AND
P.page_title LIKE 'WikiProject_%' LIMIT 50; | {"resultsets": [{"headers": ["ultima ejecucion"], "rowcount": 1}, {"headers": ["isMujer", "counted"], "rowcount": 2}, {"headers": ["page_title", "page_len", "rev_timestamp"], "rowcount": 127}], "runningtime": "8.89"} | null |
TOP reviewers pl all-time | null | USE ptwiki_p;
SELECT count(*) as review_count, log_actor
FROM logging
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
| {"connection_id": 76980568} | null |
TOP reviewers pl all-time | null | USE plwiki_p;
-- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as revie... | {"resultsets": [{"rowcount": 9, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "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",... | null |
TOP reviewers pl 2019 | null | USE plwiki_p;
-- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as revie... | {"resultsets": [{"headers": ["ultima ejecucion"], "rowcount": 1}, {"headers": ["isMujer", "counted"], "rowcount": 2}, {"headers": ["page_title", "page_len", "rev_timestamp"], "rowcount": 155}], "runningtime": "12.89"} | null |
TOP reviewers pl 2019 | null | USE plwiki_p;
SELECT count(*) as review_count, log_actor
FROM logging_logindex
WHERE log_type = 'review' AND log_action LIKE "approve%"
AND log_timestamp >= 20190101000000
AND log_timestamp <= 20191231235959
GROUP BY log_actor
| {"resultsets": [{"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lar\")", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 696}], "runningtime": "1344.87"} | null |
تخصيص البذور حسب المقالات المشابهة حسب التصنيف | null | use arwiki_p;
select concat("#[[", p1.page_title,"]]--->",
group_concat(DISTINCT concat("<div class = \"stub-value ",cl4.cl_to,"\">", cl4.cl_to, "</div>") SEPARATOR ' '),"</br>")
from page p1
inner join categorylinks cl1
on cl1.cl_from = p1.page_id
inner join categorylinks cl2
on p1.page_id = cl2.cl_from
inn... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format"], "rowcount": 10}], "runningtime": "0.10"} | null |
Articles containing links to the user space | null | SELECT DISTINCT page_title FROM page JOIN pagelinks ON pl_from = page_id WHERE page_namespace = 0 AND pl_namespace IN (2,3); | {"resultsets": [{"headers": ["page_title", "el_to"], "rowcount": 1}], "runningtime": "465.52"} | 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_namespace", "page", "item"], "rowcount": 815}], "runningtime": "80.60"} | null |
Statistics of editing MediaWiki JS/CSS in ruwiki per month | null | USE ruwiki_p;
SELECT
FLOOR(rev_timestamp / 100000000) as edit_month,
count(*) as edit_count
FROM revision
JOIN page ON page_id = rev_page
WHERE
rev_timestamp >= "201501001" AND
page_namespace = 8 AND
(page_title LIKE '%.css' OR
page_title LIKE '%.js')
GROUP BY edit_month
ORDER BY edit_month DES... | {"resultsets": [{"headers": ["cl_to", "antal"], "rowcount": 31}], "runningtime": "4.41"} | null |
Number of categories containing at least one article on enwikibooks | This query is used to update https://en.wikibooks.org/wiki/Template:RC/doc/use-count/doc, as usage through MediaWiki messages doesn’t show up on Special:WhatLinksHere (i.e. the templatelinks table). | USE enwikibooks_p;
SELECT COUNT(*) FROM category WHERE cat_title IN (SELECT page_title FROM page WHERE page_namespace = 14) AND cat_pages > 0; | {"connection_id": 82652447} | null |
GA/FA and GAN/FAC linked from April 19 | GA/FA and GAN/FAC linked from [[April 19]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lhi\")", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 597}, {"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lhi\")", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 7}, {"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lhi\")", "CONCAT('\"',ip... | null |
Pattypan users by month | null | USE commonswiki_p;
SELECT DISTINCT LEFT(log_timestamp, 6) as month, actor_name as username
FROM categorylinks
JOIN logging_logindex ON log_page = cl_from
JOIN actor_logging ON log_actor = actor_id
WHERE
cl_to = "Uploaded_with_pattypan"
and log_type = "upload"
and log_action = "upload"
ORDER BY month | {"resultsets": [{"headers": ["frp_user_id", "frp_user_params", "user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", ... | null |
Commonist users by month | null | USE commonswiki_p;
SELECT DISTINCT LEFT(log_timestamp, 6) as month, actor_name as username
FROM categorylinks
JOIN logging_logindex ON log_page = cl_from
JOIN actor_logging ON log_actor = actor_id
WHERE
cl_to = "Uploaded_with_Commonist"
and log_type = "upload"
and log_action = "upload"
ORDER BY month | {"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": "17.69"} | null |
Most active users by articles on plwiki | null | USE bnwiki_p;
SELECT
CONCAT("#") AS number,
actor_user AS user_id,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS user_name,
COUNT(rev_id) AS user_editcount
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_... | {"connection_id": 86458961} | 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... | {"connection_id": 86474634} | null |
GA/FA and GAN/FAC linked from April 20 | GA/FA and GAN/FAC linked from [[April 20]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"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": "30.24"} | null |
POTY user count | null | USE commonswiki_p;
SELECT NOW();
SELECT
year,
`round`,
(
SELECT COUNT(DISTINCT rev_actor)
FROM revision_userindex
INNER JOIN page
ON rev_page = page_id
WHERE page_namespace = 4
AND page_title LIKE expression
-- AND rev_comment LIKE '+1 POTY vote - eligible on%'
) AS `count`,
expre... | {"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": "39.64"} | null |
WLM-UK competition participants 2013-14 & 2016-18, not active so far in 2019 | WLM-UK competition participants 2013-14 & 2016-18, not active so far in 2019 | 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"
) and not exists (
SE... | {"resultsets": [{"headers": ["rev_actor", "rev_id", "rev_page"], "rowcount": 26440}], "runningtime": "90.37"} | null |
Articles, whose talk pages belong to certain category | Useful when organizing article contests | SELECT P1.page_title, R.rev_user_text, R.rev_timestamp
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.page P2 ON P1.page_title = P2.page_title
JOIN ukwiki_p.categorylinks CL ON P2.page_id = CL.cl_from
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P2.page_namespace... | {"connection_id": 88215736} | null |
Most active users by edits on bnwikisource in last one year | null | USE bnwikisource_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 = 104
AND actor_user IS NOT NUL... | {"resultsets": [{"headers": ["Tables_in_lawiki_p"], "rowcount": 90}], "runningtime": "0.36"} | null |
Remove {{لا صندوق معلومات}} | null | use arwiki_p;
select
CONCAT('# [[',page.page_title,']]')
from page
where page_namespace = 0
and page_is_redirect = 0
and page_id in (select tl_from from templatelinks where tl_title = 'لا_صندوق_معلومات')
and page_id in (select tl_from from templatelinks where tl_title = 'ص.م/فتح')
order by rand(); | {"resultsets": [{"rowcount": 87, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}], "runningtime": "148.82"} | null |
فیلمهای فلان زبان | null | use fawiki_p;
select
page_title,
count(cl_from)
from page
join categorylinks
on cl_to = page_title
where
page_title like 'فیلمهای_%زبان'
and page_title not like '%پایه%'
and page_title not like '%درباره%'
and page_title not like '%بازخلق%'
and page_namespace = 14
group by page_title
order by 2 desc | {"resultsets": [{"rowcount": 500, "headers": ["COUNT(DISTINCT rev_actor)"]}], "runningtime": "248.35"} | null |
فیلمها به زبان فلان | null | use fawiki_p;
select
page_title,
count(cl_from)
from page
join categorylinks
on cl_to = page_title
where
page_title like 'فیلمها_به_زبان_%'
and page_namespace = 14
group by page_title
order by 2 desc | {"resultsets": [{"headers": ["COUNT(DISTINCT rev_actor)"], "rowcount": 1000}], "runningtime": "262.56"} | null |
GA/FA and GAN/FAC linked from April 21 | GA/FA and GAN/FAC linked from [[April 21]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 10}], "runningtime": "0.10"} | null |
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת | null | use hewiki_p;
select user_name, count(page_title)
from user join revision_userindex join page join actor
on user_id = actor_user
and rev_page = page_id
and rev_actor = actor_id
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
and rev_deleted = 0
group by user_name
having count(page_title) >= 50
o... | {"resultsets": [{"headers": ["pl_from", "pl_from_namespace", "page_id", "pl_namespace", "pl_title"], "rowcount": 10}], "runningtime": "0.09"} | null |
Most active users by edits on hiwikisource in last 3 months | null | USE hiwikisource_p;
SELECT
CONCAT("#") AS number,
CONCAT("{{target | user =",actor_name,"| site = hi.wikisource.org}}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS ... | {"connection_id": 91350277} | null |
Most active users by edits on hiwiki in last 3 months | null | USE hiwiki_p;
SELECT
CONCAT("#") AS number,
CONCAT("{{target | user =",actor_name,"| site = hi.wikipedia.org}}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS NOT NUL... | {"resultsets": [{"headers": ["pl_from", "pl_from_namespace", "pl_from_title", "pl_to", "pl_to_namespace", "pl_to_title"], "rowcount": 4842380}], "runningtime": "17967.54"} | null |
Pages with missing "consensus templates" | null | USE trwiki_p;
SELECT
CONCAT('Vikipedi:', REPLACE(page_title, '_', ' ')) AS baslik
FROM
page
WHERE
page_namespace = 4
AND page_is_redirect = 0
AND page_title LIKE 'Silinmeye_aday_sayfalar/%'
AND NOT EXISTS
(SELECT 1 FROM templatelinks
WHERE tl_from = page_id
AND tl_from_namespace = 4
AND tl_... | {"resultsets": [{"headers": ["Tables_in_gnwiki_p"], "rowcount": 89}], "runningtime": "0.72"} | null |
page containing specific word(s) in title | null | USE fawiki_p;
SELECT CONCAT ('* [[:رده:',REPLACE(page_title,'_',' '),']]')
FROM page
WHERE page_namespace = 14
AND page_is_redirect = 0
AND page_title LIKE "%هوا%" # containing the word
#AND page_title LIKE "هوا%" # starting with the word
#AND page_title LIKE "%هوا" # ending with the word
ORDER BY page_title; | {"resultsets": [{"headers": ["page_id", "U", "E", "L", "T", "R"], "rowcount": 8955}], "runningtime": "77.82"} | 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": [], "runningtime": "0.04"} | null |
مقالات بدون أي صورة | null | use arwiki_p;
SELECT concat('[[',page_title,']]') as article_name
FROM page
LEFT JOIN imagelinks ON il_from=page_id
WHERE page_namespace=0
AND page_is_redirect=0
AND il_from IS NULL | {"resultsets": [{"headers": ["linter_cat", "count(*)"], "rowcount": 7}], "runningtime": "20.19"} | null |
GA/FA and GAN/FAC linked from April 22 | GA/FA and GAN/FAC linked from [[April 22]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["Tables_in_yiwiki_p"], "rowcount": 90}, {"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 13}], "runningtime": "0.48"} | null |
History of infinite protections | null | use ruwiki_p;
select page_id, log_action, log_timestamp, user_name, log_title, log_comment, log_params from logging join user on log_user = user_id join page on log_title=page_title where log_type = "protect" and log_namespace=0 and log_params like "%edit\";s:5:\"level\";s:5:\"sysop\";s:6:\"expiry\";s:8:\"infinity%" an... | {"resultsets": [{"headers": ["page_title"], "rowcount": 57}], "runningtime": "0.25"} | null |
History of infinite protections | null | use ruwiki_p;
select page_id, log_action, log_timestamp, user_name, log_title, log_params from logging join user on log_user = user_id join page on log_title=page_title where log_type = "protect" and log_namespace=0 and log_params like "%edit\";s:5:\"level\";s:5:\"sysop\";s:6:\"expiry\";s:8:\"infinity%" and page_is_red... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2912}], "runningtime": "9.04"} | 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": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "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", "cl_from", "cl_to... | 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... | {"connection_id": 96952271} | null |
Editors on the Luganda Wikipedia by Article Count | null | USE lgwiki_p;
SELECT actor_name, COUNT(rev_page) as articles
FROM revision
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON rev_page = page_id
WHERE
rev_parent_id = 0
and page_namespace = 0
GROUP BY actor_id
ORDER BY articles DESC | {"resultsets": [{"headers": ["page_title"], "rowcount": 771}], "runningtime": "2.94"} | null |
GA/FA and GAN/FAC linked from April 23 | GA/FA and GAN/FAC linked from [[April 23]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 13}, {"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.24"} | null |
Proofread-Ramesh-குன்றக்குடி_அடிகளார்_நூல்வரிசை-4 | 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%")
... | {"connection_id": 97368422} | null |
Proofread-Fathima kaniyam-கவிக்குயில்_சரோஜினியின்_நம்மை_மேம்படுத்தும்எண்ணங்கள் | 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%")
#... | {"connection_id": 97368849} | null |
Proofread-Fathima kaniyam-வ._வே._சு._ஐயர் | 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": [{"headers": ["COUNT(rev_actor)"], "rowcount": 1}], "runningtime": "0.61"} | null |
Proofread-Fathima kaniyam-மாணவர்களுக்கு_நபிகள்_நாயகம்_வரலாறு | 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%")
#... | {"connection_id": 97402853} | null |
Validated-Iswarya-சொன்னால்_நம்ப_மாட்டீர்கள் | 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%")
... | {"connection_id": 97402943} | null |
testpagehistory | null | select * from zhwiki_p.revision where rev_id<10; | {"connection_id": 97466002} | null |
zhwiki_p tables | null | use zhwiki_p;
show tables; | {"resultsets": [{"headers": ["rev_actor", "rev_id"], "rowcount": 26484}, {"headers": ["page_len"], "rowcount": 4953}, {"headers": ["page_namespace"], "rowcount": 6}], "runningtime": "173.18"} | null |
Portuguese Wikipedia article creations in the last year (March 2020) | null | USE ptwiki_p;
SELECT
ar_title AS page_title,
ar_rev_id AS rev_id,
ar_timestamp AS creation_timestamp,
True AS archived,
comment_text,
IF(comment_text REGEXP "Spam / propaganda", "spam", "OK") AS draft_quality
FROM archive
LEFT JOIN logging speedy_delete ON
log_namespace = ar_namespace AND
log_title = ... | {"connection_id": 97948195} | null |
Wiki Loves Women South Asia 2020/Urdu Wikipedia | ویکی_محبوب_خواتین،_جنوبی_ایشیا_2020ء_کے_تحت_تخلیق_کردہ_مضامی | USE urwiki_p;
SELECT
article.page_title,
COUNT(*) AS edits
FROM revision
INNER JOIN page article ON
article.page_id = rev_page AND
article.page_namespace = 0
INNER JOIN page talk ON
talk.page_title = article.page_title AND
talk.page_namespace = 1
INNER JOIN categorylinks ON
cl_from = talk.page_id
WHER... | {"resultsets": [{"headers": ["term_full_entity_id", "term_text"], "rowcount": 20}], "runningtime": "0.54"} | null |
sqwiki orpahned talk pages | null | USE sqwiki_p;
SELECT page_namespace, page_title, page_len, page_is_redirect, page_is_new FROM page AS p1
WHERE
p1.page_namespace % 2 = 1
AND (SELECT COUNT(*) FROM page AS p2 WHERE p1.page_title = p2.page_title AND p2.page_namespace = (p1.page_namespace - 1)) = 0 | {"resultsets": [], "runningtime": "0.04"} | null |
All multiple image transclusions | null | USE enwiki_p;
SELECT page_namespace, page_title
FROM templatelinks
JOIN page ON tl_from = page_id
WHERE tl_title = "Multiple_image" and tl_namespace = 10 | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 15}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "29.97"} | null |
990201 mp1 # of DAB pages with direct link (pages) | null | USE fawiki_p;
SELECT COUNT(DISTINCT(page_title))
FROM pagelinks JOIN page
WHERE page_is_redirect=0
AND page_namespace=0
AND page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation')
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0)
AND pl_title=page_title
AND pl_nam... | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 13}], "runningtime": "0.12"} | null |
990201 mp1 # of DAB pages | null | USE fawiki_p;
SELECT COUNT(page_title)
FROM page
WHERE page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'); | {"resultsets": [{"headers": ["Tables_in_yiwiki_p"], "rowcount": 90}], "runningtime": "0.28"} | null |
990201 # of fa articles | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0; | {"resultsets": [{"headers": ["Tables_in_yiwiki_p"], "rowcount": 90}, {"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 13}, {"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "pa... | null |
Deleted pages by deletion reason ptwiki - 2020 | null | USE ptwiki_p;
SELECT
SUM(comment_text REGEXP "WP:ER#ER[0-9]+\\|") as speedy_deleted_articles,
SUM(comment_text REGEXP "WP:ER#ER20\\|") as unsuitable_articles,
SUM(comment_text REGEXP "WP:ER#ER6\\|" OR comment_text REGEXP "Spam / propaganda") as spam_articles,
COUNT(*) as deleted_articles
FROM archive
LEFT JOIN... | {"connection_id": 99080348} | 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": ["COUNT(rev_id)"], "rowcount": 1000}], "runningtime": "12.60"} | 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", "rev_timestamp"], "rowcount": 1}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pp_propname"], "rowcount": 0}, {"headers": ["page_title", "cl_to"], "rowcount": 0}, {"headers": ["page_title", "cl_to"], "rowcount": 0}, {"headers": ["cat_titl... | null |
GA/FA and GAN/FAC linked from April 24 | GA/FA and GAN/FAC linked from [[April 24]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"connection_id": 101625276} | 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_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": 2}], "runningtime": "410.22"} | null |
990201 owp1 All orphan articles | null | USE fawiki_p;
SELECT concat('# [[',p1.page_title,']]')
FROM page AS p1
WHERE p1.page_is_redirect = 0
AND p1.page_namespace = 0
# not a DAB page
AND p1.page_id NOT IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
# not receiving direct link
AND NOT (
p1.page_title IN (
SELECT pl1.... | {"resultsets": [{"headers": ["page_title"], "rowcount": 420}], "runningtime": "44.92"} | null |
Editors with more than 5 edits in last 30 days (arwiki) | Results order by there edits count in the same period. | USE arwiki_p;
select actor_name, count(rev_actor)
from revision
JOIN actor ON actor_id = rev_actor
where rev_timestamp between 20190301000000 AND 20190401000000
AND actor_name NOT IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'bot')
group by rev_actor
having count(rev_... | {"resultsets": [{"rowcount": 118, "headers": ["\u0627\u0644\u0645\u0642\u0627\u0644\u0629", "\u0627\u0644\u062d\u062c\u0645"]}], "runningtime": "10.67"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.