title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
پیوندهای قرمز با بیشترین پیوند از مقالههای روستاها | https://fa.wikipedia.org/w/index.php?title=%D8%A8%D8%AD%D8%AB_%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%B1%D9%88%DA%98%D9%87_%D8%AA%D9%82%D8%B3%DB%8C%D9%85%D8%A7%D8%AA_%DA%A9%D8%B4%D9%88%D8%B1%DB%8C_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86/%D9%81%D8%A7%D8%B2_%D8%AF%D9%88... | /* get most used red links referred to from village articles */
USE fawiki_p;
/* pl_title represents the title of red links inside village articles */
/* page_id is the referrer */
SELECT pl_title, count(pl_title)
/* join the referrer to each pl_title */
FROM pagelinks LEFT JOIN page ON pl_from = page_id
WHERE pl_names... | {"resultsets": [{"headers": ["concat('\u0160ablona:', replace(page_title, '_', ' '))"], "rowcount": 27}]} | null |
count of members in user groups in Wikidata | null | USE wikidatawiki_p;
SELECT
ug_group, COUNT(ug_group)
FROM
user_groups
GROUP BY
ug_group; | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_cur_time", "rc_user", "rc_user_text", "rc_namespace", "rc_title", "rc_comment", "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", ... | null |
Redirects obscuring page content (lvwiki) | null | use lvwiki_p;
SELECT
page_namespace,
page_title,
page_len
FROM page
WHERE page_is_redirect = 1 and page_namespace=0 and page_title NOT LIKE "%pagasts%" and page_title NOT LIKE "%ciems%" and page_title NOT LIKE "%Olimpiskajā%"
HAVING page_len > 100
ORDER BY page_namespace ASC; | {"resultsets": []} | null |
SuggestBot subscribers | https://en.wikipedia.org/wiki/Wikipedia:Talk_page_guidelines#When_to_archive_pages suggests talk pages should be archived when they exceed 75KB in size. We currently do not post suggestions to users with pages > 1MB. What if we were to lower that? | USE enwiki_p;
SELECT count(*)
FROM page
JOIN templatelinks
ON page_id=tl_from
WHERE tl_title IN ('SuggestBot/userbox', 'SuggestBot/config') -- SuggestBot's templates
AND tl_namespace = 2 -- Both templates are in user-space
AND page_namespace IN (2, 3) -- Links from either User or User talk.
AND page_title NOT LIKE 'Sug... | {"resultsets": [{"headers": ["if(right(soundex('percussion'),3) = right(soundex('perk\u00fcsyon'),3),1,0)", "soundex('percussion')", "soundex('perk\u00fcsyon')"], "rowcount": 1}]} | null |
Most thanked users on fiwiki | null | USE fiwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 30; | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Hewiki categories | null | select count(*) from hewiki_p.page where page_namespace = 14 order by page_id desc limit 505
| {"resultsets": [{"headers": ["Tables_in_simplewiki_p"], "rowcount": 59}, {"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 14}]} | null |
Wikidata properties without report | For every property a "constraint violation" report can be set to analyze property uses by a bot or the new extension. These properties do not have any. | use wikidatawiki_p;
SELECT CONCAT("P",pi_property_id) AS pId, term_text AS label, pi_type AS datatype
FROM wb_property_info
LEFT JOIN (SELECT * FROM page WHERE page_namespace = 4 AND page_title LIKE "Database&_reports/Constraint&_violations/P%" ESCAPE "&") AS pages
ON page_title = CONCAT("Database_reports/Constrain... | {"resultsets": [{"headers": ["page_title", "page_id", "page_len", "page_namespace", "page_is_redirect", "NumEditors", "NumEdits"], "rowcount": 1000}]} | null |
Puuduvad naised | null | use wikidatawiki_p;
SELECT CONCAT('* [[:d:', witem.page_title, '|', term_text,']] - ', COUNT(witem.page_title)) FROM page AS witem
JOIN pagelinks ON witem.page_id=pl_from AND pl_namespace=0 AND pl_title='Q6581072'
JOIN wb_entity_per_page ON witem.page_id=epp_page_id
JOIN wb_items_per_site ON epp_entity_id=ips_item_id
... | {"resultsets": [{"headers": ["editcounts", "rev_user", "rev_page", "page_id", "page_title", "page_len"], "rowcount": 360194}]} | null |
Hewiki suspicious pages in wikipedia namespace | improve query 2499 | use hewiki_p;
select page_title from page
where page_namespace = 4
and page_is_redirect = 0
and not page_title like "%/%/%"
and not page_title like "איך_להקים_אסם%"
and not page_title like "אירועים/%"
and not page_title like "אישורים_להעתקה%"
and not page_title like "בוט/%"
and not page_title like "ביכורים/%"
and not p... | {"resultsets": [{"headers": ["user_name"], "rowcount": 2111}]} | null |
Non-free files used outside articles (lvwiki) | http://quarry.wmflabs.org/query/1203
Todo: ielikt, cik saišu | USE lvwiki_p;
select now();
SELECT p.page_title,count(*)
#concat("[[:Attēls:",REPLACE(p.page_title, '_', ' '),"]]"), p2.page_namespace, p2.page_title
#CONCAT('* [[:Attēls:',page_title,']]')
FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from
INNER JOIN (imagelinks i LEFT JOIN redirect r ON i.il_from = r.... | {"resultsets": [{"headers": ["page_title"], "rowcount": 4364}]} | null |
Overused non-free files (lvwiki) | From en:Wikipedia:Database reports/Overused non-free files | USE lvwiki_p;
SELECT
concat("[[:Attēls:",REPLACE(page_title, '_', ' '),"]]"),
COUNT(*)
FROM imagelinks
JOIN (SELECT
page_id,
page_title
FROM page
JOIN categorylinks
ON cl_from = page_id
WHERE cl_to IN ("Aizsargāti_attēli", "Aizsargāti_logo", "Aizsargātas_pastmarkas",
"Aizsarg... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
visvairāk izmantotās infokastes | izņemt "informācijas izklāsts" | use lvwiki_p;
SELECT
Concat('[[Veidne:',tl_title,']]'),
COUNT(*)
FROM templatelinks
right join page on page_title=tl_title
WHERE tl_namespace = 10 and tl_from_namespace=0# tl_from_namespace=0
and tl_title like "%nfo%"
and tl_title not like "%/%"
and page_is_redirect=0
GROUP BY tl_title
ORDER BY COUNT(*) DESC
LIMIT ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Voci orfane e di dubbia enciclopedicità | null | USE itwiki_p;
SELECT CONCAT("# [[", page_title, "]]")
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_id IN (SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND tl_title IN ('O'))
AND page_id IN (SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND tl_title IN ('E')); | {"resultsets": [{"headers": ["SS", "recent_editcount", "COUNT(*)"], "rowcount": 200}]} | null |
Sportivi con citazioni da chiarire | null | USE itwiki_p;
SELECT CONCAT("# [[", page_title, "]]")
FROM page, templatelinks
WHERE page_namespace = 0
AND page_id = tl_from
AND tl_title = 'Sportivo'
AND page_id IN (SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND tl_title IN ('Chiarire', 'Non_chiaro', 'Da_chiarire',
'Citazione_necess... | {"resultsets": [{"headers": ["tl_title", "count_tl_title"], "rowcount": 20}]} | null |
Voci lunghe di it.wiki senza interlink (> 50 kb) | null | USE itwiki_p;
SELECT CONCAT("# [[", page_title, "]]")
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0
AND page_id NOT IN
(SELECT ll_from
FROM langlinks)
AND page_len > 50000
ORDER BY page_title; | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 0}]} | null |
Percent of bot edits in previous month in articles on plwiki | null | USE plwiki_p;
SELECT rc_bot AS is_bot, COUNT(*) AS edits, (COUNT(*) / (
SELECT COUNT(*)
FROM recentchanges
WHERE rc_namespace = 0)) * 100 AS '%'
FROM recentchanges
WHERE rc_namespace = 0
GROUP BY 1; | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 3}]} | null |
Number of Commons images which are not used on any sister project | by Bawolff - https://commons.wikimedia.org/wiki/User:Bawolff/usage_stats | use commonswiki_p;
select count(img_name) from image LEFT OUTER JOIN globalimagelinks on gil_to = img_name where gil_to is null; | {"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_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len"... | null |
some ruwiki files | null | USE ruwiki_p;/*
SELECT CONCAT('#[[:File:',page.page_title,']]') AS Filename, page_len FROM page
WHERE page_namespace=6 AND page_is_redirect=0 AND page_len < 30 ORDER BY page_len ASC;*/
SELECT CONCAT('#[[:File:',page.page_title,']]') AS Filename, page_len FROM page
WHERE page_namespace=6 AND page_is_redirect=0 AND page_... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Most frequent domains (lvwiki) | http://quarry.wmflabs.org/query/2924 | USE lvwiki_p;
SELECT url, COUNT(*)
FROM (
SELECT SUBSTRING_INDEX(SUBSTRING(el_to, LOCATE('://', el_to) + 3), '/', 1) url
FROM externallinks
WHERE el_from IN (
SELECT page_id
FROM page
WHERE page_namespace = 0
)
) tmp_table
#where url LIKE "quarry.wmflabs.org%"
GROUP BY url
HAVING COUNT(*) > 10
ORDER... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wpage", "commonscat"], "rowcount": 1000}]} | null |
Suggerimento immagini template Sportivo | null | USE itwiki_p;
SELECT page_title
FROM page, categorylinks
WHERE page_id = cl_from
AND page_namespace = 1
AND cl_to = 'Suggerimento_immagini'
AND page_title IN
(SELECT page_title
FROM page, templatelinks
WHERE page_id = tl_from
AND page_namespace = 0
AND tl_namespace = 10
AND tl_title = 'Sportivo')
ORDER BY page_title; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_namespace", "log_title", "log_comment", "log_params", "log_deleted", "log_user_text", "log_page"], "rowcount": 3}]} | null |
Suggerimento immagini template Carica pubblica | null | USE itwiki_p;
SELECT page_title
FROM page, categorylinks
WHERE page_id = cl_from
AND page_namespace = 1
AND cl_to = 'Suggerimento_immagini'
AND page_title IN
(SELECT page_title
FROM page, templatelinks
WHERE page_id = tl_from
AND page_namespace = 0
AND tl_namespace = 10
AND tl_title = 'Carica_pubblica')
ORDER BY page_t... | {"resultsets": [{"headers": ["rd_from", "rd_title"], "rowcount": 10}]} | null |
Early patrollers | disablemail
fancysig
gender
nickname
----
skin
timecorrection
variant
language | use ruwiki_p;
select datediff(log_timestamp, user_registration) as days, cast(log_title as char) log_title, log_user_text, user_registration, log_timestamp, log_params from logging join user on replace(log_title, '_', ' ') = user_name where log_type = 'rights' and log_action <> 'autopromote' and (log_params like '%"edi... | {"resultsets": []} | null |
Most common block summaries in 2 years | null | USE etwiki_p;
SELECT
log_comment,
COUNT(log_id)
FROM logging
WHERE log_type = 'block'
AND log_action = 'block'
AND log_timestamp > ( NOW() - INTERVAL 24 MONTH )
GROUP BY log_comment
ORDER BY COUNT(log_id) DESC
LIMIT 100; | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model", "page_lang"], "rowcount": 100}]} | null |
Top 50 editors to mainspace at plwiki | null | SELECT
rc_user_text,
COUNT(1) AS num_contribs
FROM plwiki_p.recentchanges
WHERE
rc_namespace IN (0)
AND rc_logid = 0
GROUP BY rc_user
ORDER BY num_contribs DESC
LIMIT 50 | {"resultsets": [{"headers": ["concat(\"Kategorie:\", replace(page_title, \"_\", \" \"))"], "rowcount": 15}]} | null |
Rakstu/lietotāju lapas vienā kategorijā | null | use lvwiki_p;
SELECT DISTINCT
CONCAT('#[[:Kategorija:',cl_to,']]') as "Nosaukums"
#cl_to
FROM categorylinks AS cat
JOIN page AS pg1
ON cat.cl_from = pg1.page_id
WHERE page_namespace = 2
AND EXISTS (SELECT
1
FROM page AS pg2
JOIN categorylinks AS cl
ON pg2.page_id = cl... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_namespace", "log_title", "log_comment", "log_params", "log_deleted", "log_user_text", "log_page"], "rowcount": 0}]} | null |
Very short articles in cswiki | null | USE cswiki_p;
SELECT page_title, page_len, COUNT(links.pl_from) AS backlinks, page_id
FROM (SELECT * FROM page WHERE page_len < 400 AND page_namespace = 0 AND page_is_redirect = 0) AS pages
LEFT JOIN (SELECT * FROM page_props WHERE pp_propname = "disambiguation") AS dab
ON dab.pp_page = page_id
LEFT JOIN (SELECT *... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1667}]} | null |
Shamzan draft | null | use hewiki_p;
select page_namespace, page_title
from page inner join page_props
on page_id = pp_page
where pp_propname = "defaultsort"
and replace(replace(pp_value, ",", ""), " ", "_") = page_title
and locate("_", page_title) = 0
order by page_namespace asc;
select page_title, pp_value as defsort, replace(replace(pp_va... | {"resultsets": [{"headers": ["page_title"], "rowcount": 251}]} | null |
Unused templates on plwiki | null | USE plwiki_p;
SELECT CONCAT('# {{s|',page_title,'}}') as page_title, rev_user_text, rev_timestamp
FROM page, templatelinks, revision
WHERE page_id = tl_from
AND rev_page = page_id
AND rev_parent_id = 0
AND tl_namespace = 10
AND page_title NOT LIKE '%/%'
AND page_title NOT LIKE '%_władców_%'
AND page_title NOT LIKE '%_... | {"resultsets": [{"headers": ["pt"], "rowcount": 200}]} | null |
What's the most recent edit to enwiki? | null | USE enwiki_p;
SELECT max(rev_user) FROM revision_userindex; | {"resultsets": [{"headers": ["pt"], "rowcount": 9}]} | null |
Lionster draft | null | set @category = "רבנים";
use hewiki_p;
select page_namespace, page_title from page inner join categorylinks
on page_id = cl_from
and cl_to = replace(@category, " ", "_")
and not page_namespace = 14
where not exists
(select * from imagelinks
where il_from = page_id)
| {"resultsets": [{"headers": ["page_title"], "rowcount": 131}]} | null |
Yona draft | null | use hewiki_p;
select concat('# [[:קט:', replace(page_title, "_", " "), ']]') as category from page as p1
where page_namespace = 14
and not exists
(select * from categorylinks as c1
where cl_from = page_id
and not cl_to = "קטגוריות_מוסתרות")
and exists
(select * from categorylinks as c3
where cl_from = page_id
and c... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Hewiki red links from articles to articles | null | use hewiki_p;
select pl_count as 'מספר הקישורים', pl_title as 'שם הערך' from
(select count(*) as pl_count, pl_title from pagelinks as pl1
where pl1.pl_from_namespace = 0
and pl1.pl_namespace = 0
and not exists
(select * from page
where pl1.pl_title = page_title
and page_namespace = 0)
and not exists
(select * from ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 31}, {"headers": ["page_title", "defsort", "replaced", "space"], "rowcount": 496}]} | null |
Dana draft B | null | use hewiki_p;
select * from recentchanges
where not rc_patrolled
and rc_namespace = 0
order by rc_this_oldid
limit 1000
| {"resultsets": [{"headers": ["page_title", "pl_title"], "rowcount": 1}]} | null |
Kotz draft | null | use hewiki_p;
select * from page
where exists
(select * from recentchanges
where rc_cur_id = page_id and
(rc_comment like "%21228493%" or
rc_comment like "%21228467%" or
rc_comment like "%21228459%" or
rc_comment like "%21228448%" or
rc_comment like "%21228435%" or
rc_comment like "%21226922%" or
rc_comment like ... | {"resultsets": [{"headers": ["reviewer", "reviews"], "rowcount": 1}]} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"resultsets": [{"headers": ["page_namespace", "page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"], "rowcount": 10}, {"headers": ["linter_cat"], "rowcount": 9}, {"headers": ["count(distinct(linter_page))"], "rowcount": 1}, {"headers": ["count(linter_page)"], "rowcount"... | null |
Redirects to pages containing "Skarbnica Wikipedii" on plwiki | null | USE plwiki_p;
SELECT CONCAT('# [[',page_title,']]') AS page_title, CONCAT('[[',rd_title,']]') AS rd_title
FROM page
JOIN redirect
ON rd_from = page_id
AND rd_title LIKE 'Skarbnica_Wikipedii%'
AND page_namespace = 0
/*AND rd_namespace = 0*/ | {"resultsets": [{"headers": ["img_name"], "rowcount": 50}]} | null |
Give and get thanks on plwiki | null | USE plwiki_p;
SELECT log.log_title as gets_thx, log.log_user_text as gives_thx, COUNT(*) as cnt
FROM logging as log,
(
SELECT log_title as user, COUNT(*) as cnt_gets
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
) as gets, /*those who were thanked by someone*/
(
SELECT log_user_text as user, COUNT(*... | {"resultsets": [{"headers": ["REPLACE(page_title,'_',' ')", "concat('* [[\u0631\u062f\u0647:',REPLACE(frst.cl_to,'_',' '),']]')"], "rowcount": 957}]} | null |
List of rowiki users by number of edits (excl. bots) | null | USE rowiki_p;
SELECT user_name,
user_editcount
FROM user
WHERE user_id NOT IN /* Exclude local bots. */
(SELECT ug_user
FROM user_groups
WHERE ug_group="bot")
AND user_name NOT IN
(SELECT gu_name
FROM centralauth_p.globaluser JOIN centralauth_p.localuser ON lu_name=gu_name AND lu_wiki="r... | {"resultsets": [{"headers": ["log_user_text", "log_title", "log_namespace", "log_timestamp", "log_comment"], "rowcount": 11}]} | null |
Hewiki non autopatrolled users | null | use hewiki_p;
select user_id, user_name, user_registration, user_editcount from user
where user_editcount > 500
and not exists
(select * from user_groups
where user_id = ug_user
and ug_group in ('autopatrolled', 'patroller', 'sysop', 'bureaucrat', 'bot'))
order by user_editcount desc;
select user_id, user_name, user_... | {"resultsets": [{"headers": ["img_name"], "rowcount": 1}]} | null |
Last item creations using QuickStatements example | null | use wikidatawiki_p;
SELECT
*
FROM
recentchanges_userindex
WHERE
rc_user_text="QuickStatementsBot"
AND rc_new=1
AND rc_comment LIKE "%#quickstatements%"
ORDER BY rc_timestamp DESC
LIMIT 100; | {"resultsets": [{"headers": ["title"], "rowcount": 5}]} | null |
Most linked disambiguations (lvwiki) | From https://quarry.wmflabs.org/query/1819 [thanks to Matěj Suchánek] | select now();
USE lvwiki_p;
SELECT disambigs.page_title, COUNT(DISTINCT links.pl_from) AS direct_links, COUNT(DISTINCT redirects.page_id) AS redirects,
COUNT(DISTINCT links.pl_from) + COUNT(DISTINCT links_to_redirects.pl_from) AS all_backlinks
FROM (SELECT * FROM page_props WHERE pp_propname = 'disambiguation') AS d... | {"resultsets": [{"headers": ["eu_aspect", "count(*)"], "rowcount": 6}]} | null |
Get most recently edited Active research projects | null | USE metawiki_p;
SELECT
page.page_title,
rev_timestamp,
rev_user_text,
rev_comment
FROM page
INNER JOIN categorylinks ON
cl_from = page_id
LEFT JOIN page AS talk_page ON
talk_page.page_namespace = 203 AND
talk_page.page_title = page.page_title
INNER JOIN revision AS last_edit ON
rev_id = GREATEST(... | {"resultsets": [{"headers": ["page_title", "page_namespace", "GROUP_CONCAT(tl_title ORDER BY tl_title ASC SEPARATOR \", \")", "COUNT(*)"], "rowcount": 492}, {"headers": ["templates", "ct", "COUNT(*)"], "rowcount": 145}]} | null |
Hewiki multiple fair use | null | use hewiki_p;
select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title
from page as p1 join image
on exists
(select * from categorylinks as cl1
where cl_from = page_id
and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן"
or exists
(select * from page as p2
where p2.page_name... | {"resultsets": [{"headers": ["titl"], "rowcount": 9}]} | null |
Double file extensions | http://commons.wikimedia.org/wiki/User:Dispenser/Double_extension
http://quarry.wmflabs.org/query/889 | -- 2> /dev/null; date; echo '
/* Double file extensions
* License: Public Domain
* Run time: 20 minutes <SLOW_OK>
*/
USE commonswiki_p;
SELECT CONCAT("* {{/link|File:", REPLACE(REPLACE(page_title, "_", " "), "=", "="), "}}") AS Filename
FROM page
WHERE page_namespace=6 AND page_is_redirect=0
AND CONVERT(page_tit... | {"resultsets": [{"headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_user_text"], "rowcount": 1}]} | null |
Last ten revisions to the Johann_Sebastian_Bach page in enwiki | null | select * from revision where rev_page = 9906294 ORDER BY rev_timestamp DESC LIMIT 10; | {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_user", "rc_user_text", "rc_namespace", "rc_title", "rc_comment", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type", ... | null |
Redirect categories on plwiki | null | USE plwiki_p;
SELECT CONCAT('# [[:Kategoria:',cat_title,']]') AS cat_title, cat_pages
FROM page, category
WHERE page_title = cat_title
AND page_namespace = 14
AND page_is_redirect = 1
ORDER BY cat_pages DESC, cat_title ASC; | {"resultsets": [{"headers": ["page_title"], "rowcount": 346}]} | null |
Articles with double birth/death category on plwiki | null | use plwiki_p;
select CONCAT("# [[",page_title,"]]") AS page_title, GROUP_CONCAT(cl_to SEPARATOR ',')
from categorylinks
join page on cl_from=page_id
where cl_to rlike "Urodzeni_w_1.*"
and page_title not like '%_i_%'
and page_title not like 'Bracia%'
and page_title not like 'Honor_Blackman'
and page_title not like 'Joyc... | {"resultsets": [{"headers": ["page_title", "rev_user_text", "rev_comment", "rev_timestamp"], "rowcount": 4263}]} | null |
Featured articles on huwiki | null | use huwiki_p;
SELECT page_id AS val, page_namespace AS namespace, page_title AS title FROM page JOIN page_props ON page_id = pp_page
WHERE pp_propname = 'wikibase-badge-Q17437796'; | {"resultsets": [{"headers": ["page_title", "rev_user_text", "rev_comment", "rev_timestamp"], "rowcount": 0}]} | null |
Wikidata items with removed sitelink(s) | This query lists items with no sitelinks which had some sitelinks before, but they were removed.
It has its testing alternative at https://quarry.wmflabs.org/query/1269
| USE wikidatawiki_p;
SELECT CONCAT('* [[User:',rev1.rev_user_text,'|]] [[Special:Diff/',rev1.rev_id,'|removed]] a sitelink from [[',page_title,']] at ',rev1.rev_timestamp,
" with comment: ''",REPLACE(REPLACE(REPLACE(rev1.rev_comment,' */','}}'),'/* wbsetsitelink-remove:','{{int:wikibase-entity-summary-wbsetsitelink-remo... | {"resultsets": [{"headers": ["files"], "rowcount": 2}]} | null |
Largest stubs in cswiki | null | USE cswiki_p;
SELECT page_title AS page, page_namespace, page_len AS length
FROM templatelinks
JOIN page ON page_id = tl_from
WHERE tl_namespace = 10 AND tl_title = 'Pahýl' AND page_len > 5000
ORDER BY page_len DESC, page_title, page_namespace; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_namespace", "log_title", "log_comment", "log_params", "log_deleted", "log_user_text", "log_page"], "rowcount": 51}]} | null |
Voci orfane (con tag O) | null | USE itwiki_p;
SELECT CONCAT('# [[', page_title, ']]')
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_id IN (SELECT tl_from
FROM templatelinks
WHERE tl_namespace = 10
AND tl_title IN ('O')); | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format"], "rowcount": 1}, {"headers": ["rc_id", "rc_timestamp", "rc_user", "rc_user_te... | null |
kowiki deleted files | null | use kowiki_p;
do
sql kowiki_p "select count(log_timestamp) FROM logging WHERE log_namespace = 6 AND log_type = 'delete' AND log_timestamp > ( NOW() - INTERVAL 12 MONTH )" | tail -n 1
done; | {"resultsets": [{"headers": ["rank", "IFNULL(article, '\u0412\u0441\u044c\u043e\u0433\u043e')", "user_number", "size_increase", "users"], "rowcount": 43}]} | null |
Ruwiki .2F | null | use ruwiki_p;
select concat('Шаблон:', page_title) as 'Шаблон' from page
where page_namespace = 10 and
(page_title like "%.2F%" or page_title like "%.28%" or page_title like "%.29%")
| {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Hewiki first articles | null | use hewiki_p;
select replace(page.page_title, '_', ' ') as article, rev_comment as comment, rev_user_text as user, rev_timestamp as created
from page join revision
on page_id = rev_page
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
order by page_id asc
limit 1000
| {"resultsets": [{"headers": ["now()"], "rowcount": 1}, {"headers": ["ips_item_id", "COUNT(ips_item_id)", "other links"], "rowcount": 9589}]} | null |
Hewiki flow pages | null | use hewiki_p;
select concat(case page_namespace when 3 then 'שיחת משתמש' when 5 then 'שיחת ויקיפדיה' else page_namespace end,
':', replace(page_title, '_', ' ')) as pages from page
where page_content_model = 'flow-board'
and not page_namespace = 2600
order by pages asc | {"resultsets": [{"headers": ["CONCAT('# [[:File:', REPLACE(page_title,'_',' '), ']]')"], "rowcount": 85}]} | null |
pikimad kasutaja alamlehed | Longest user subpages | USE etwiki_p;
SELECT CONCAT('Kasutaja:', page_title), page_len FROM page
WHERE page_is_redirect=0 AND page_namespace=2 AND page_title LIKE '%/%' AND page_len > 1000
ORDER BY page_len DESC; | {"resultsets": [{"headers": ["concat('# {{\u0627\u0644\u06af\u0648\u0628|',page_title,'}}')"], "rowcount": 12}]} | null |
Most linked redirects in cswiki | null | USE cswiki_p;
SELECT page_title, COUNT(*), rd_title
FROM (SELECT * FROM page WHERE page_is_redirect = 1 AND page_namespace = 0) AS redirs
JOIN (SELECT * FROM pagelinks WHERE pl_from_namespace = 0) AS pages
ON pl_title = page_title AND pl_namespace = page_namespace
JOIN redirect
ON rd_from = page_id
GROUP BY page... | {"resultsets": [{"headers": ["gt_lat", "gt_lon", "gt_page_id", "gt_name", "title", "gt_country", "gt_region"], "rowcount": 0}, {"headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "title", "gt_country", "gt_region"], "rowcount": 1382}]} | null |
Lingid teistele Wikipediatele välislingina | null | USE etwiki_p;
SELECT
page_title,
SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3),'/',-1) AS site,
el_to
FROM externallinks, page
WHERE (el_from = page_id
AND page_namespace = 0)
HAVING site LIKE '%.wikipedia.org'; | {"connection_id": 68154803} | null |
Ruwiki articles with non-existing or redirected categories | null | use ruwiki_p;
select count(*) from categorylinks
where exists
(select * from page
where page_id = cl_from
and page_namespace = 0)
and not exists
(select * from page
where page_title = cl_to
and page_namespace = 14
and not page_is_redirect)
| {"resultsets": [{"headers": ["DAY", "ACTIONS"], "rowcount": 30}]} | null |
Kotz draft | null | use hewiki_p;
select * from page
where page_namespace = 14
and exists
(select * from categorylinks
where page_title = cl_to
and exists
(select * from page
where cl_from = page_id
and page_namespace = 0))
and exists
(select * from categorylinks
where page_title = cl_to
and exists
(select * from page
where cl... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model", "page_lang"], "rowcount": 1}]} | null |
Redirect pages with text | null | USE etwiki_p;
SELECT page_title, page_len FROM page
WHERE page_is_redirect=1 AND page_namespace=0 AND page_len > 250 ORDER BY page_len DESC; | {"resultsets": [{"headers": ["ipb_range_start"], "rowcount": 10}]} | null |
Hewiki navigation templates without non hidden category | null | use hewiki_p;
select * from page
where page_namespace = 10
and exists
(select * from categorylinks
where cl_from = page_id
and cl_to = 'תבניות_ניווט:רשימה_אוטומטית')
and not exists
(select * from categorylinks
where cl_from = page_id
and not cl_to = 'תבניות_ניווט:רשימה_אוטומטית')
| {"resultsets": [{"headers": ["rev_page", "page_title", "rev_timestamp"], "rowcount": 10}]} | null |
Top contributors for index and its pages | edit title after page_title LIKE with the initial segment of page title followed by '%' to gather index and all its pages and then run to get top contributors. | use tewikisource_p;
SELECT
user_name,
COUNT(*) As Edits
FROM user
LEFT JOIN revision
ON rev_user = user_id
LEFT JOIN page
ON page_id = rev_page
WHERE page_title LIKE 'నా_జీవిత%'
GROUP BY user_name
HAVING COUNT(*) > 0
ORDER BY Edits DESC; | {"resultsets": [{"headers": ["pi_property_id", "pi_type", "pi_info"], "rowcount": 3}, {"headers": ["term_row_id", "term_entity_id", "term_full_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"], "rowcount": 3}, {"headers": ["change_id", "change_type", "change_ti... | null |
Syed's books -Status of pages with only one revision | Shows the current status of page quality of Syed book pages with only one revision | use tewikisource_p;
SELECT
categorylinks.cl_to,
count(*) as pagecount
FROM page
JOIN categorylinks ON page.page_id = categorylinks.cl_from
JOIN revision ON revision.rev_id = page.page_latest
WHERE page_namespace=104
AND rev_parent_id=0
AND page.page_title REGEXP 'భారత_స్వాతంత్ర్యోద్యమం_-_ముస్లింలు.pdf|భారత_స్వ... | {"resultsets": []} | null |
Daily anonymous mobile edits from Italian Wikipedia | See https://meta.wikimedia.org/wiki/Research:Anonymous_mobile_editing_in_Italian_Wikipedia | /* Forked from http://quarry.wmflabs.org/query/948 */
USE itwiki_p;
SELECT
LEFT(rev_timestamp, 8) AS date,
COUNT(*)
FROM revision_userindex
INNER JOIN tag_summary ON
ts_rev_id = rev_id AND
ts_tags LIKE "%mobile web edit%"
WHERE
rev_timestamp BETWEEN "20141028" AND "20141231" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["Quarry", "Time"], "rowcount": 1}, {"headers": ["ml ", "SNum", "QID", "PageID", "Title", "LastRev", "Bytes", "Redirect", "New", "Touched", "PageTouched", "LinksUpdated"], "rowcount": 1}]} | null |
GennadyL draft | null | use ruwiki_p;
select * from page join categorylinks
on page_id = cl_from
where replace(cl_to, '_', ' ') in
('Преподаватели ВЗФЭИ',
'Преподаватели Финансового университета при Правительстве Российской Федерации',
'Выпускники Финансового университета при Правительстве Российской Федерации',
'Ректоры Финансового униве... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 10}]} | null |
Wikidata usage in cswiki | null | USE cswiki_p;
SELECT COUNT(*), COUNT(DISTINCT eu_page_id), COUNT(DISTINCT eu_entity_id) FROM wbc_entity_usage;
/*
SELECT page_title, page_namespace, page_id, eu_entity_id, GROUP_CONCAT(DISTINCT eu_aspect SEPARATOR ', ') AS aspects,
rev_timestamp AS last_edited
FROM wbc_entity_usage
JOIN page ON page_id = eu_page_id... | {"resultsets": [{"headers": ["CONCAT(\"* {{Q|\",cl_sortkey_prefix,\"}}\")", "page_title", "COUNT(*)"], "rowcount": 100}]} | null |
Categories about taxons in cswiki missing interwiki | TODO: case insensitivity, underscores | USE cswiki_p; # change this to your project
SELECT sitelink.ips_site_page AS category, CONCAT("Q",items.ips_item_id) AS category_item,
GROUP_CONCAT(DISTINCT term_full_entity_id SEPARATOR ', ') AS taxon_item,
COUNT(items.ips_site_page) AS number_of_sitelinks
FROM page AS categories
JOIN (SELECT * FROM wikidatawiki_p... | {"resultsets": [{"headers": ["page_id", "page_len", "CONCAT(\"File:\",p.page_title)"], "rowcount": 7}]} | null |
Toolserver.org links on huwiki | Select pages from hu.wikipedia.org wich link to toolserver.org | use huwiki_p;
select page_namespace, page_title, el_to from externallinks join page on el_from = page_id and el_to regexp '^(https?:)?//toolserver.org' and page_namespace not in (1,2,3,5,7,9,11,15,90); | {"connection_id": 4681474} | null |
Toolserver.org links on huwiki | Select pages from hu.wikipedia.org wich link to toolserver.org | use huwiki_p;
select page_namespace, page_title, el_to from externallinks join page on el_from = page_id and el_to regexp '^(https?:)?//toolserver.org' and page_namespace not in (1,2,3,5,7,9,11,15,90); | {"connection_id": 4684113} | null |
Largest lvwiki talk pages | null | #http://quarry.wmflabs.org/query/1121
#use lvwiki_p;
#SELECT * FROM user where user_registration > 20140700000000 AND user_editcount > 50;
USE lvwiki_p;
SELECT page_namespace,page_title,page_len FROM page
WHERE
#(page_namespace <> 3) and
#(page_namespace % 2 =1 or page_namespace=4)
page_namespace % 2 =1
# AND LOW... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | null |
Interwiki nélküli kategóriák | null | USE huwiki_p;
SELECT page_title FROM page
LEFT JOIN templatelinks ON tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Kat-redir'
LEFT JOIN langlinks ON ll_from = page_id
WHERE page_namespace = 14
AND NOT page_title LIKE 'Csonkok_%'
AND NOT page_title LIKE 'Figyelmet_igénylő_lapok_%'
AND page_is_red... | {"resultsets": [{"headers": ["page_id", "page_len", "CONCAT(\"File:\",p.page_title)"], "rowcount": 2}]} | null |
Hewiki template restrictions | null | use hewiki_p;
select page_title from page as p0
where page_namespace = 10
and page_is_redirect = 0
and not page_title like "היום_בהיסטוריה_%"
and not page_title like "הידעת?_%"
and not page_title like "ערך_מומלץ_%"
and not page_title like "תמונה_מומלצת_%"
and not page_title like "מועד_עברי_%"
and not page_title like "צ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 222}]} | null |
Top 20 ELwiki articles by edits & editors in past 7 days | null | USE elwiki_p;
SELECT CONCAT('[[', replace(rc_title, '_', ' '), ']]') AS article, COUNT(*) AS edits,
COUNT(DISTINCT rc_user_text) AS editors, -- used to be rc_user which counted all IPs as same
ROUND(LN(COUNT(*)) * (LN(COUNT(DISTINCT rc_user_text))+1.4), 2) AS weighted_rank
FROM recentchanges
WHERE rc_namespace = 0... | {"resultsets": [{"headers": ["page_title"], "rowcount": 10}]} | null |
Wikidata - tables - wb_property_info - describe table, sample data | null | use wikidatawiki_p;
SELECT CURRENT_DATE;
DESCRIBE wb_property_info;
SELECT * FROM wb_property_info LIMIT 10;
SELECT pi_type, pi_info, count(*) FROM wb_property_info GROUP BY pi_type ORDER BY COUNT(*) DESC;
| {"resultsets": [{"headers": ["rev_timestamp", "rev_user_text", "COUNT(*)", "rev_comment", "page_title", "page_namespace"], "rowcount": 1}]} | null |
Wikidata - wb_entity_per_page - sample | replaced by 1238 | use wikidatawiki_p;
SELECT *
FROM wb_entity_per_page
WHERE epp_entity_id = 5
| {"resultsets": [{"headers": ["rev_timestamp", "rev_user_text", "rev_comment", "page_title", "page_namespace"], "rowcount": 165}]} | null |
Categorized article redirects in German Wikipedia | All redirect articles in German Wikipedia with at least one category. One item per category/article pair. | USE dewiki_p;
SELECT page_title, rd_namespace, rd_title
FROM page, redirect
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_from = page_id
AND rd_namespace <> 0; | {"resultsets": [{"headers": ["lang", "count"], "rowcount": 41}]} | null |
Wikidata - English descriptions starting with "a .." | null | #See https://www.wikidata.org/wiki/Help:Description#No_initial_articles_.28a.2C_an.2C_the.29
#Initial run: about 13000, later 8000
#run on 2017-09-07: 26,952
SELECT CURRENT_DATE;
use wikidatawiki_p;
SELECT
CONCAT('Q', term_entity_id) As item,
CONCAT('D', term_language) As tr,
CONCAT('"', term_text, '"') As c... | {"resultsets": [{"headers": ["ll_title", "page_title"], "rowcount": 1}]} | null |
Wikidata - given names - missing names | runtime > 5 min | # Find missing given names
#
# Uses items linking P27, but not to P735
# The "given name" is the first part of the label. This can be a given name, but not necessarily.
#
# For project, see https://www.wikidata.org/wiki/Wikidata:WikiProject_Names
#
# general database scheme https://upload.wikimedia.org/wikipedia/comm... | {"resultsets": [{"headers": ["ll_title", "page_title"], "rowcount": 0}]} | null |
Fair use images used outside of mainspace | null | USE enwiki_p;
SELECT DISTINCT CONCAT('{{subst:User:B/Fair use images used outside of mainspace/Table row|[[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']]|[[:File:', i_p.page_title, ']]|', r.rev_timestamp, '}}')
FROM page p
INNER JOIN imagelinks i ON i.il_from = p.page_id
AND i.il_from_namespace <> 0
IN... | {"resultsets": [{"headers": ["edits", "user_name"], "rowcount": 28}]} | null |
List of fair use images used on several articles | This query is a list of fair use images that are used in at least five articles. | USE enwiki_p;
SELECT pagetitle, cnt FROM
(
SELECT concat('* [[:File:', i_p.page_title, ']] - ') as pagetitle, count(*) AS cnt
FROM page i_p
INNER JOIN imagelinks i ON i.il_to = i_p.page_title
INNER JOIN page p ON i.il_from = p.page_id AND i.il_from_namespace = 0
INNER JOIN categorylinks c2 ON i_p.... | {"resultsets": [{"headers": ["lit", "No."], "rowcount": 3}]} | null |
List of articles with excessive fair use images | null | USE enwiki_p;
SELECT pagetitle, cnt FROM
(
SELECT concat('* [[', p.page_title, ']] - ') as pagetitle, count(*) AS cnt
FROM page p
INNER JOIN imagelinks i ON i.il_from = p.page_id
AND i.il_from_namespace = 0
INNER JOIN page i_p ON i.il_to = i_p.page_title AND 1 <> p.page_is_redirect
INNER JOIN categorylinks c2 ... | {"resultsets": [{"headers": ["lit", "No."], "rowcount": 16}]} | null |
List of articles about living people containing at least one fair use image | If I did this right, it's going to return a list of articles about living people that have at least one non-free image. | USE enwiki_p;
SELECT DISTINCT CONCAT('* [[', p.page_title, ']]') FROM page p
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from AND c1.cl_to = "Living_people"
INNER JOIN imagelinks i ON i.il_from = p.page_id
AND i.il_from_namespace = 0
AND RIGHT(i.il_to, 4) <> '.ogg'
INNER JOIN page i_p ON i.il_to = i_p... | {"resultsets": [{"headers": ["lit", "No."], "rowcount": 16}]} | null |
We miss you! (cswiki) | null | USE cswiki_p;
SELECT user_name, first_edit, last_edit, user_editcount, articles_created
FROM (SELECT *, MAX(rev_timestamp) AS last_edit FROM revision_userindex WHERE rev_user > 0 GROUP BY rev_user) AS latest
JOIN user
ON user_id = latest.rev_user
LEFT JOIN (SELECT *, COUNT(*) AS articles_created FROM revision_user... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_comment", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format"], "rowcount": 10}]} | null |
Redirect pages with interwiki | null | USE fawiki_p;
SELECT CONCAT ('# [[',page_title,']] > [[:en:',ll_title,']]')
FROM page
INNER JOIN langlinks ON page_id = ll_from JOIN redirect
WHERE page_namespace = 0 and rd_from=page_id and ll_lang='en'
AND page_is_redirect = 1
GROUP BY page_title
ORDER BY COUNT(ll_from) DESC; | {"resultsets": [{"headers": ["rc_timestamp", "CONCAT(\"Special:Diff/\",rc_this_oldid)", "rc_title", "rc_user_text", "rc_comment"], "rowcount": 3983}]} | null |
Recent Orphaned Images | null | USE enwiki_p;
SELECT CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), '}}') FROM page p
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 redirect on rd... | {"resultsets": [{"headers": ["rc_timestamp", "CONCAT(\"Special:Diff/\",rc_this_oldid)", "rc_title", "rc_user_text", "rc_comment"], "rowcount": 4584}]} | null |
File talk pages with no files | null | USE enwiki_p;
SELECT concat('* [[File talk:', p.page_title, ']] ') as pagetitle
FROM page p
LEFT OUTER JOIN page i_p ON i_p.page_title = p.page_title AND i_p.page_namespace = 6
LEFT OUTER JOIN commonswiki_p.page ci_p ON ci_p.page_title = p.page_title AND ci_p.page_namespace = 6
WHERE p.page_namespace = 7 AND i_p.page_t... | {"resultsets": [{"headers": ["term_language", "labels", "descriptions", "total_items"], "rowcount": 354}]} | null |
list of all databases | null | SHOW DATABASES; | {"resultsets": [{"rowcount": 100, "headers": ["template", "count"]}]} | null |
Wikimedia Commons {{Credit line}} users | Users of the template {{Credit line}} on Wikimedia Commons.
(Yes, the username retrieved is not the original uploader, but that should be good enough for this purpose) | use commonswiki_p;
SELECT /* SLOW_OK */ DISTINCT img_user_text AS USER, COUNT(page.page_title) AS img_count
FROM image, page, templatelinks
WHERE page.page_namespace = 6
AND image.img_name = page.page_title
AND page.page_id = templatelinks.tl_from
AND templatelinks.tl_namespace = 10
... | {"resultsets": [{"rowcount": 55, "headers": ["page_id"]}]} | 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": 99999, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_comment", "log_params", "log_deleted", "log_user_text", "log_page"]}], "runningtime": "556.32"} | null |
number of revisions by year for Johann_Sebastian_Bach in enwiki | The number of revisions by year for https://en.wikipedia.org/wiki/Johann_Sebastian_Bach | SELECT
YEAR(rev_timestamp), COUNT(rev_timestamp)
FROM revision
WHERE rev_page = 9906294 # page_id for https://en.wikipedia.org/wiki/Johann_Sebastian_Bach
GROUP BY YEAR(rev_timestamp); | {"resultsets": [{"rowcount": 9, "headers": ["concat('Kategorie:', replace(page_title, '_', ' '))"]}], "runningtime": "8.42"} | null |
Non-free files used outside articles | null | USE enwiki_p;
SELECT DISTINCT p.page_id FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from
INNER JOIN (imagelinks i LEFT JOIN redirect r ON i.il_from = r.rd_from) ON p.page_title = i.il_to
WHERE c.cl_to = "All_non-free_media"
AND i.il_from_namespace != 0
AND r.rd_from IS NULL | {"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 7}, {"headers": ["page_id", "page_title", "linter_params", "totale"], "rowcount": 300}], "runningtime": "5.36"} | null |
User subpages that are in some categories (lvwiki) | null | use lvwiki_p;
select CONCAT('* [[:Kategorija:',c.cl_to,']]') as "Kategorija",
CONCAT('Lietotājs:',p.page_title) as "Lietotāja lapa"
from categorylinks c
join page p on p.page_id=c.cl_from
where p.page_namespace=2 and p.page_title like "%/%" and p.page_title not like "Edgars2007%" and p.page_title not like "%.js" | {"runningtime": "27.06", "resultsets": [{"rowcount": 9, "headers": ["CONCAT('File:', p.page_title)"]}]} | null |
Articles with "orphan" tag, that has at least one incoming link (lvwiki) | izņemt Sākumlapu
| USE lvwiki_p;
#SELECT p.page_title, COUNT(pl.pl_from) FROM page p
SELECT p.page_title
# CONCAT('* [[Special:Whatlinkshere/',p.page_title,']]') as "Saites uz rakstu",
# CONCAT(' - [[',p.page_title,']] - ') as "Raksts",
# COUNT(pl.pl_from)
FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from AND c.cl_to = "Izo... | {"runningtime": "61.19", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Categorized user pages (cswiki) | null | USE cswiki_p;
SELECT DISTINCT page_namespace, page_title
FROM categorylinks
JOIN page ON page_id = cl_from
WHERE page_namespace = 2
AND cl_to NOT LIKE "User%"
AND cl_to NOT LIKE "%Wiki%"
AND cl_to NOT LIKE "Údržba:%"
AND cl_to NOT LIKE "Monitoring:%"
ORDER BY page_title; | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}], "runningtime": "90.54"} | null |
Unclosed RfDs on huwiki | null | USE huwiki_p;
SELECT page_title AS 'title', CONCAT('[[Wikipédia:', page_title, ']]') AS 'link' FROM page
WHERE page_namespace = 4 AND page_title LIKE 'Törlésre_javasolt_lapok/%'
AND page_id NOT IN (SELECT cl_from FROM categorylinks WHERE cl_to = 'Archivált_törlési_javaslatok')
GROUP BY page_title; | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}], "runningtime": "147.14"} | null |
Προβληματικές ανακατευθύνσεις | null | SELECT concat("# [[",page_title,"]]") AS page_title, page_len
FROM elwiki_p.page
WHERE page_is_redirect=1 AND page_namespace=0 AND page_len > 250; | {"runningtime": "145.96", "resultsets": [{"rowcount": 47, "headers": ["page_title", "rev_id", "rev_timestamp", "rev_user_text", "rev_comment"]}]} | null |
Προβληματικές ανακατευθύνσεις | null | SELECT concat("# [[",page_title,"]]") AS page_title, page_len
FROM elwiki_p.page
WHERE page_is_redirect=1 AND page_namespace=0 AND page_len > 250; | {"runningtime": "95.43", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Wikidata items with sitelinks to Help pages on Commons (count) | Count of Wikidata items with sitelinks to pages in the Commons: namespace on Commons.
Published at https://www.wikidata.org/wiki/Wikidata:WikiProject_Structured_Data_for_Commons/Phase_1_progress/Links/Help | use wikidatawiki_p;
SELECT COUNT(*)
FROM wb_items_per_site
WHERE ips_site_id='commonswiki' AND ips_site_page LIKE 'Help:%'; | {"runningtime": "320.71", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Hewiki wikipedia namespace suspicious pages | null | use hewiki_p; select page_title from page where page_namespace = 4 and page_is_redirect = 0 and not page_title like "%/%/%" and not
page_title like "איך_להקים_אסם%" and not page_title like "אירועים/%" and not page_title like "אישורים_להעתקה%" and not page_title like
"בוט/%" and not page_title like "ביכורים/%" and not p... | {"runningtime": "135.80", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.