title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Editors by experience 20-25k | With a little help from [[User talk:Cryptic#A Little help with a query]] circa 7 Feb 2020.
Editors who are extended confirmed, are not new page patrollers or sysops, have not been blocked in the last year, have at least 500 edits in the last 6 months, 50 edits in the last 2 months, created at least 2 non-stub pages, ha... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount BETWEEN 20000 AND 25000
AND user_registration < '20190228000000'
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT EXISTS (SELEC... | {"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": 0}], "runningtime": "0.09"} | enwiki_p |
Editors by experience 5-10k | With a little help from [[User talk:Cryptic#A Little help with a query]] circa 7 Feb 2020.
Editors who are extended confirmed, are not new page patrollers or sysops, have not been blocked in the last year, have at least 500 edits in the last 6 months, 50 edits in the last 2 months, created at least 2 non-stub pages, ha... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount BETWEEN 5000 AND 10000
AND user_registration < '20190228000000'
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT EXISTS (SELECT... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 90}], "runningtime": "6.13"} | enwiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৯ জানু ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"resultsets": [{"headers": ["Tables_in_votewiki_p"], "rowcount": 87}], "runningtime": "0.16"} | bnwiki |
my pagetriage-curation | null | SELECT COUNT(*), DATE_FORMAT(log_timestamp,'%Y-%m-%d') as day
FROM logging_userindex JOIN actor
ON log_actor = actor_id
WHERE actor_name= 'Vexations'
AND log_action = 'reviewed'
AND log_type = 'pagetriage-curation'
AND log_timestamp > (NOW() - INTERVAL 1 MONTH)
AND log_namespace = 0
GROUP BY day
ORDER BY day DESC | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.60"} | enwiki |
AFCH Submitting....? (week) | null | select count(rc_id) as reviews, actor_name,
SUM(comment_text like "Submitting%AFCH%") As "submitted"
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where (rc_namespace = 118 or rc_namespace = 2)
and (comment_text like "Submitting%AFCH%")
an... | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 19}], "runningtime": "0.47"} | enwiki_p |
IDs | null | SELECT pp_value, "P3684",
CONCAT( '"', REPLACE( REPLACE( el_to, "https://www.driverdb.com/drivers/", "" ), "/", "" ), '"' ) AS id, "S143", "Q1551807"
FROM (SELECT * FROM externallinks WHERE el_to LIKE "https://www.driverdb.com/drivers/%") AS el# AND el_to RLIKE "/id[0-9]+/?$") AS el
JOIN (SELECT * FROM page WHERE page_... | {"resultsets": [{"headers": ["page_id", "page_title", "page_namespace", "il_to", "actor_name"], "rowcount": 500}], "runningtime": "0.60"} | dewiki_p |
Potential capitalized demonyms in Finnish | null | SELECT
CONCAT('Q', wbit_item_id) as id,
wby_name as type,
wbxl_language as language,
wbx_text as description
FROM wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id = wby_id
LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
LEFT JOIN wbt_tex... | {"resultsets": [{"headers": ["comment_id", "comment_text"], "rowcount": 10}], "runningtime": "0.07"} | wikidatawiki_p |
Essentially the Special:WantedPages query for bnwikisource | null | SELECT
pl_namespace AS namespace,
pl_title AS title,
COUNT(*) AS value
FROM pagelinks
LEFT JOIN page AS pg1
ON pl_namespace = pg1.page_namespace AND pl_title = pg1.page_title
LEFT JOIN page AS pg2
ON pl_from = pg2.page... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8346}], "runningtime": "18.37"} | bnwikisource_p |
Top 1000 it.wikisource Editors | Top 1000 it.wikisource editors | USE itwikisource_p;
SET @counter = 0;
SELECT @counter := @counter +1, user_editcount, user_name
FROM (SELECT 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 IN (
SELECT REPLACE(log_title, '_', ' ')
FROM logging
WHERE log_type = 'right... | {"resultsets": [{"headers": ["CONCAT('* [[', page_title, ']]')"], "rowcount": 14}], "runningtime": "0.94"} | itwikisource_p |
পরীক্ষা | ০২-০৯-২০১৮ | SELECT DISTINCT CONCAT("{{t1|",page_title,"}}") AS template, COUNT(DISTINCT tl_from) AS counting, pr_type, pr_level
FROM page
JOIN templatelinks ON page_title = tl_title AND tl_namespace = 10 AND tl_from_namespace = 0
LEFT JOIN page_restrictions ON pr_page = page_id
WHERE page_namespace = 10 AND page_is_redirect = 0 ... | {"resultsets": [{"headers": ["rc_actor", "rc_title", "rc_type", "rc_timestamp"], "rowcount": 270787}], "runningtime": "300.97"} | bnwiki_p |
external Wikilinks | Finds links which are made external instead of internal | SELECT page_title, el_to, el_index
FROM page, externallinks
WHERE el_index LIKE '%org.wikipedia.%'
AND el_from = page_id
AND page_namespace = 0 | {"resultsets": [{"headers": ["User", "Anzahl ge\u00e4nderte Artikel", "Anzahl neue Artikel", "Bytes \u00b1", "Bytes gr\u00f6\u00dfter Artikel", "Artikel mit gr\u00f6\u00dftem Anteil", "Prozent gr\u00f6\u00dfter Artikel", "Aktive Tage", "Prozent aktive Tage", "Anzahl Edits (Datenbank)", "Erster Edit", "Letzer Edit", "Ne... | dewiki_p |
unused templates | Finds templates which are not used on every linked page | Select page_id
FROM page, pagelinks, templatelinks as tl1
WHERE page_namespace = 10
AND tl1.tl_title='ab'
AND (SELECT count(*)
FROM templatelinks as tl2
WHERE tl2.tl_title = page_title) <
(SELECT count(*)
FROM pagelinks
WHERE pl_from = page_id)
Limit 1; | {"resultsets": [{"headers": ["user_id", "user_name", "page_id", "page_title", "count(distinct(page_id))"], "rowcount": 1}], "runningtime": "0.25"} | dewiki_p |
Selflinks | Pages which links to itself
Seite die auf sich selbst verlinken | SELECT page_title
FROM page, pagelinks
WHERE pl_from=page_id
AND pl_title=page_title
AND pl_from_namespace =0
AND pl_namespace = 0
LIMIT 50; | {"resultsets": [{"headers": ["pl_title", "COUNT(*)"], "rowcount": 2}], "runningtime": "0.11"} | dewiki_p |
Consultas varias de SeroBOT <3 | Consultas varias de estadísticas curiosas de SeroBOT | use eswiki_p;
-- select * from actor where actor_name = 'SeroBOT'; -- 21
select substr(rev_timestamp, 1, 6) as date, count(1) counted
from revision_userindex
inner join page on rev_page = page_id
where rev_actor = 21
and rev_timestamp between '20190101000000' and '20221231235959'
-- and page_namespace = 0
group ... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "173.05"} | eswiki |
lint small | null | select page_title
, count(*) as page_count
from linter
join page on page.page_id = linter.linter_page
where page.page_namespace=0 and linter_cat != 2 and linter_params like '%"name":"small"%'
group by page.page_id
having count(*)>1
order by count(*) desc, page_title asc
limit 90; | {"resultsets": [{"headers": ["CONCAT('* [[:File:', p.page_title, \"]]\")"], "rowcount": 13}], "runningtime": "0.83"} | enwiki |
Pages called "Foo (variant of disambiguation)" | There will be false positives. | SELECT page_title Title, rd_title Redirect_Target,
(SELECT COUNT(*) FROM pagelinks WHERE pl_title = page_title AND pl_namespace = 0 AND pl_from_namespace = 0) AS Incoming_Links,
page_len AS Cur_Size,
(SELECT MAX(rev_len) FROM revision WHERE rev_page = page_id) AS Max_Size
FROM page
LEFT JOIN redirect ON rd_from = pa... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 8967}], "runningtime": "10.21"} | enwiki_p |
Editors who edited 'WikiProject Video games' pages (enwiki) | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'Top-importance_video_game_articles',
'High-importance_video_game_articles',
'Mid-importance_video_game_articles',
'Low-impo... | {"resultsets": [{"headers": ["rev_actor"], "rowcount": 25298}], "runningtime": "58.75"} | enwiki_p |
电子游戏条目使用但未标记专题横幅的文件 | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'极高重要度电子游戏条目',
'高重要度电子游戏条目',
'中重要度电子游戏条目',
'低重要度电子游戏条目',
'未知重要度电子游戏条目'
)
AND cl_type = 'page'
AND ... | {"resultsets": [{"headers": ["==Maddeler=="], "rowcount": 9284}], "runningtime": "5.73"} | zhwiki_p |
Liczba edycji w plwikisource w całej historii | null | USE plwikisource_p;
SET @w:=0;
SET @s:=0;
SELECT @sum:=COUNT(*) AS `Ogólna liczba edycji`
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON actor_user=user_id JOIN page ON rev_page=page_id
WHERE page_namespace IN (0,100,102,104,124) AND
NOT UCASE(CONVERT(user_name USING utf8)) RLIKE 'BOT' AND NOT user_n... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 200}], "runningtime": "12.04"} | plwikisource |
Number of files uploaded with UploadWizard | null | SELECT COUNT(log_comment_id)
FROM logging
WHERE log_comment_id = 44
AND log_type = "upload"
; | {"resultsets": [], "runningtime": "0.02"} | commonswiki |
users with most edits in 2019 | null | #jauniņie ar labojumiem visās vārdtelpās
SELECT u.user_name, user_registration, COUNT(*)
FROM user u
join actor a on a.actor_user=u.user_id
join revision_userindex r on a.actor_id=r.rev_actor and r.rev_timestamp between 20210101000000 and 20220101000000
#join page p on p.page_id=r.rev_page
where user_registration>20210... | {"resultsets": [], "runningtime": "0.02"} | lvwiki_p |
Global lock status of bnwiki special users | null | SELECT user_name, gu_locked
FROM user
JOIN user_groups
ON user_id = ug_user
LEFT JOIN centralauth_p.gu
ON user_name = gu_name
WHERE ug_group = 'sysop'
AND ug_group = 'bureaucrat'
AND ug_group = 'checkuser'
AND ug_group = 'oversight'
AND ug_group = 'interface-admin'
AND ug_group = 'autopatrolled'
AND ug_group =... | {"connection_id": 98660264} | bnwiki_p |
indef-blocked users with special rights (bnwiki) | null | SELECT user_name, GROUP_CONCAT(ug_group) as user_rights, user_editcount, ipb_timestamp, ipb_expiry, comment_text
FROM user
JOIN ipblocks ON ipb_user = user_id
JOIN user_groups ON user_id = ug_user
JOIN comment ON ipb_reason_id = comment_id
where ipb_expiry = 'infinity'
GROUP BY user_id
ORDER BY user_editcount ASC | {"resultsets": [{"headers": ["Username", "cnt"], "rowcount": 80}], "runningtime": "174.91"} | bnwiki_p |
電子遊戲專題全部頁面 (zh) | 依據討論頁專題模板,由新至舊列出中文維基百科電子遊戲專題頁面。 | SELECT
page.page_id AS id,
CASE
page.page_namespace
WHEN 0 THEN '(Article)'
WHEN 2 THEN 'User'
WHEN 4 THEN 'Wikipedia'
WHEN 6 THEN 'File'
WHEN 8 THEN 'MediaWiki'
WHEN 10 THEN 'Template'
WHEN 12 THEN 'Help'
WHEN 14 THEN 'Category'
WHEN 100 THEN 'Portal'
WHEN 102 THEN 'Wiki... | {"resultsets": [{"headers": ["replace( cl_to, \"_\", \" \" )", "concat( \"[http://no.wikipedia.org/wiki/Category:\", cl_to, \"?action=edit&preload=Template:WantedCat&summary=Oppretter_etterspurt_kategori\", \" create]\" )"], "rowcount": 7887}], "runningtime": "14.68"} | zhwiki_p |
Wonderfool editcounts | null | USE enwiktionary_p;
SELECT
user_name AS name,
user_editcount AS 'edit count'
FROM (SELECT
pl_title AS wonderfool_name
FROM pagelinks
WHERE pl_from = (SELECT page_id
FROM page
WHERE page_namespace = 2
AND page_title = 'AryamanA/W... | {"resultsets": [{"headers": ["Potential untagged #SheSaid articles", "Wikidata item", "Creator", "Date created", "Length"], "rowcount": 3}], "runningtime": "34.83"} | enwiktionary |
wikidata: page size of the WD:RfD page over time | null | SELECT
rev_id,
rev_timestamp,
rev_len,
actor_name
FROM
revision JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_page=454 # page_id of Wikidata:Requests_for_deletions
; | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "6.24"} | wikidatawiki_p |
wikidata: search for terms (new schema) | https://doc.wikimedia.org/Wikibase/master/php/md_docs_storage_terms.html | # https://doc.wikimedia.org/Wikibase/master/php/md_docs_storage_terms.html
SELECT
CONCAT('Q', wbit_item_id) AS qid,
wby_name AS type,
wbxl_language AS lang,
wbx_text AS text
FROM
wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id=wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id=wby_id
LEF... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "Wikidata"], "rowcount": 0}], "runningtime": "30.09"} | wikidatawiki_p |
All pages with links starting with | null | SELECT CONCAT('# {{/সম্পাদনা|',page_title,'}} পাতায়'), CONCAT(el_to,' রয়েছে')
FROM page, externallinks
WHERE el_from = page_id AND el_to LIKE "http://en.banglapedia.org/%"
AND page_namespace=0
#ORDER BY el_to
ORDER BY page_title | {"resultsets": [{"headers": ["CONCAT(\"https://az.wikipedia.org/wiki/X%C3%BCsusi:Diff/\", rev_id)"], "rowcount": 1}], "runningtime": "0.06"} | bnwiki_p |
Extensions with no source code location | null | use mediawikiwiki_p;
select
concat("Extension:",(select page_title from page where page_id=a.cl_from)) as "title"
from
categorylinks a
where
a.cl_to = "All_extensions"
and not exists (
select
1
from
categorylinks b
where
b.cl_from = a.cl_from
and b.cl_to in (
"Extens... | {"resultsets": [{"headers": ["p", "p\u0422\u041c\u041f1", "p\u0422\u041c\u041f2", "new_text"], "rowcount": 1}], "runningtime": "0.04"} | mediawikiwiki |
编辑次数最多的电子游戏条目 (zhwiki) | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'极高重要度电子游戏条目',
'高重要度电子游戏条目',
'中重要度电子游戏条目',
'低重要度电子游戏条目',
'未知重要度电子游戏条目'
)
AND cl_type = 'page'
AND ... | {"resultsets": [{"headers": ["URL"], "rowcount": 1}], "runningtime": "44.31"} | zhwiki_p |
长期未编辑的电子游戏专题条目 (zhwiki) | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'极高重要度电子游戏条目',
'高重要度电子游戏条目',
'中重要度电子游戏条目',
'低重要度电子游戏条目',
'未知重要度电子游戏条目'
)
AND cl_type = 'page'
AND ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 3918}], "runningtime": "20.57"} | zhwiki_p |
最长的电子游戏条目 (zhwiki) | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'极高重要度电子游戏条目',
'高重要度电子游戏条目',
'中重要度电子游戏条目',
'低重要度电子游戏条目',
'未知重要度电子游戏条目'
)
AND cl_type = 'page'
AND ... | {"resultsets": [{"headers": ["user_name", "num_edits"], "rowcount": 8}], "runningtime": "3.38"} | zhwiki_p |
创建电子游戏专题条目最多的用户 (zhwiki) | null | WITH pages_vg AS (
WITH pages_vg_talk AS (
SELECT
page.page_namespace,
page.page_title
FROM
page
JOIN categorylinks ON cl_to IN (
'极高重要度电子游戏条目',
'高重要度电子游戏条目',
'中重要度电子游戏条目',
'低重要度电子游戏条目',
'未知重要度电子游戏条目'
)
AND cl_type = 'page'
AND ... | {"resultsets": [{"headers": ["len", "len_old"], "rowcount": 175}], "runningtime": "0.21"} | zhwiki_p |
geo_tags nearby, commonswiki | null | use commonswiki_p;
-- Nearby locations
select @lat := 49.198333, @lon := 19.51666, @radius := 10000; -- VB
-- select @lat := 48.7461, @lon := 19.6573, @radius := 10000; -- CHZ
-- select @lat := 48.875444, @lon := 20.327257, @radius := 10000;
select page_title, round(6371 * 2 * asin(sqrt(power(sin((@lat - abs(gt_lat)... | {"resultsets": [{"headers": ["CONCAT(\"# [[\",p.page_title,\"]]\")", "log_action"], "rowcount": 0}], "runningtime": "0.04"} | commonswiki |
Articles by lint errors except for Obsolete HTML tags | Based on query: https://quarry.wmflabs.org/query/31876 | select page_title
, count(*) as page_count
, sum(case when linter_params like '%"name":"center"%' then 1 end) as tag_center
, sum(case when linter_params like '%"name":"small"%' then 1 end) as tag_small
, sum(case when linter_params like '%"name":"span"%' then 1 end) as tag_span
, sum(case when linter_params like '%"na... | {"resultsets": [{"headers": ["page_lang", "page_namespace", "page_title"], "rowcount": 1}], "runningtime": "0.36"} | enwiki |
Query test 2 | null | USE itwiki_p;
SELECT page_title, actor_name
FROM page, revision JOIN actor ON actor_id = rev_actor
WHERE page_namespace = 0
AND page_is_redirect = 0
AND rev_page = page_id
AND rev_parent_id = 0
AND actor_name = "Darkcloud2222"
AND page_title NOT IN (
SELECT DISTINCT pl_title
FROM pagelinks
WHERE pl_from_namespace... | {"resultsets": [{"headers": ["VisualEditor", "Wszystkie edycje", "Wszystkie edycje (bot\u00f3w)"], "rowcount": 1}], "runningtime": "14.30"} | itwiki_p |
Wikisource: correlate index pages → mainspace pages | null | use enwikisource_p;
-- SELECT page_title FROM page WHERE page_namespace = 106 AND page_title NOT IN (
SELECT
indexpage.page_title AS indextitle,
workpage.page_title AS worktitle
FROM page AS indexpage
-- JOIN categorylinks ON cl_from=indexpage.page_id
JOIN pagelinks ON pl_from=indexpage.page_id
LEFT JOIN p... | {"resultsets": [{"headers": ["ll_from", "ll_lang", "ll_title", "page_title"], "rowcount": 10}, {"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": 10}, {"headers": ["ar_id", "ar_namespace", "... | enwikisource_p |
Links from Templates to Disambiguation pages | List of Templates which link to disambiguation pages
Liste von Vorlagen, die auf Begriffsklärungsseiten verlinken | SELECT pl_from, page_title
FROM page , categorylinks, pagelinks
Where cl_to = 'Begriffsklärung'
AND cl_from= page_id
AND pl_title=page_title
AND pl_from_namespace = 10
AND pl_namespace = 0
AND pl_from <> 6262673
AND cl_timestamp >= DATE(NOW()) - INTERVAL 100 DAY
Limit 100; | {"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 13}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 13}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 23}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 26}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco... | dewiki_p |
Title from page_id | Give the title a page by given page_id | SELECT page_title, page_namespace
FROM page
WHERE page_id = 3893414 | {"resultsets": [{"headers": ["\u6761\u76ee"], "rowcount": 6273}], "runningtime": "6.55"} | dewiki_p |
Number of {{Property documentation}} transclusions | Estimating the impact of T246152#5933234 in cache purges. | USE wikidatawiki_p;
SELECT COUNT(*) FROM templatelinks WHERE tl_namespace = 10 AND tl_title = 'Property_documentation'; | {"resultsets": [{"rowcount": 1314, "headers": ["page_title", "COUNT(*)"]}], "runningtime": "7.08"} | null |
erraneous external links, specific to etwiki | null | use enwiki_p;
FROM externallinks AS el
WHERE page_namespace=1
AND el_to like "https://petscan%"
ORDER BY el_to
LIMIT 99; | {"resultsets": [{"rowcount": 13, "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)"]}], "runningtime": "3.81"} | null |
Contributions search by user, edit summary, date | [[User:GreenC bot]]'s edits starting in May 2019 containing "Cleanup bare URLs" in the edit summary.
For [[WP:VPT#Searching Contribution history]] circa 15 November 2019. | USE ptwiki_p;
SELECT CONCAT('[[Special:Diff/', r1.rev_id, ']]') AS diff,
CAST(r1.rev_len AS INT)-CAST(r2.rev_len AS INT) AS delta,
r1.rev_timestamp,
CONCAT('[[{{ns:', page_namespace, '}}:', page_title, ']]') AS pagename,
CONCAT('<nowiki>', comment_text, '</nowiki>') AS comment_text
FROM rev... | {"runningtime": "0.11", "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_editc... | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"connection_id": 18225185} | null |
pawikisource Wikidata usage stats | null | use bnwikisource_p;
/*select * from wbc_entity_usage;*/
SELECT eu_entity_id,page_title FROM wbc_entity_usage JOIN page ON eu_page_id=page_id WHERE page_namespace=0 AND eu_aspect='S'
ORDER BY page_title;
SELECT COUNT(DISTINCT page_title) AS 'number of pages linked to Wikidata as sitelinks' FROM wbc_entity_usage JOIN pa... | {"resultsets": [{"rowcount": 1, "headers": ["totale", "page_count_error", "weight"]}, {"rowcount": 0, "headers": ["page_id", "page_title", "page_len", "totale", "linter_params", "ptotale"]}], "runningtime": "2.93"} | null |
Validated-Ezhilarasi-தமிழ்ச்_சொல்லாக்கம் | 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%")
... | {"runningtime": "0.12", "resultsets": [{"headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"], "rowcount": 10}]} | null |
Validated-Iswarya 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": [{"rowcount": 2037, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev... | 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... | {"connection_id": 10233277} | null |
Find page by title | null | SELECT page_id, page_namespace, page_title, page_lang,
ll_from, ll_lang, ll_title
FROM page
INNER JOIN langlinks ON page_id = ll_from
WHERE page_title like "%Praha%" AND ll_lang = "cs"; | {"resultsets": [{"rowcount": 1, "headers": ["page_title"]}], "runningtime": "0.11"} | null |
Deleted pages in fawiki in 2019 | null | USE fawiki_p;
SELECT "Jan." as "Month", COUNT(*) as "#"
FROM logging
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_timestamp BETWEEN '20190101000000' AND '20190201000000'
AND log_namespace = 0
UNION
SELECT "Feb." as "Month", COUNT(*) as "#"
FROM logging
WHERE log_type = 'delete'
AND log_action = 'delete'
... | {"resultsets": [{"rowcount": 1, "headers": ["page_title"]}], "runningtime": "0.11"} | null |
BDA Assignment Week 1 | null | USE yiwiki_p;
SELECT * FROM revision;
SELECT * FROM revision ORDER by rev_timestamp;
SELECT rev_page FROM revision ORDER by rev_timestamp ASC;
SELECT rev_page, page_title, rev_timestamp FROM revision JOIN page ON rev_page = page_id ORDER by rev_timestamp ASC;
SELECT COUNT(rev_id) FROM revision WHERE rev_actor= "34973"... | {"resultsets": [{"rowcount": 31, "headers": ["date", "reviews", "accepts", "declines", "rejects"]}], "runningtime": "29.87"} | null |
Font tags in sigs | null | USE enwiki_p;
SELECT user_name, up_value, LENGTH(up_value)
FROM
user_properties
JOIN `user` ON user_id = up_user
WHERE
up_property = "nickname" AND
up_value LIKE "%<font%"
ORDER BY LENGTH(up_value) DESC | {"resultsets": [{"rowcount": 1, "headers": ["count(*)"]}], "runningtime": "0.14"} | null |
Font tags in long sigs with recent edits | null | USE enwiki_p;
SELECT user_name, up_value, LENGTH(up_value), user_editcount
FROM
user_properties
JOIN `user` ON user_id = up_user
WHERE
up_property = "nickname" AND
up_value LIKE "%<font%" AND
LENGTH(up_value) > 200 AND
user_name IN (SELECT actor_name
FROM revision_userindex
... | {"runningtime": "44.06", "resultsets": [{"headers": ["Lp", "U\u017cytkownik", "Liczba edycji"], "rowcount": 80}]} | null |
Proofread-DeepaArulKaniyam-திருக்குறள்_கட்டுரைகள் | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Proofread%")
#... | {"resultsets": [{"rowcount": 1, "headers": ["user_name", "user_editcount", "user_registration", "ug_group", "ug_expiry"]}], "runningtime": "0.24"} | 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": "0.69", "resultsets": [{"headers": ["actor_name", "c"], "rowcount": 134}]} | null |
(temp for the moment) | null | use wikidatawiki_p;
desc wbt_term_in_lang;
select * from wbt_term_in_lang limit 15;
desc wbt_type;
select * from wbt_type limit 15;
desc wbt_text;
select * from wbt_text limit 15;
desc wbt_text_in_lang;
select * from wbt_text_in_lang limit 15; | {"runningtime": "1799.50", "resultsets": [{"headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_actor"], "rowcount": 9}]} | null |
(temp for the moment) | null | use wikidatawiki_p;
SELECT
wbtl_type_id,
wbxl_language as term_language,
count(if(wbtl_type_id = 1,1,null)) as labels,
count(if(wbtl_type_id = 2,1,null)) as descriptions,
count(if(wbtl_type_id = 3,1,null)) as aliases
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id # E
... | {"resultsets": [{"rowcount": 28, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_typ... | null |
اردو ویکیپیڈیا پر سرخ روابط کی تعداد | Mainspace-to-mainspace only. | use urwiki_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": [{"rowcount": 125, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_ty... | null |
sigprobs | null | USE enwiki_p;
SELECT user_name, up_value
FROM
user_properties
JOIN `user` ON user_id = up_user
WHERE
RIGHT(up_user, 2) = 00 AND
up_property = "nickname" AND
user_name IN (SELECT actor_name
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
W... | {"runningtime": "787.90", "resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 11}]} | null |
Reasons why AfC submissions were declined | Last run October 16, 2016
This query counts the number of AfC submissions declined for each reason during the past 30 days by reading the edit comment associated with each declined submission. Includes drafts in the "Draft" namespace.
You can re-run this query and get new data at any time by following these steps:
1.... | use enwiki_p;
select count(rc_id) as declines, rc_comment
from recentchanges
where rc_namespace = 118 and rc_comment like "Declining submission:%"
group by rc_comment order by declines desc; | {"resultsets": [{"rowcount": 11, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 6, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "6.50"} | 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%")
... | {"resultsets": [{"rowcount": 0, "headers": ["concat('File:', rev_page)", "rev_len"]}], "runningtime": "1627.31"} | null |
BOZ's novels | null | USE enwiki_p;
SELECT page_title, rev_timestamp
FROM
revision_userindex
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON rev_page = page_id
WHERE
rev_parent_id = 0 AND
actor_name = "BOZ" AND
page_namespace = 0 AND
page_title IN (SELECT page_title
FROM templatelinks
... | {"resultsets": [{"rowcount": 100313, "headers": ["page_title"]}], "runningtime": "300.74"} | null |
Images without source | Analysis by size | USE commonswiki_p;
SELECT
page_title
FROM page
JOIN image ON page_title=img_name
JOIN categorylinks ON cl_to = "Images_without_source" AND page_id = cl_from; | {"resultsets": [{"rowcount": 0, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}], "runningtime": "16.99"} | null |
عناوين مقالات تحتوي مدة (مثل هـ) | null | use arwiki_p;
select page_title from page
where page_title like "%ـ%"
and page_title not like "%هـ%"
and page_namespace = 0
and page_is_redirect = 0; | {"runningtime": "25.49", "resultsets": [{"headers": ["CONCAT('File:', p.page_title)"], "rowcount": 5}]} | null |
صفحات ملفات لا تحتوي على صورة | null | use arwiki_p;
select page_title
from page
inner join imagelinks il1
on il1.il_from = page_id
where page_namespace = 6
and page_is_redirect = 0
and page_title not in (select img_name from image where img_name = page_title)
and page_title not in (select commonswiki_p.page.page_title from commonswiki_p.page
... | {"connection_id": 11376511} | null |
مقالات تحتوي على وصلات لصفحات المستخدمين | null | use arwiki_p;
select page_title
from page
inner join pagelinks
on pl_from = page_id
where pl_from_namespace = 0
and (pl_namespace = 2 or pl_namespace = 3)
and page_namespace = 0
and page_is_redirect = 0; | {"resultsets": [{"rowcount": 17, "headers": ["page_title", "cl_to"]}], "runningtime": "175.72"} | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"resultsets": [{"rowcount": 7, "headers": ["page_title", "cl_to"]}], "runningtime": "205.58"} | null |
[[phab:T246970]] Test query that was timing out | null | USE commonswiki_p;
SELECT CONCAT('File:', img_name) AS 'File name', DATE_FORMAT(img_timestamp, '%Y-%m-%d %T') AS 'Date', img_size AS 'Size',
CONCAT('User:', actor_name) AS 'Uploader\'s name' FROM image
INNER JOIN actor ON img_actor = actor_id
WHERE img_timestamp>=TIMESTAMP('2020-03-02 00:00:00') AND (img_min... | {"runningtime": "424.61", "resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 8}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 246, "headers": ["CONCAT('# [[Diskussion:', page_title, ']]')"]}], "runningtime": "2.21"} | null |
تصنيفات مطلوبة من المقابل الإنجليزي | null | select page_title, count(cl_from)
from page
inner join categorylinks
on cl_to = page_title
where page_id not in (select cl_from from categorylinks where cl_to = "Hidden_categories")
and cl_from in (select ll_from from langlinks where ll_from = cl_from and ll_lang = "ar")
and page_id not in (select ll_from from langlink... | {"runningtime": "0.39", "resultsets": [{"headers": ["MID", "P1259", "REGEXP_REPLACE(el_to,'[^&]*¶ms=([^_]+)_N_([^_]*).*','@\\\\1/\\\\2')", "P7787", "concat(replace(REGEXP_SUBSTR(el_to, '_heading:([^_&]*)'),'_heading:',''),'U28390')", "el_to"], "rowcount": 100}]} | null |
General stats arwiki 2019 | null | use arwiki_p;
select log_action, COUNT(*)
from logging
where log_timestamp BETWEEN 20190101000000 AND 20191231235959
group by log_action;
SELECT page_namespace , COUNT(*) AS "عدد المقالات"
FROM revision r
join page p on p.page_id=r.rev_page
WHERE p.page_is_redirect=0 and r.rev_timestamp between 20190101000000 a... | {"resultsets": [{"rowcount": 18, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 7, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 7, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "7.32"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 17, "headers": ["rok", "liczba stron"]}], "runningtime": "96.45"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 40, "headers": ["Lp", "U\u017cytkownik", "Liczba edycji"]}], "runningtime": "42.13"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 22, "headers": ["Lp", "U\u017cytkownik", "Liczba edycji"]}], "runningtime": "0.75"} | null |
مستخدمون ممنوعون منعًا شديدًا بسبب اسم المستخدم | null | use arwiki_p;
select concat ("مستخدم:",log_title) as "اسم المستخدم" , log_comment
from logging
where log_type like "block"
and (log_params like "%noemail%" or log_params like "%nousertalk%" or log_params like "%nocreate%"
or log_params not like "%noautoblock%")
and log_params like "%infinite%"
and (log_comme... | {"runningtime": "67.66", "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": 17}]} | null |
وصلات بحاجة لتعريب | null | null | {"resultsets": [{"rowcount": 17, "headers": ["page_namespace", "page_title"]}], "runningtime": "57.57"} | null |
All edits made by participants in the Open Data Day 2020 edit-a-thon | (Ripped from wdvd's code and modified a bit.)
Thanks, Adam, for further modifications! | USE wikidatawiki_p;
select now();
SELECT rev_id, rc_timestamp, 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
LEFT JOIN revision on revision.rev_id = recentchanges.rc_this_oldid
WHER... | {"runningtime": "1.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}]} | null |
Broken redirects (mlwiki) | null | USE mlwiki_p;
SELECT CONCAT('# [[',page_title,']]') AS page_title, CONCAT('← [[',rd_title,']]') AS rd_title
FROM page
JOIN redirect
ON rd_from = page_id
AND NOT EXISTS (SELECT * FROM page AS p1 WHERE p1.page_title = rd_title AND p1.page_namespace = rd_namespace)
AND page_namespace = 0
AND rd_namespace = 0 | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(*)"]}], "runningtime": "11.62"} | null |
FlaggedRevs editor autopromote list phab:T237191 | Note: benchmarks is done by unique_days_with_edits | USE dewiki_p;
SET @editComments = 50;
SET @uniqueContentPages = 14;
SET @totalContentEdits = 300;
SET @reviewedEdits = 200;
SET @revertedEditsRatio = 0.03;
SET @usergroup="editor";
SET @userregistratioage=60;
SET @unique_days_with_edits=45;
-- newver blocked is always true
-- newer demoted is always true
SELECT * FRO... | {"resultsets": [{"rowcount": 705, "headers": ["CONCAT (\"File:\",page_title,\"\")"]}], "runningtime": "111.41"} | null |
FlaggedRevs autoreview autopromote phab:T237191 | Note: benchmarks is done by unique_days_with_edits | USE dewiki_p;
SET @editComments = 20;
SET @uniqueContentPages = 8;
SET @totalContentEdits = 150;
SET @reviewedEdits = 50;
SET @revertedEditsRatio = 1;
SET @usergroup="autoreview";
SET @userregistratioage=30;
SET @unique_days_with_edits=21;
-- newver blocked is always true
-- newer demoted is always true
SELECT * FROM... | {"runningtime": "1.31", "resultsets": [{"headers": ["user_editcount", "user_name", "up_value"], "rowcount": 200}]} | 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="Статті_WikiGap_2020"
ORDER BY P.page_len DESC | {"resultsets": [{"rowcount": 7, "headers": ["CONCAT('File:', p.page_title)"]}], "runningtime": "24.38"} | null |
stub | null | use arwiki_p;
select page_title
#, group_concat(distinct SUBSTRING_INDEX(SUBSTRING_INDEX(cl_to, '_في_', 2), '_في_', -1))
, group_concat(distinct cl_to)
from page
inner join categorylinks
on cl_from = page_id
where page_namespace = 0
and page_is_redirect = 0
and page_id in (select cl_from from categorylinks where cl_fro... | {"resultsets": [{"rowcount": 100, "headers": ["user_editcount", "user_name", "up_value"]}], "runningtime": "123.46"} | null |
ptwiki files without categories | null | USE ptwiki_p;
SELECT page_title
FROM
page
WHERE
page_namespace = 6 AND
page_is_redirect = 0 AND
page_id NOT IN (SELECT page_id
FROM categorylinks JOIN page ON page_id = cl_from
WHERE page_namespace = 6)
GROUP BY page_title
ORDER BY page_title
LIMIT 250; | {"runningtime": "263.07", "resultsets": [{"headers": ["page_title", "actor_name", "rev_timestamp"], "rowcount": 114}]} | null |
ptwiki files without categories | null | USE ptwiki_p;
SELECT page_title
FROM
page
WHERE
page_namespace = 6 AND
page_is_redirect = 0 AND
page_id NOT IN (SELECT page_id
FROM categorylinks JOIN page ON page_id = cl_from
WHERE page_namespace = 6)
GROUP BY page_title
ORDER BY page_title
LIMIT 250; | {"runningtime": "0.09", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Flickr images at :en | null | USE enwiki_p;
SELECT DISTINCT CONCAT('File:', page_title)
FROM
page p
INNER JOIN externallinks ON el_from = page_id
WHERE
page_namespace = 6 AND
el_to LIKE '%flickr%' AND
page_id NOT IN (SELECT page_id
FROM categorylinks JOIN page ON page_id = cl_from
WHERE cl_to = "A... | {"connection_id": 12784549} | null |
Transclusions of deleted templates | Query used by database report, using the SQL query found in https://github.com/mzmcbride/database-reports/blob/master/reports/general/deletedtrans.py | SELECT
CONVERT(tl_title USING utf8),
COUNT(DISTINCT tl_from)
FROM templatelinks
LEFT JOIN page AS p1
ON p1.page_namespace = tl_namespace
AND p1.page_title = tl_title
JOIN logging
ON tl_namespace = log_namespace
AND tl_title = log_title
AND log_type = 'delete'
JOIN page AS p2
ON tl_from = p2.page_id
WHERE p1.page_id... | {"resultsets": [{"rowcount": 0, "headers": ["fawiki_template", "enwiki_template"]}], "runningtime": "0.18"} | null |
Get page creation info for all pages in a category | The first revision, the person who created the page, the date/time the page was created, the title of the page, and the category that all the listed pages are in. | null | {"resultsets": [{"rowcount": 4, "headers": ["rc_timestamp", "actor_name", "rc_title", "page_is_redirect"]}], "runningtime": "195.65"} | null |
ويكي غاب عمان 2020 | null | USE arwiki_p;
SELECT
article.page_title as "المقالة", actor.actor_name as "المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len 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 ... | {"connection_id": 13905379} | null |
ويكي غاب عمان 2020 حسب المستخدم | null | use arwiki_p;
select concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", COUNT(rev_id) AS "عدد المقالات"
from revision r
inner join actor
on actor_id = rev_actor
inner join page p1
on p1.page_id = rev_page
where p1.page_id in
(select cl_from from categorylinks
where cl_to = "ويكي_غاب_عمان_2020")
and p1.... | {"resultsets": [{"rowcount": 0, "headers": ["rc_id", "rc_timestamp", "actor_name", "comment_text"]}], "runningtime": "78.60"} | null |
عناوين مقالات تحتوي مدة (مثل هـ) | null | use arwiki_p;
select page_title from page
where page_title like "%ـ%"
and page_title not like "%هـ%"
and page_namespace = 0
and page_is_redirect = 0; | {"connection_id": 23541954} | null |
Get most linking page | Returns the Wikipedia page with the most number of links to other pages on Wikipedia. | USE enwiki_p;
SELECT pl_from, pl_from_namespace, COUNT(pl_title)
FROM pagelinks
GROUP BY pl_from, pl_from_namespace
LIMIT 10;
| {"resultsets": [{"rowcount": 10, "headers": ["up_user", "up_property", "up_value"]}], "runningtime": "0.15"} | null |
Articles only in hidden categories on etwiki | null | USE etwiki_p;
SELECT CONCAT('# [[',p1.page_title,']]') AS page_title
FROM page p1
LEFT OUTER JOIN categorylinks
ON cl_from = p1.page_id
LEFT JOIN page p2
ON cl_to = p2.page_title AND p2.page_namespace = 14
LEFT JOIN page_props
ON p2.page_id = pp_page AND pp_propname = 'hiddencat'
WHERE p1.page_namespace = 0
AND p1.page... | {"runningtime": "0.13", "resultsets": [{"headers": ["test", "count"], "rowcount": 6}]} | null |
مقالات غير مراجعة حسب التصنيف | null | use arwiki_p;
select
CONCAT('# [[',page.page_title,']]') AS "المقالة", page.page_len AS "الحجم"
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 cl_from from categorylinks where cl_to ='بوابة_سوريا/مقالا... | {"runningtime": "1.14", "resultsets": [{"headers": ["type", "level", "namespace", "count"], "rowcount": 82}]} | null |
Capture QuickStatement external links of {{Object Location}} templates | null | use commonswiki_p;
SELECT concat(REPLACE(REPLACE(REPLACE(el_to, 'https://tools.wmflabs.org/quickstatements/index_old.html#v1=',''),'%09','|'),'%0A','|'),'|S4656|\'"https://commons.wikimedia.org/wiki/Category:',page_title,'"')
FROM externallinks
JOIN page ON page_id = el_from
JOIN categorylinks ON cl_from = page_id
WHER... | {"resultsets": [{"rowcount": 4, "headers": ["page_title"]}], "runningtime": "0.11"} | 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": "0.22", "resultsets": [{"headers": ["page_title"], "rowcount": 43}]} | 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": [{"rowcount": 0, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}], "runningtime": "121.60"} | 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": "1.24", "resultsets": [{"headers": ["page_title", "page_is_redirect", "rev_timestamp", "actor_name", "comment_text"], "rowcount": 138}]} | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"resultsets": [{"rowcount": 99, "headers": ["page_title", "page_is_redirect", "rev_timestamp", "actor_name", "comment_text"]}], "runningtime": "1.14"} | null |
Flickr images at :en | null | USE enwiki_p;
SELECT page_title
FROM
page p
JOIN externallinks ON el_from = page_id
WHERE
RIGHT(page_id,2) = 00 AND
page_namespace = 6 AND
el_to LIKE '%flickr%' AND
(
SELECT DISTINCT cl_from
FROM categorylinks
WHERE cl_to = "All_non-free_media" AND cl_from = p.page_id
) IS NULL AND... | {"runningtime": "0.13", "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": 10}]} | null |
Flickr images at :en | null | USE enwiki_p;
SELECT DISTINCT CONCAT('File:', p.page_title)
FROM
page p
INNER JOIN externallinks ON el_from = p.page_id
/*LEFT JOIN imagelinks i ON p.page_title = i.il_to -- AND (i.il_from_namespace = 0) */
LEFT JOIN categorylinks c1 ON p.page_id = c1.cl_from AND c1.cl_to = "All_non-free_media"
LEFT JOIN tem... | {"runningtime": "509.08", "resultsets": [{"headers": ["cat_title"], "rowcount": 140928}]} | null |
User Stats | null | Use mrwikisource_p;
SELECT A.actor_name, count(1) AS edits
FROM revision R
JOIN actor A ON R.rev_actor = A.actor_id
WHERE R.rev_timestamp >= 20180101000000 AND R.rev_timestamp <= 20200231235959
GROUP BY R.rev_actor HAVING edits > 50
ORDER BY edits DESC | {"resultsets": [{"rowcount": 21, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}], "runningtime": "12.38"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.