title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Most active users by edits on bnwiki in last 3 months | null | USE bnwiki_p;
SELECT
CONCAT("#") AS number, actor_user,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS NOT NULL
AND r... | {"runningtime": "0.26", "resultsets": [{"rowcount": 0, "headers": ["cl_from", "cl_to"]}]} | null |
nlwiki_p Pages without category | 1. hc = a list of maintenance categories, meaning the titles of category pages with the __HIDDENCAT__ or __EXPECTUNUSEDCATEGORY__ property
note: could filter out empty categories using the `category` table
2. nhcl = take `categorylinks`, filter out hc and collapse to a single row per page
3. final result = get the ... | use commonswiki_p;
SELECT page_title
FROM page
WHERE
page_namespace=6 AND page_is_redirect=0 AND
NOT EXISTS (SELECT * FROM (
# niet-beheer categorylinks
SELECT cl_from, cl_to FROM categorylinks WHERE NOT EXISTS (SELECT * FROM (
# beheercategorieën
SELECT DISTINCT page_title
FROM page, page_props
WHE... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}], "runningtime": "0.15"} | null |
Linter counter on it.wiki | null | use lvwiki_p;
select linter_cat,
count(*) from linter join page on page.page_id = linter.linter_page
group by linter_cat; | {"runningtime": "7.83", "resultsets": [{"rowcount": 1939, "headers": ["REPLACE(page_title,'_',' ')", "COUNT(*)"]}]} | null |
مقالات السودان غير المراجعة | null | USE arwiki_p;
SELECT
article.page_title as "المقالة"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page AND
article.page_namespace = 0
INNER JOIN page talk ON
talk.page_title = article.page_title AND
talk.page_namespace = 1
INNER JOIN categorylinks... | {"resultsets": [{"headers": ["linter_cat", "count(*)"], "rowcount": 11}], "runningtime": "4.47"} | null |
GA/FA and GAN/FAC linked from May 8 | GA/FA and GAN/FAC linked from [[May 8]] | 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_title"], "rowcount": 415}], "runningtime": "81.99"} | null |
Most active Lexeme editors | null | USE wikidatawiki_p;
SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
GROUP BY actor.actor_name
ORDER BY cnt DESC
#LIMIT 20; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 6}, {"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 5}], "runningtime": "0.58"} | null |
Suspicious wikilinks to surname pages | null | SET STATEMENT max_statement_time = 60 FOR
SELECT Pt.page_title, pl_from_namespace, Pf.page_title
FROM templatelinks /* from surname article to {{Surname}} */
JOIN page Pt ON Pt.page_namespace = 0 AND Pt.page_id = tl_from /* Surname article wikilinked to */
JOIN pagelinks PL ON pl_namespace = 0 AND pl_title = Pt.page_ti... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 0}, {"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 0}], "runningtime": "0.28"} | null |
bnwscontest test data | null | use bnwikisource_p;
SELECT actor.actor_name, COUNT(actor.actor_name)
FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
INNER JOIN page ON (page.page_id = revision.rev_page
AND (
page.page_title LIKE ('বুদ্ধের_জীবন_ও_বাণী.djvu%')
or page.page_title LIKE ('উৎসর্গ-রবীন্দ্রনাথ_ঠাকুর.djvu%')
... | {"connection_id": 356504566} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"connection_id": 356604646} | null |
enwiki: Free media with deledted file revisions | null | select
distinct concat('[[:File:',fa_name,']]') as File
from
filearchive fa
left join page p on fa.fa_name = p.page_title
inner join categorylinks cl on p.page_id = cl.cl_from
where
p.page_namespace = 6
and cl_to in ('All_free_media', 'All_free_in_US_media')
; | {"runningtime": "119.08", "resultsets": [{"rowcount": 1, "headers": ["actor_name", "count(rev_actor)"]}]} | null |
enwiki: Free media with hidden file revisions | null | select
distinct concat('[[:File:',oi_name,']]') as File
from
oldimage oi
left join page p on oi.oi_name = p.page_title
inner join categorylinks cl on p.page_id = cl.cl_from
where
oi.oi_deleted in (1, 3, 5, 7)
and p.page_namespace = 6
and cl_to in ('All_free_media', 'All_free_in_US_media')
; | {"resultsets": [{"headers": ["page_title"], "rowcount": 1000}], "runningtime": "86.85"} | null |
Red tempelates | null | USE fawiki_p;
#SELECT concat('# [[الگو:',REPLACE(tl_title,'_',' '),']]')
SELECT concat('# [[الگو:',tl_title,']]'), COUNT(*)
FROM page JOIN templatelinks ON page_id = tl_from
WHERE page_is_redirect = 0
AND page_namespace = 0
AND tl_namespace = 10
AND tl_title NOT IN (
SELECT red.page_title
FROM page AS red
WHERE... | {"runningtime": "0.43", "resultsets": [{"rowcount": 103, "headers": ["Tables_in_plwiki_p"]}]} | null |
GA/FA and GAN/FAC linked from May 9 | GA/FA and GAN/FAC linked from [[May 9]] | 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": ["substring(el_to, 1, 25)", "count(el_to)", "page_title"], "rowcount": 24}], "runningtime": "2.77"} | null |
Hard redirects to Meta: | null | SELECT
CONCAT('[[',
-- there has got to be a better way to do this
(CASE page_namespace
WHEN 0 THEN ''
WHEN 2 THEN 'User'
WHEN 3 THEN 'User talk'
WHEN 4 THEN 'Wikipedia'
WHEN 12 THEN 'Help'
ELSE CONCAT('ns', page_namespace)
END),
':',
page_title,
']]') AS 'from',
CONCAT('[[Meta:... | {"resultsets": [{"headers": ["substring(el_to, 1, 20)", "count(el_to)"], "rowcount": 27}], "runningtime": "1.59"} | null |
US Politics Month UkWiki | List of articles created for the Investigative Journalism Week on UkWiki | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as... | {"runningtime": "0.16", "resultsets": [{"rowcount": 10, "headers": ["pl_title"]}]} | null |
Wikipedians with BS degrees | null | SELECT page.page_id, page.page_title, user.user_id, user.user_editcount, user.user_registration
FROM page
INNER JOIN user ON user_name = page.page_title
INNER JOIN categorylinks ON cl_from = page.page_id
AND categorylinks.cl_to = "Wikipedians_with_Bachelor_of_Science_degrees"
WHERE page.page_namespace = 2 | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "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", "pa... | null |
Files uploaded to commons by From the Common Good | null | use commonswiki_p;
select count(*) from iwlinks
join page on iwl_from=page_id
join revision on page_latest=rev_id
where iwl_prefix='en'
and iwl_title='WP:FTCG'
and rev_timestamp between '20200101000000' and '20200401000000'; | {"resultsets": [{"headers": ["CONCAT(\"Category:\",page_title,\"\")"], "rowcount": 17}], "runningtime": "427.41"} | null |
Files uploaded to commons by From the Common Good | null | use commonswiki_p;
select * from iwlinks
join page on iwl_from=page_id
join revision on page_id=rev_page
where iwl_prefix='en'
and iwl_title='WP:FTCG'
and rev_timestamp between '20200101000000' and '20200401000000'
and rev_parent_id is null
limit 10; | {"resultsets": [{"headers": ["Year", "Total", "Pages"], "rowcount": 16}], "runningtime": "247.96"} | null |
Files uploaded to commons by From the Common Good | null | use commonswiki_p;
select count(*) from iwlinks
join page on iwl_from=page_id
join revision on page_id=rev_page
where iwl_prefix='en'
and iwl_title='WP:FTCG'
and rev_timestamp between '20200101000000' and '20200201000000'
and rev_parent_id is null; | {"resultsets": [{"headers": ["Year", "Total", "Pages"], "rowcount": 8}], "runningtime": "72.24"} | null |
Files uploaded to commons by From the Common Good | null | use commonswiki_p;
select count(*) from iwlinks
join page on iwl_from=page_id
join revision on page_id=rev_page
where iwl_prefix='en'
and iwl_title='WP:FTCG'
and rev_timestamp between '20200201000000' and '20200301000000'
and rev_parent_id is null; | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 22}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 10}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "8.99"} | null |
Files uploaded to commons by From the Common Good | null | use commonswiki_p;
select count(*) from iwlinks
join page on iwl_from=page_id
join revision on page_id=rev_page
where iwl_prefix='en'
and iwl_title='WP:FTCG'
and rev_timestamp between '20200301000000' and '20200401000000'
and rev_parent_id is null; | {"runningtime": "577.41", "resultsets": [{"rowcount": 999, "headers": ["CONCAT ('File:',p1.page_title,'')"]}]} | null |
Hard redirects to Meta: | A minor edit to query 44662 by Godsy | SELECT
CONCAT('[[',
-- there has got to be a better way to do this
(CASE page_namespace
WHEN 0 THEN ''
WHEN 2 THEN 'User'
WHEN 3 THEN 'User talk'
WHEN 4 THEN 'Wikipedia'
WHEN 12 THEN 'Help'
ELSE CONCAT('ns', page_namespace)
END),
':',
page_title,
']]') AS 'from',
CONCAT('[[', rd... | {"runningtime": "80.11", "resultsets": [{"rowcount": 7, "headers": ["Year", "Total", "Pages"]}]} | null |
nlwiki_p replag | replication lag of nlwiki_p in seconds | #SELECT NOW();
#SELECT MAX(rev_timestamp) FROM nlwiki_p.revision;
SELECT UNIX_TIMESTAMP()-UNIX_TIMESTAMP(MAX(rev_timestamp)) AS 'replag' FROM lvwiki_p.revision; | {"runningtime": "0.47", "resultsets": [{"rowcount": 100, "headers": ["page_namespace", "page_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"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"], "rowcount": 10}]... | null |
بوابة_العراق/مقالات_متعلقة | null | USE arwiki_p;
select DISTINCT concat("",p1.page_title, '') as pagename
from page p1 , categorylinks , page p2
where p1.page_id = cl_from
AND p1.page_is_redirect = 0 -- no redirects
#AND p1.page_namespace = 0
AND cl_to = "بوابة_العراق/مقالات_متعلقة"
#and not exists (select pp.page_title from page pp where pp.pag... | {"runningtime": "0.50", "resultsets": [{"rowcount": 5, "headers": ["cl_to"]}, {"rowcount": 16, "headers": ["cl_to"]}, {"rowcount": 42, "headers": ["cl_to"]}]} | null |
GM FRWiki | null | USE enwiki_p;
SELECT pp_value, page_title, page_len
FROM page
LEFT JOIN page_props AS pp
ON pp_page = page_id
LEFT JOIN categorylinks AS cl
ON cl_from = page_id
WHERE cl_to = "Grand_mosques"
AND pp_propname = "wikibase_item"; | {"runningtime": "0.87", "resultsets": [{"rowcount": 16, "headers": ["cl_to"]}, {"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 1, "headers": ["cl_to"]}, {"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 14, "headers": ["cl_to"]}, {"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 9, "headers": ["cl_to"]}]} | null |
fawiki users with most edits in templates since Apr 2020 | null | use fawiki_p;
select
actor_name,
count(*)
from revision_userindex
join actor_revision
on rev_actor = actor_id
join page
on rev_page = page_id
where
page_namespace = 10
and rev_timestamp > '20200401000000'
group by actor_id
order by COUNT(*) desc | {"resultsets": [{"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 13}, {"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 5}], "runningtime": "0.52"} | null |
'العراق%' | null | use enwiki_p;
select p.page_title from page p
where p.page_title like 'iraq%'
limit 100000000; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 5}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 17}, {"headers": ["cl_to"], "rowcount": 16}], "runningtime": "0.76"} | null |
Ostatni redaktorzy | null | use plwiki_p;
select nadawacze.user_name AS nadawacz, replace(log_title, '_', ' ') as redaktor_nazwa, log_params from logging
left join actor on actor_id = log_actor
left join user nadawacze on nadawacze.user_id = actor_user
left join user redaktorzy on redaktorzy.user_name = replace(log_title, '_', ' ')
left join use... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 10}, {"headers": ["cl_to"], "rowcount": 5}], "runningtime": "0.30"} | null |
বাংলা উইকিতে সবচেয়ে ব্যবহৃত টেমপ্লেট | null | USE bnwiki_p;
SELECT concat('# [[টেমপ্লেট:',tl_title,']]'), COUNT(tl_title) AS counting
FROM templatelinks
where tl_namespace=10
and tl_from_namespace=0
group by tl_title
order by COUNT(tl_title) desc
limit 200 | {"runningtime": "0.19", "resultsets": [{"rowcount": 0, "headers": ["cl_to"]}, {"rowcount": 0, "headers": ["cl_to"]}, {"rowcount": 0, "headers": ["cl_to"]}]} | null |
Users without autoreview right on plwiki by last edit | null | USE plwiki_p;
SELECT CONCAT("[[Wikipedysta:",user_name,"|",user_name,"]]") AS user_name, user_editcount, ug_group
FROM user
LEFT OUTER JOIN actor ON actor_user = user_id
LEFT OUTER JOIN revision_actor_temp ON revactor_actor = actor_id
LEFT OUTER JOIN user_groups ON ug_user = actor_user
WHERE user_editcount > 500
AND re... | {"runningtime": "0.29", "resultsets": [{"rowcount": 0, "headers": ["cl_to"]}, {"rowcount": 0, "headers": ["cl_to"]}, {"rowcount": 0, "headers": ["cl_to"]}]} | null |
Number of Wikimedia Commons uploaders | null | USE commonswiki_p;
SELECT COUNT(DISTINCT(img_actor)) AS users
FROM image; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 6}, {"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 18}], "runningtime": "0.43"} | null |
ruwiki: Convenient Discussions script usage: total number of edits | null | use ruwiki_p;
select count(*)
from comment
where comment_text like "%|CD]])" | {"runningtime": "0.03", "resultsets": []} | null |
Ruwiki bot statistics 2020 | null | USE ruwiki_p;
SELECT actor_name, COUNT(*) edits
FROM revision
INNER JOIN page ON rev_page=page_id
INNER JOIN actor ON rev_actor=actor_id
INNER JOIN user_groups ON actor_user=ug_user
WHERE ug_group = "bot"
AND page_namespace = 0
AND rev_timestamp BETWEEN 20200101000000 AND 20210101000000
GROUP BY actor_user
ORDER BY edi... | {"runningtime": "0.34", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 8, "headers": ["cl_to"]}, {"rowcount": 29, "headers": ["cl_to"]}]} | null |
Pages in even more books on bnwikisource by length | null | use bnwikisource_p;
select current_date;
select concat("পাতা:", page_title), page_len
from page
#join categorylinks
#on cl_from = page_id
join page_props
on pp_page = page_id
#where cl_to = replace("মুদ্রণ সংশোধন করা হয়নি", ' ', '_')
where pp_propname = 'proofread_page_quality_level'
and pp_value = 1
and page_namesp... | {"connection_id": 361673423} | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"runningtime": "11.20", "resultsets": [{"rowcount": 1858, "headers": ["REPLACE(page_title,'_',' ')", "COUNT(*)"]}]} | null |
How big is thanks log for enwiki? | null | use enwiki_p;
select
left(log_timestamp, 6),
count(*)
from logging_logindex
where log_type = 'thanks'
group by left(log_timestamp, 6)
order by left(log_timestamp, 6) desc | {"resultsets": [{"headers": ["linter_cat", "count(*)"], "rowcount": 12}], "runningtime": "0.66"} | null |
How big is thanks log for wikidatawiki? | null | use wikidatawiki_p;
select
left(log_timestamp, 6),
count(*)
from logging_logindex
where log_type = 'thanks'
group by left(log_timestamp, 6)
order by left(log_timestamp, 6) desc | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 16}], "runningtime": "0.31"} | null |
'Amateur radio' articles by size | null | SELECT page_title, page_len
FROM page
JOIN page_assessments ON pa_page_id = page_id
JOIN page_assessments_projects ON pa_project_id = pap_project_id
WHERE pap_project_title = 'Amateur radio'
ORDER BY page_len DESC | {"resultsets": [{"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 7}, {"headers": ["cl_to"], "rowcount": 23}], "runningtime": "0.33"} | null |
Ownerless pages in the user space on plwiki | null | USE arwiki_p;
SELECT CONCAT('# [[مستخدم:',page_title,']]') AS page_title
FROM page
LEFT JOIN `user` ON user_name = REPLACE(page_title, '_', ' ')
WHERE page_namespace = 2
AND page_is_redirect = 0
AND page_title NOT LIKE '%/%'
AND page_title NOT RLIKE '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 10}, {"headers": ["cl_to"], "rowcount": 19}], "runningtime": "0.33"} | null |
KSA Wikiproject articles last week | null | USE arwiki_p;
SELECT
article.page_title as "المقالة", MIN(revision.rev_id) as "النسخة", actor.actor_name as "المستخدم", revision.rev_actor as "معرف المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len as "حجم المقالة"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 7}, {"headers": ["cl_to"], "rowcount": 7}, {"headers": ["cl_to"], "rowcount": 1}], "runningtime": "0.64"} | null |
Number of proofread pages by quality level in the French Wikisource | null | USE frwikisource_p;
SELECT pp_value AS level, COUNT(*) FROM page_props WHERE pp_propname = "proofread_page_quality_level" GROUP BY pp_value; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 10}, {"headers": ["cl_to"], "rowcount": 9}, {"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 7}], "runningtime": "0.65"} | null |
POTM TAWS MAR20 | Proofread of the month. List of user who have participated in the event. | SELECT
act.actor_name as 'Editor',
ndx.page_title as 'Work',
sum(edp.page_namespace = 250) as 'Page-space: edits',
sum(edp.page_namespace = 252) as 'Index-space: edits',
sum(edp.page_namespace = 0) as 'Main-space: edits',
COUNT(edp.page_id)-sum(edp.page_namespace in (0,250,252)) AS 'Other edits'... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 6}, {"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 17}, {"headers": ["cl_to"], "rowcount": 11}, {"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 13}], "runningtime": "1.19"} | null |
ToFawiki Templates without interwiki | null | use fawiki_p;
select distinct concat("الگو:", page_title) as Title, ll_title as en
from page
join revision on page_id = rev_page and page_title not like '%/%' and page_namespace = 10 and page_is_redirect = 0
left join langlinks on ll_from = page_id
join comment on comment_id = rev_comment_id and comment_text like "%به ... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 11}, {"headers": ["cl_to"], "rowcount": 24}], "runningtime": "0.44"} | 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... | {"runningtime": "0.54", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 14, "headers": ["cl_to"]}, {"rowcount": 47, "headers": ["cl_to"]}]} | null |
ToFawiki Articles without interwiki | null | use fawiki_p;
select distinct page_title as TitleTitle,SUBSTRING(REGEXP_SUBSTR (comment_text,"(=(.*?)&)"), 2, LENGTH (REGEXP_SUBSTR (comment_text,"(=(.*?)&)"))-2) as Target_link
from page
join revision on page_id = rev_page
left join langlinks on ll_from = page_id
join comment on comment_id = rev_comment_id
where ll_... | {"runningtime": "0.52", "resultsets": [{"rowcount": 4, "headers": ["cl_to"]}, {"rowcount": 17, "headers": ["cl_to"]}, {"rowcount": 31, "headers": ["cl_to"]}]} | null |
fix pandemic categories | null | use arwiki_p;
select
CONCAT('* [[:تصنيف:',page_title, ']]>') AS cat1
, REPLACE(CONCAT( '[[:تصنيف:' , REPLACE(CONCAT( page_title ) , '2019–20' ,
'' ) , ']]' ) , '2020' ,
'' ) AS cat2
from page AS p1
where p1.page_title like "%فيروس_كورونا%"
AND p1.page_namespace = 14
#LIMIT 1000
;
| {"runningtime": "0.39", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 8, "headers": ["cl_to"]}, {"rowcount": 13, "headers": ["cl_to"]}]} | null |
ToFawiki Templates without interwiki + where | null | use fawiki_p;
select distinct concat("الگو:", page_title) as Title,SUBSTRING(REGEXP_SUBSTR (comment_text,"(=(.*?)&)"), 2, LENGTH (REGEXP_SUBSTR (comment_text,"(=(.*?)&)"))-2) as Target_link, ll_title as en
from page
join revision on page_id = rev_page
left join langlinks on ll_from = page_id
join comment on comment_id... | {"runningtime": "0.38", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 10, "headers": ["cl_to"]}, {"rowcount": 18, "headers": ["cl_to"]}]} | null |
Recent changes mentioning 311 | null | SET STATEMENT max_statement_time=1000 FOR
SELECT page_title, comment_text
FROM recentchanges
JOIN `comment` ON comment_id=rc_comment_id AND comment_text REGEXP "\\b3-?1-?1\\b"
JOIN page ON page_namespace=0 AND page_id=rc_cur_id
WHERE rc_timestamp >= "20200501000000"
LIMIT 100; | {"runningtime": "0.33", "resultsets": [{"rowcount": 1, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 7, "headers": ["cl_to"]}]} | null |
مقالات السعودية غير المراجعة | null | USE arwiki_p;
SELECT
article.page_title as "المقالة"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page AND
article.page_namespace = 0
INNER JOIN page talk ON
talk.page_title = article.page_title AND
talk.page_namespace = 1
INNER JOIN categorylinks... | {"runningtime": "0.45", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 8, "headers": ["cl_to"]}, {"rowcount": 21, "headers": ["cl_to"]}]} | null |
'Amateur radio' articles by size | List of pages on WP:Jainism by size. | SELECT page_title, page_len
FROM page
JOIN page_assessments ON pa_page_id = page_id
JOIN page_assessments_projects ON pa_project_id = pap_project_id
WHERE pap_project_title = 'Jainism'
ORDER BY page_len DESC | {"runningtime": "0.47", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 10, "headers": ["cl_to"]}, {"rowcount": 24, "headers": ["cl_to"]}]} | null |
Alternative formulation | null | use fawiki_p;
SELECT
rev_actor,
iwlinks
FROM page
JOIN revision
ON rev_page = page_id
JOIN (
SELECT
ll_from,
COUNT(ll_lang) AS iwlinks
FROM langlinks
GROUP BY ll_from
HAVING COUNT(ll_lang) > 25
) ll
ON ll_from = page_id
WHERE
page_namespace = 0
AND rev_parent_id = 0 | {"resultsets": [{"headers": ["namespace", "title", "value"], "rowcount": 5000}], "runningtime": "65.43"} | null |
nlwiki_p Large edits by a user | null | USE nlwiki_p;
SELECT rev_timestamp, rev_len, rev_minor_edit, page_namespace, page_title
FROM `revision`, `page`
WHERE
rev_timestamp>'20061209000000' AND
rev_actor=(SELECT actor_id FROM `actor` WHERE actor_name='VanBuren') AND
page_id=rev_page
ORDER BY rev_timestamp
LIMIT 10 | {"resultsets": [{"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", "page_content_... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"connection_id": 364697598} | null |
ToFawiki Templates without interwiki | null | use fawiki_p;
select distinct concat("الگو:", page_title) as Title,SUBSTRING(REGEXP_SUBSTR (comment_text,"(=(.*?)&)"), 2, LENGTH (REGEXP_SUBSTR (comment_text,"(=(.*?)&)"))-2) as Target_link, ll_title as en
from page
join revision on page_id = rev_page and page_title not like '%/%' and page_namespace = 10 and page_is_re... | {"runningtime": "0.52", "resultsets": [{"rowcount": 16, "headers": ["cl_to"]}, {"rowcount": 16, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 9, "headers": ["cl_to"]}, {"rowcount": 5, "headers": ["cl_to"]}]} | null |
Doppelte Verlinkung auf externe Links von einer Seite | null | USE enwiki_p;
SELECT page_title, el1.el_to
FROM externallinks as el1 INNER JOIN externallinks as el2
ON (el1.el_from=el2.el_from AND el1.el_to=el2.el_to AND el1.el_id <> el2.el_id)
INNER JOIN page ON (el1.el_from=page_id AND page_namespace=0)
WHERE SUBSTRING(el1.el_to,1,7) <> '//tools'
LIMIT 10; | {"runningtime": "0.41", "resultsets": [{"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 8, "headers": ["cl_to"]}, {"rowcount": 13, "headers": ["cl_to"]}]} | null |
Find interlanguage links in Commons files | null | USE commonswiki_p;
SELECT DISTINCT CONCAT("File:",page_title)
FROM page, langlinks
WHERE page_id = ll_from
AND page_namespace =6
limit 10; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 8}, {"headers": ["cl_to"], "rowcount": 13}, {"headers": ["cl_to"], "rowcount": 8}, {"headers": ["cl_to"], "rowcount": 13}], "runningtime": "0.66"} | null |
Number of files per user in some category | null | USE commonswiki_p;
SELECT img_user_text, count(*) as tot
#:SELECT CONCAT('#[[', page_namespace,':',page_title, ']]
FROM page
INNER JOIN categorylinks on page_id = cl_from and cl_to='People'
INNER JOIN image ON img_name = page_title
where page_namespace = 6
group by img_user_text
order by tot desc | {"resultsets": [{"headers": ["cl_to"], "rowcount": 32}, {"headers": ["cl_to"], "rowcount": 6}, {"headers": ["cl_to"], "rowcount": 5}, {"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 19}], "runningtime": "1.08"} | null |
Hindi Wiki user groups | null | USE hiwiki_p;
SELECT ug_group, COUNT(*) FROM user_groups GROUP BY 1; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 6}, {"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 3}], "runningtime": "0.50"} | null |
تصحيح عنوان مقالة | null | use arwiki_p;
select CONCAT('* [[:',page_title, ']]>') AS cat1
, REPLACE(CONCAT('[[:', page_title, ']]'), 'جيزان' , 'جازان' ) as cat2
from page
where page_namespace=0 and page_is_redirect=0 and (page_title like "%\(جيزان\)%")
and page_title not like "%/%" | {"runningtime": "0.89", "resultsets": [{"rowcount": 6, "headers": ["cl_to"]}, {"rowcount": 4, "headers": ["cl_to"]}, {"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 43, "headers": ["cl_to"]}, {"rowcount": 1, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowco... | null |
Get nlwiki page schema | null | USE enwiki_p;
SELECT page_id
FROM page
WHERE
page_title = "adipocyte" | {"runningtime": "0.41", "resultsets": [{"rowcount": 16, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}, {"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 2, "headers": ["cl_to"]}]} | null |
Redirect pages having interwiki while their target have none | null | USE fawiki_p;
SELECT CONCAT ('# [[',S.page_title,']] > [[:',ll_lang,':',ll_title,']]'), T.page_title
FROM page S INNER JOIN langlinks ON S.page_id = ll_from JOIN redirect ON rd_from = S.page_id JOIN page T ON T.page_title = rd_title
WHERE S.page_namespace = 0
AND S.page_is_redirect = 1
AND T.page_namespace = 0
AND T.pa... | {"runningtime": "0.26", "resultsets": [{"rowcount": 6, "headers": ["cl_to"]}, {"rowcount": 13, "headers": ["cl_to"]}]} | null |
Random sample of 10k edits from Hindi Wikipedia | null | USE hiwiki_p;
SELECT rev_id FROM revision
WHERE rev_timestamp BETWEEN "20190512000000" AND "20200512000000"
ORDER BY RAND()
LIMIT 10000; | {"runningtime": "0.32", "resultsets": [{"rowcount": 4, "headers": ["cl_to"]}, {"rowcount": 10, "headers": ["cl_to"]}, {"rowcount": 19, "headers": ["cl_to"]}]} | 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.41", "resultsets": [{"rowcount": 3, "headers": ["cl_to"]}, {"rowcount": 9, "headers": ["cl_to"]}, {"rowcount": 24, "headers": ["cl_to"]}]} | null |
testquery | null | ## | {"runningtime": "60.16", "resultsets": [{"rowcount": 2, "headers": ["page_title"]}]} | null |
List of stations | null | SELECT page_title FROM page WHERE page_is_redirect=0 AND page_namespace=0 AND page_title LIKE "%_station" | {"runningtime": "0.42", "resultsets": [{"rowcount": 1, "headers": ["cl_to"]}, {"rowcount": 4, "headers": ["cl_to"]}, {"rowcount": 12, "headers": ["cl_to"]}]} | 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": ["cat_title", "cat_subcats"], "rowcount": 5}], "runningtime": "0.25"} | 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": ["cl_to", "parent_title", "parent_id", "parent_subcats"], "rowcount": 16}], "runningtime": "0.34"} | null |
Orphaned fair use images (en) | Returns the list of fair use images that are not presently used in any articles | USE idwiki_p;
SELECT CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), '}}') FROM page p
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0)
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.cl_to... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 11}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 6}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 5}], "runningtime": "6.80"} | null |
Checking if Wikidata items are redirects | Answering a question on Wikidata’s Project chat. | USE `wikidatawiki_p`;
SELECT `page_title`, `page_is_redirect`
FROM `page`
WHERE `page_namespace` = 0
AND `page_title` IN (
'Q10000000',
'Q10000001',
'Q10000002',
'Q10000003',
'Q10000004',
'Q10000005'
); | {"resultsets": [{"headers": ["cl_to"], "rowcount": 16}], "runningtime": "0.14"} | null |
Pages translated using Google Translate-bnwiki | null | use enwiki_p;
SELECT page_id,
rev_parent_id,
rev_len,
rev_id,
user_id,
user_name,
rev_timestamp,
page_title
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
LEFT JOIN user
ON rev_actor = user_id
WHERE page.page_namespace = 0 AND page_is_redirect =0
GROUP BY page_title
ORDER BY page... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 1}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 2}], "runningtime": "0.80"} | null |
Files hiding Commons files (fr) | null | select a.img_name from etwiki_p.image a
join commonswiki_p.image b on b.img_name = a.img_name and b.img_sha1 != a.img_sha1
LIMIT 49; | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 23}], "runningtime": "0.30"} | 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": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 10}], "runningtime": "0.24"} | null |
Hewiki user namespace pages with categories | null | use hewiki_p;
select distinct(concat(case p.page_namespace when 2 then 'משתמש' else 'טיוטה' end, ':',p.page_title))#, cl_to as category
from categorylinks inner join page cat
on cat.page_namespace=14
and cat.page_title=cl_to
inner join page p
on p.page_id=cl_from
where ((p.page_namespace = 2
and p.page_title li... | {"runningtime": "0.65", "resultsets": [{"rowcount": 36, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"]}]} | null |
Most active users by edits on plwiki in last 6 months | null | USE plwiki_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... | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 27}], "runningtime": "0.16"} | 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.14", "resultsets": [{"rowcount": 10, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"]}]} | null |
Total size of Wikimedia Commons | The combined size of all files on Wikimedia Commons (current versions only). | USE commonswiki_p;
SELECT SUM(img_size) FROM image; | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 32}], "runningtime": "0.35"} | null |
Bora Bora draft | null | use hewiki_p;
select distinct(cl_to) as 'page_title', 14 as 'page_namespace' from categorylinks
where cl_to like "טקסונים_שתוארו%"
and not exists
(select * from page as p
where p.page_title = cl_to
and p.page_namespace = 14)
| {"runningtime": "0.49", "resultsets": [{"rowcount": 3, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"]}]} | 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": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 26}], "runningtime": "0.35"} | null |
Rezabot query (before) | null | use fawiki_p;
SELECT
actor_name,
COUNT(log_id) cnt
FROM actor
JOIN logging
ON log_actor = actor_id
LEFT JOIN user_groups
ON log_actor = ug_user
AND ug_group = 'bot'
WHERE
log_type ='patrol'
AND log_action='patrol'
AND (
log_params LIKE '%auto";i:0;}'
OR log_params LIKE '%0'
)
AND log_title ... | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 26}], "runningtime": "0.41"} | null |
Rezabot query (after) | null | use fawiki_p;
SELECT
actor_name,
COUNT(log_id) cnt
FROM actor_logging
JOIN logging_userindex
ON log_actor = actor_id
LEFT JOIN user_groups
ON log_actor = ug_user
AND ug_group = 'bot'
WHERE
log_type ='patrol'
AND log_action='patrol'
AND (
log_params LIKE '%auto";i:0;}'
OR log_params LIKE '%0'
... | {"runningtime": "0.49", "resultsets": [{"rowcount": 42, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"]}]} | 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": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 46}], "runningtime": "0.30"} | null |
WikiProject articles ordered by creation date, with Wikidata items | null | USE enwiki_p;
SELECT
MIN(rev_id), article.page_title, rev_timestamp,
page_props.pp_value,
rev_actor
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 cate... | {"runningtime": "0.35", "resultsets": [{"rowcount": 26, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"]}]} | null |
Get article creation date and Wikidata item by category | null | USE enwiki_p;
SELECT
article.page_title,
revision.rev_timestamp,
MIN(revision.rev_id)
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 O... | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats"], "rowcount": 33}], "runningtime": "0.43"} | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"runningtime": "0.36", "resultsets": [{"rowcount": 7, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
মোট সম্পাদনার সংখ্যা | ১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন। | USE bnwiki_p;
SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)"
ORDER BY user_editcount DESC... | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"], "rowcount": 101}], "runningtime": "0.63"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev... | {"runningtime": "0.52", "resultsets": [{"rowcount": 94, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | 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... | {"resultsets": [{"headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"], "rowcount": 19}], "runningtime": "0.14"} | null |
Permanently protected redirects that were protected by a move | See https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals)?action=edit§ion=16#Automatically_remove_protection_from_a_page_when_it_is_moved | SELECT
CONCAT("https://en.wikipedia.org/wiki/", `page_title`)
FROM
`page`
WHERE
`page_title` IN (
SELECT
REPLACE(`log_params`, " ", "_")
FROM
`logging_logindex`
WHERE
`log_type` = "protect"
AND `log_action` = "move_prot"
AND `log_params` IS NOT NULL
AND `log_namespa... | {"runningtime": "0.26", "resultsets": [{"rowcount": 23, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.51", "resultsets": [{"rowcount": 36, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["linter_cat", "count(*)"], "rowcount": 10}], "runningtime": "5.37"} | null |
Creator and usergroups for pages linked from a given page | Creators and their usergroups (if administrator and/or autoreviewer) of every page linked from [[User:Uanfala/dab/missing-new-articles01]].
For [[w:en:WP:VPT#Fetch article creators from a list of articles]] circa 24 Feb 2019.
Gratuitous useless technobabble: finding the first revision of a given page with this method... | SELECT CONCAT('[[',CASE p2.page_namespace WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:' WHEN 0 THEN ':' WHEN 1 THEN 'Talk:' WHEN 2 THEN 'User:' WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:' WHEN 6 THEN ':File:' WHEN 7 THEN 'File talk:' WHEN 8 THEN 'MediaWiki:' WHEN 9 THEN 'MediaWiki talk:' WHEN 10 THEN 'Templa... | {"runningtime": "1373.85", "resultsets": [{"rowcount": 1, "headers": ["CONCAT('[[', page_title, ']]')"]}]} | null |
enwiki:Pages in WikiProject History of Science and WikiProject_Biography without trwiki interwikis | null | SELECT DISTINCT CONCAT("# [[",REPLACE(article.page_title,"_"," "),"]] ([[:en:",REPLACE(article.page_title,"_"," "),"|en]])")
FROM page talk
INNER JOIN page article ON
talk.page_title = article.page_title
INNER JOIN categorylinks ON
cl_from = talk.page_id
WHERE
talk.page_namespace = 1 AND
article.page_namespace ... | {"resultsets": [{"headers": ["CONCAT('[[', page_title, ']]')"], "rowcount": 1}], "runningtime": "828.70"} | null |
Permanently protected redirects that were protected by a move | See https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals)?action=edit§ion=16#Automatically_remove_protection_from_a_page_when_it_is_moved | SELECT DISTINCT CONCAT("[https://en.wikipedia.org/w/index.php?title=", `page_title`, "&redirect=no ", `page_title`, "]") as "Redirect", `pr_level` as "Protection Level"
FROM
`page`
JOIN page_restrictions ON page_id = pr_page
WHERE
`page_title` IN (
SELECT
REPLACE(`log_params`, " ", "_")
FROM
`lo... | {"connection_id": 377000397} | 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": "200.81", "resultsets": [{"rowcount": 0, "headers": ["pl_from", "pl_title"]}]} | null |
Templatelinks protection checker (unprotected) | Unprotected templates with over 500 transclusions | SELECT
CONCAT("Template:", REPLACE(tl_title, "_", " ")) AS "Unprotected template",
count(*) AS "Uses"
FROM
templatelinks
INNER JOIN page ON page.page_namespace = 10 AND page.page_title = templatelinks.tl_title
WHERE
tl_namespace = 10
AND page.page_id NOT IN (SELECT pr_page FROM page_restrictions WHERE pr_ty... | {"runningtime": "131.37", "resultsets": [{"rowcount": 0, "headers": ["pl_from", "pl_title"]}]} | null |
Test quer(y/ies) | null | SELECT * FROM page WHERE page_id IN (SELECT pr_page FROM page_restrictions WHERE pr_level = "autoconfirmed") LIMIT 5 | {"runningtime": "1322.07", "resultsets": [{"rowcount": 0, "headers": ["user_name"]}]} | null |
Templatelinks protection checker (only semi-protected) | Semi-protected templates with over 500 transclusions | SELECT
CONCAT("Template:", REPLACE(tl_title, "_", " ")) AS "Semi-protected template",
count(*) AS "Uses"
FROM
templatelinks
INNER JOIN page ON page.page_namespace = 10 AND page.page_title = templatelinks.tl_title
INNER JOIN page_restrictions ON page.page_id = page_restrictions.pr_page
WHERE
tl_namespace = 1... | {"runningtime": "5.88", "resultsets": [{"rowcount": 6, "headers": ["linter_cat", "count(*)"]}]} | null |
CEE Spring 2020 UkWiki | List of articles created for the Investigative Journalism Week on UkWiki | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT(actor_name) as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
GROUP_CONCAT(
DI... | {"runningtime": "4.69", "resultsets": [{"rowcount": 7, "headers": ["linter_cat", "count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "70.97", "resultsets": [{"rowcount": 12, "headers": ["time", "user", "namespace", "page", "comment"]}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.