title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Voci collegate a template | null | SELECT page_title
FROM page
WHERE page_id IN
(SELECT tl_from
FROM templatelinks
WHERE tl_target_id IN
(SELECT lt_id
FROM linktarget
WHERE lt_namespace = 10
AND (
lt_title LIKE 'Calcio_Varazdin_2015'
)
)
)
ORDER BY page_title;
| {"resultsets": [{"headers": ["actor_user", "actor_name", "No_Revs", "No_Pages"], "rowcount": 133}], "runningtime": "0.41"} | itwiki_p |
WikiDaheim 2022 media out of date | null | SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(rev_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, page.page_title
FROM image, page, revision, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
and revision.rev_page = page.page_id
and revision.rev_pa... | {"resultsets": [{"headers": ["Maddeler"], "rowcount": 0}], "runningtime": "0.06"} | commonswiki_p |
WLM in Norway participants (last 5 editions) | People who have uploaded images during WLM in Norway (2016–2020). List ready for mass messaging (https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Monuments_in_Sweden/Mass_message) | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2020_in_Norway",
"Images_from_Wik... | {"resultsets": [{"headers": ["page_title"], "rowcount": 5}], "runningtime": "0.57"} | commonswiki_p |
nlwiki Books without yearcategory | null | SELECT page_title, cl_to
FROM categorylinks bc, page
WHERE
page_title NOT REGEXP 'roman$' AND
cl_to REGEXP '^Boek_|boek$|^Roman_|roman$' AND
cl_from=page_id AND page_namespace=0 AND
NOT EXISTS (SELECT * FROM categorylinks yc WHERE yc.cl_from=page_id AND
(yc.cl_to REGEXP '_uit_[0-9]+$|^[0-9]+e-ee... | {"resultsets": [{"headers": ["\u0645\u0648\u062c\u0648\u062f \u0641\u064a", "\u0627\u0644\u0635\u0641\u062d\u0629 ", "\u0639\u062f\u062f \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0627\u062a", "page_namespace"], "rowcount": 9660}], "runningtime": "10.31"} | nlwiki |
my non WikiDaheim images | check the 2 MPixel minimum requirement | #USE commonswiki_p;
SELECT /* SLOW_OK */ image.img_name
FROM image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
AND image.img_timestamp BETWEEN 20220630220000 AND 20221002220000
AND categorylinks.cl_to = "Images_by_Herzi_Pinki"
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 384}], "runningtime": "3.16"} | commonswiki |
Test | null | SELECT user_id, user_name, ipb_user
FROM user
JOIN user_groups ON user_id = ug_user
LEFT JOIN ipblocks ON user_id = ipb_user
WHERE ug_group = 'sysop'
| {"resultsets": [{"headers": ["rev_timestamp", "page_title"], "rowcount": 1000}], "runningtime": "2.72"} | enwiki_p |
Unreviewed articles with politician infoboxes | null | SELECT page_title
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN templatelinks ON tl_from = page_id
JOIN linktarget ON lt_id = tl_target_id
WHERE lt_title = 'Infobox_officeholder'
AND lt_namespace = 10
AND ptrp_reviewed = 0
AND page_is_redirect = 0
AND page_namespace = 0 | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 113}], "runningtime": "12.13"} | enwiki |
Unreviewed articles with AFD templates | null | SELECT page_title
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN templatelinks ON tl_from = page_id
JOIN linktarget ON lt_id = tl_target_id
WHERE lt_title = 'Article_for_deletion/dated'
AND lt_namespace = 10
AND ptrp_reviewed = 0
AND page_is_redirect = 0
AND page_namespace = 0 | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 44}], "runningtime": "7.49"} | enwiki |
More Basketball | null | select page_title from page where page_namespace=0
and (page_title like '%_Basketball_Champion%')
and page_is_redirect=1
| {"resultsets": [{"headers": ["pl_from"], "rowcount": 100}], "runningtime": "225.29"} | enwiki |
Unreviewed new pages by user | Count of pages in the enwiki new pages patrol queue grouped by user that created them.
Now available as a bot-updated database report: https://en.wikipedia.org/wiki/Wikipedia:New_pages_patrol/Reports | SELECT actor_name, COUNT(*)
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN revision ON rev_page = page_id
JOIN actor ON actor_id = rev_actor
WHERE ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_parent_id = 0
GROUP BY actor_name
ORDER BY COUNT(*) DESC... | {"resultsets": [{"headers": ["articles", "smallCreations", "smallCurrent", "redirectCurrent", "month"], "rowcount": 18}], "runningtime": "0.13"} | enwiki |
Belli bir kategoride olup belli bir şablonu kullanan sayfalar | Sayfaya bağlantılar (şablon) | SELECT DISTINCT CONCAT('# [[',page.page_title,']]') AS "==Maddeler==", linktarget.lt_title
FROM page
JOIN templatelinks ON templatelinks.tl_from = page.page_id
JOIN categorylinks ON categorylinks.cl_from = page.page_id
JOIN linktarget ON linktarget.lt_id = templatelinks.tl_target_id
WHERE
page.page_namespace=0 an... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2184}], "runningtime": "3.27"} | trwiki_p |
Unreviewed pages in pagetriage_page (namespace counts) | null | SELECT
page.page_namespace,
COUNT(page.page_namespace) AS `count`
FROM
pagetriage_page,
page
WHERE
ptrp_reviewed = 0
AND page_id = ptrp_page_id
AND page_is_redirect = 0
GROUP BY page.page_namespace | {"resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "user_groups"], "rowcount": 0}], "runningtime": "0.09"} | enwiki_p |
trwiki:Unexisting links in articles within the scope of Vikiproje Yaşam Ağacı | null | USE trwiki_p;
SELECT CONCAT("[[",REPLACE(pl_title,"_"," "),"]]"), COUNT(pl_title) AS counting
FROM pagelinks, page_assessments
WHERE pl_from = pa_page_id
AND pa_project_id=676
AND pl_from_namespace = 0
AND pl_namespace = 0
AND NOT EXISTS
(SELECT p1.page_title FROM page p1
WHERE p1.page_title = pl_title
AND pl_namespace... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 10205}, {"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev... | trwiki_p |
Unreviewed pages in pagetriage_page (mainspace only) | null | SELECT
page.page_title,
page.page_namespace,
pagetriage_page.*
FROM
pagetriage_page,
page
WHERE
ptrp_reviewed = 0
AND page_id = ptrp_page_id
AND page_namespace = 0
AND page_is_redirect = 0
AND ptrp_deleted = 0
ORDER BY
ptrp_created ASC
| {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 0}], "runningtime": "0.05"} | enwiki_p |
Published news on Wikinews (ko) at the latest 30 days | null | SELECT page_title
FROM page
JOIN categorylinks ON cl_from = page_id
WHERE
page_namespace = 0 AND
cl_to = '발행됨' AND
cl_timestamp >= DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -30 day)
; | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 3}], "runningtime": "50.33"} | kowikinews |
WLM India uploads | null | SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM logging_logindex
JOIN actor_logging ON log_actor=actor_id
JOIN templatelinks ON tl_from=log_page
JOIN categorylinks ON cl_from=log_page
WHERE
-- only uploads
log_type='upload'
AND log_action='upload'
--... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 5}], "runningtime": "0.06"} | commonswiki_p |
webhost 2 | null | SELECT COUNT(ipb_id) as "blocks", actor.actor_name
FROM ipblocks
JOIN comment ON (ipblocks.ipb_reason_id = comment.comment_id)
JOIN actor ON (ipblocks.ipb_by_actor = actor.actor_id)
WHERE
comment.comment_text REGEXP '[Ll]ong(-)?[Tt]erm [Aabuse]|[Ll][Tt][Aa]'
GROUP BY actor.actor_id
ORDER BY blocks DESC | {"connection_id": 64136237} | enwiki_p |
Short descriptions for improvement | null | SELECT page_title AS Title, pp_value AS SD, LENGTH(pp_value) AS SDlen
FROM page_props
JOIN page
ON page_id = pp_page
WHERE pp_propname = 'wikibase-shortdesc'
AND NOT pp_value REGEXP "[AEIOUYaeiouy]|\\d{4} ?[-–] ?\\d{4}|DJ|CDP" /* Previous checks:
AND pp_value REGEXP "([^-0-9.])\\1\\1\\1"
AND pp_value REG... | {"resultsets": [{"headers": ["rev_len", "page_title"], "rowcount": 253736}], "runningtime": "875.69"} | enwiki_p |
Protected portal image sandboxes | null | SELECT page_title FROM page
JOIN page_restrictions ON pr_page=page_id
WHERE page_namespace=828 AND page_title LIKE "Portal/images/%/sandbox"
ORDER BY page_title
| {"resultsets": [{"headers": ["user_talk"], "rowcount": 3258}], "runningtime": "4221.51"} | enwiki_p |
New accounts with archives | null | SELECT CONCAT ("User:", SUBSTRING_INDEX(pl_title, "/", 1)) as "user", user_registration
FROM pagelinks, templatelinks, linktarget, `user`
WHERE pl_from_namespace=3 AND pl_namespace=3 AND pl_title LIKE "%/Archive_1"
AND tl_from=pl_from
AND lt_id=tl_target_id AND lt_namespace=10 AND lt_title="Archives"
AND NOT EXISTS (SE... | {"resultsets": [{"headers": ["CONCAT(\"# [[\",p.page_title,\"]]\")", "page_len"], "rowcount": 1163}], "runningtime": "1.10"} | enwiki_p |
Allegedly featured articles | Articles with an FA star which were never FA candidates under their current title or a current redirect to it | SELECT page_title
FROM linktarget
JOIN templatelinks ON tl_target_id = lt_id
JOIN page Pa ON page_id = tl_from
WHERE lt_namespace = 10 AND lt_title = "Featured_article" AND tl_from_namespace = 0
AND NOT EXISTS (SELECT 1 FROM pagelinks
WHERE pl_from = (SELECT page_id FROM page WHERE page_namespace = 4 AN... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 5}], "runningtime": "0.06"} | enwiki_p |
blocks on enwiki in 2022 tying accounts to IPs | Note: Contains some false positives (e.g. ones referencing a third party's userspace LTA documentation page), but there are almost certainly more false negatives, as this doesn't count blocks that name an account or IP without linking it. | SELECT log_timestamp, log_id, actor_name, log_title, comment_text
FROM logging
JOIN actor ON log_actor = actor_id
JOIN comment ON log_comment_id = comment_id
WHERE log_timestamp > 20220101000000
AND log_type = "block"
AND log_action = "block"
AND (comment_text RLIKE "(log(ged)?.?out|loutsock)"
OR (INET6_AT... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 3}], "runningtime": "96.77"} | enwiki_p |
WLM Puglia - past participants 2022 | Wiki Loves Puglia competition participants 2016-2017-2018-2019 & not active so far in 2019 | SELECT CONCAT("# {{target| user = ", actor_name, "|site = commons.wikimedia.org }}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2021_in_Italy_-_Apulia",
... | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "ratio_revocation", "nb_editions"], "rowcount": 5}], "runningtime": "15.79"} | commonswiki_p |
নামস্থান ভিত্তিক পাতা সংখ্যা | null | SELECT
page_namespace,
MAX(notredir),
MAX(redir)
FROM (
SELECT page.page_namespace,
IF( page_is_redirect, COUNT(page.page_namespace), 0 ) AS redir,
IF( page_is_redirect, 0, COUNT(page.page_namespace)) AS notredir
FROM page
GROUP BY page_is_redirect, page_namespace
ORDER BY page_namespace... | {"resultsets": [{"headers": ["prefix", "edit_count", "actor_count", "pages_count", "avg_edits_2Y", "avg_editors_2Y"], "rowcount": 995}], "runningtime": "78.76"} | bnwiktionary |
Tewiki: All Templates with Red links | null | select concat("[[",page_title,"]]"),count(page_title) redlinksCount from pagelinks pl,page
#join page on page_id=pl_from
where page_id = pl_from
-- and page_id in (select pp_page from page_props where pp_propname ="disambiguation")
and pl_namespace = 0
and page_namespace = 10
and not exists ... | {"resultsets": [{"headers": ["CONCAT('* [[User:', REPLACE (user_name,'_',' '), ']]')", "d"], "rowcount": 12}], "runningtime": "0.09"} | tewiki |
Tewiki: All articles with Red links | null | select page_title,count(page_title) redlinksCount from pagelinks pl,page
#join page on page_id=pl_from
where page_id = pl_from
-- and page_id in (select pp_page from page_props where pp_propname ="disambiguation")
and pl_namespace = 0
and page_namespace = 0
and not exists (select page_title
... | {"resultsets": [{"headers": ["up_value", "COUNT(DISTINCT up_user)"], "rowcount": 2}], "runningtime": "0.67"} | tewiki |
select all protects | null | select * from page_restrictions where pr_type = 'edit'; | {"resultsets": [{"headers": ["prefix", "page_namespace", "edit_count", "actor_count", "pages_count"], "rowcount": 2}], "runningtime": "35.51"} | zhwikiquote |
logging_compat | null | select * from logging_compat where log_type = "protect" order by log_id desc limit 20; | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 81}], "runningtime": "2.25"} | zhwikiquote |
Sayfaya bağlantılar (şablon) | Sayfaya bağlantılar (şablon) | use trwiki_p;
select CONCAT('# [[',page_title,']]') AS "==Maddeler=="
from page, templatelinks
where
page_namespace=0 and -- articles only
# page_is_redirect=0 and -- no redirects
tl_from = page_id and
tl_namespace=10 and
tl_title like ('Queen')
| {"resultsets": [{"headers": ["page_title"], "rowcount": 29}], "runningtime": "1.81"} | trwiki_p |
page count by namespace in wikidata (no redirects) | null | SELECT page_namespace, count(page_id)
FROM page
WHERE page_is_redirect = 0 # no redirects
GROUP BY page_namespace ;
# content namespaces seem to be 0 main 146 lexeme 640 entityschema | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 12}, {"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}], "runningtime": "0.10"} | wikidatawiki_p |
Bot that's not | Recent edits with summary beginning "Bot: " made by non-bot accounts | SELECT actor_name AS "User", COUNT(*) AS "Edits", MIN(rc_timestamp) AS Earliest, MAX(rc_timestamp) AS Latest, MIN(comment_text) AS "Example edit summary"
FROM recentchanges, `comment`, actor
WHERE comment_id = rc_comment_id AND comment_text LIKE "Bot: %" AND rc_bot = 0
AND actor_id = rc_actor
GROUP BY actor_name | {"resultsets": [{"headers": ["title"], "rowcount": 10}], "runningtime": "0.05"} | enwiki_p |
Princess accounts | Find thanks | select user_name, user_registration from user where user_registration > "20210801" and user_name like "%Princess" and user_name not like "% Princess"
group by user_registration
limit 500 | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 0}], "runningtime": "0.06"} | enwiki |
test3 | null | SELECT user_name, user_registration FROM user
WHERE user_name LIKE 'Miggelee%'
ORDER BY user_registration;
| {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 20}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 8}], "runningtime": "0.16"} | enwiki |
A5 | Deletions of pages in the User: namespace containing "A5" (as a distinct word) in the log comment. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
log_title AS pagename,
comment_text
FROM logging
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_namespace = 0
AND comment_text RLIKE '\\bA5\\b'
ORDER BY log_id DESC
L... | {"resultsets": [{"headers": ["pl_title"], "rowcount": 1}], "runningtime": "0.06"} | enwiki |
বছর অনুসারে বাংলা উইকিপিডিয়ায় নিবন্ধ তৈরি | null | USE bnwiki_p;
select substr(rev_timestamp,1,4) as Year, count(substr(rev_timestamp,1,4)) as Main_space_new_pages
from page,revision
where page_id=rev_page
and page_namespace=0
and rev_parent_id=0
and page_is_redirect=0
group by substr(rev_timestamp,1,4)
order by substr(rev_timestamp,1,4) | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 3063}], "runningtime": "3.15"} | bnwiki_p |
বছর অনুসারে বাংলা উইকিপিডিয়ায় নিবন্ধ তৈরি | null | USE bnwiki_p;
select substr(rev_timestamp,1,4) as Year, count(substr(rev_timestamp,1,4)) as Main_space_new_pages
from page,revision
where page_id=rev_page
and page_namespace=0
and rev_parent_id=0
and page_is_redirect=0
group by substr(rev_timestamp,1,4)
order by substr(rev_timestamp,1,4) | {"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.97"} | bnwiki_p |
Top 100 utenti più gentili | Query che identifica gli utenti che negli ultimi due anni hanno compiuto più azioni di ringraziamento su it.wikipedia.org. | SELECT
user_name AS nome_utente,
COUNT(log_id) AS ringraziamenti_fatti
FROM logging log
JOIN actor AS act
ON log.log_actor = act.actor_id
JOIN user us
ON act.actor_user = us.user_id
WHERE log_type='thanks' AND log_action='thank'
AND log.log_timestamp > ( NOW() - INTERVAL 24 MONTH )
GROUP BY user_name
ORDER B... | {"resultsets": [{"headers": ["page_title"], "rowcount": 153}], "runningtime": "0.20"} | itwiki_p |
Top 100 verificatori di itwiki | Query per selezionare gli utenti che più di tutti hanno effettuato verifiche (patrol) su Wikipedia in italiano negli ultimi 24 mesi. | SELECT
COUNT(log_id) AS verifiche,
user_name AS nome_utente,
user_editcount AS edit_utente,
GROUP_CONCAT(DISTINCT ug_group SEPARATOR ", ") AS gruppi_dell_utente
FROM logging log
JOIN actor AS act
ON log.log_actor = act.actor_id
JOIN user us
ON act.actor_user = us.user_id
JOIN user_groups ug
ON us.u... | {"resultsets": [{"headers": ["page_title"], "rowcount": 152}], "runningtime": "0.36"} | itwiki_p |
Modifiche in ns0 non verificate in un dato giorno | Tutte le modifiche fatte in ns0 che non sono state fatte da bot e non risultano verificate in un dato giorno.
Per selezionare il giorno desiderato inserire LIKE 'YYYYMMDD%' a fianco a rc_timestamp dove YYYY è l'anno in 4 cifre, MM è il mese in 2 cifre e DD è il giorno in 2 cifre.
Se si vuole cercare le azioni fatte nel... | SELECT * FROM recentchanges
WHERE rc_namespace =0 AND rc_bot=0 AND rc_patrolled =0 AND rc_deleted=0
AND rc_timestamp LIKE '20221226%'
| {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 99}], "runningtime": "4.60"} | itwiki_p |
قوالب الشرح اليتيمة | null | SELECT
p1.page_namespace,p1.page_title
FROM page AS p1
WHERE
p1.page_title LIKE '%/شرح'
and p1.page_is_redirect = 0
and p1.page_namespace in (10)
AND NOT EXISTS (SELECT 1
FROM page AS p2
WHERE p2.page_namespace = 10
AND p2.page_title = ... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "100.13"} | arwiki_p |
Top 10 NPP article reviewers (all-time) for hall of fame | null | SELECT actor_name AS `reviewer`,
COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects`,
COUNT(DISTINCT(logtemp.log_page)) AS `Total`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging... | {"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 826}], "runningtime": "6.65"} | enwiki |
Unreviewed articles with speciesboxes | null | SELECT DISTINCT page_title
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN templatelinks ON tl_from = page_id
JOIN linktarget ON lt_id = tl_target_id
WHERE (lt_title = 'Speciesbox' OR lt_title = 'Taxobox' OR lt_title = 'Taxonbar')
AND lt_namespace = 10
AND ptrp_reviewed = 0
AND page_is_redirect =... | {"resultsets": [{"headers": ["rc_cur_id", "rc_title", "rc_patrolled"], "rowcount": 1231}], "runningtime": "1.18"} | enwiki |
Sugerowane wstawienie linków: wszystkie edycje vs wycofane | Zapytanie zlicza wszystkie edycje wykonane w 2022 roku, które zostały oznaczone znacznikiem "Zasugerowano edycję: dodanie linków" a także te, które dodatkowo oznaczono jako "Wycofane", aby dać ogląd na to, jak duża część sugestii jest błędnie akceptowana przez nowicjuszy. | set @newcomer_task_add_link := 143; -- Id znacznika "Zasugerowano edycję: dodanie linków"
set @mw_reverted := 126; -- Id znacznika "Wycofane"
-- Uwzględniane są wszystkie edycje wykonane w 2022 roku (UTC+1)
set @starttime := '20211231230000';
set @endtime := '20221231230000';
SELECT (
SELECT COUNT(*) FROM revision
... | {"resultsets": [{"headers": ["wbpt_id", "wbpt_property_id", "wbpt_term_in_lang_id"], "rowcount": 10}], "runningtime": "0.06"} | plwiki_p |
Top NPP reviewers (articles only) | null | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Article Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp ... | {"resultsets": [{"headers": ["lt_title", "COUNT(*)"], "rowcount": 0}], "runningtime": "1.03"} | enwiki_p |
Top NPP reviewers (redirects only) | null | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp BET... | {"resultsets": [{"headers": ["lt_title", "COUNT(*)"], "rowcount": 0}], "runningtime": "0.78"} | enwiki_p |
test comment hashes b43 | null | SELECT *
FROM comment_revision AS comment
WHERE
TRUE
AND comment_text RLIKE '^(?:\\[\\[WP:AES\\|←\\]\\]Created page with \' *(?:{{(?:[Uu]ser(?: ?page|talkpage)|[Tt]alk ?(?:page|header))}}| *|Hello World!) *\'|(?:my )?(?:talk ?|user ?|discussion)page|[Tt]his is my [Uu]ser ?[Pp]age|cleaning talk ?page|don\'?t like it(?: ... | {"resultsets": [{"headers": ["User", "Edits"], "rowcount": 57}], "runningtime": "0.61"} | enwiki |
Inactive IP talkpages of inactive IPs with Lint errors | null | select CONCAT('[[User talk:', page_title, ']]') as 'IP talkpage' -- format as wikilink
from linter
join page on page_id = linter_page -- link with page table
join actor on actor_user is null and actor_name = page_title -- IP with User talk page
join revision on rev_id = page_latest and rev_timestamp < '20180110' -- lat... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 14}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 6}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "0.42"} | enwiki |
nlwiki Places in Indonesia by desacode | null | SELECT page_title, pp_value AS 'item', REPLACE(cl_sortkey_prefix,' ','') AS 'desacode'
FROM categorylinks, page LEFT JOIN page_props ON page_id=pp_page AND pp_propname='wikibase_item'
WHERE cl_to='Wikipedia:Indonesische_plaats_naar_code' AND cl_from=page_id AND page_namespace=0 | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 15}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 9}, {"headers": ["rc_namespace", "rc_... | nlwiki |
Climate-change content on enwiki | Get all climate-change-related articles from English Wikipedia based on tagging by WikiProject Climate Change (https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Climate_change) | SELECT
pa_page_id AS page_id,
page_title AS page_title,
pa_class AS quality_class,
pa_importance AS importance_class
FROM page_assessments
INNER JOIN page_assessments_projects
ON (pap_project_id = pa_project_id
AND pap_project_title in ('Disability','Politics','Agriculture','Medicine','Education','Water... | {"resultsets": [{"headers": ["Username", "cnt"], "rowcount": 79}], "runningtime": "169.45"} | enwiki_p |
Cross-namespace redirects | null | SELECT p.page_id, p.page_namespace, CONCAT ("[[",p.page_title,"]]") AS title FROM page p
JOIN redirect r ON r.rd_from = p.page_id
WHERE p.page_namespace <> r.rd_namespace
AND p.page_id NOT IN (36422437, 28376039, 5518477, 5518482, 26880825, # Five redirects to other namespaces which have been kept at [[WP:RFD]]
... | {"resultsets": [{"headers": ["substr(log_timestamp,1,8)", "count(log_action)"], "rowcount": 347}], "runningtime": "0.37"} | viwiki_p |
Articles, which don't have P31/P279 at Wikidata (arwiki) | null | SELECT p.page_title
FROM arwiki_p.page p, page_props, wikidatawiki_p.page wdp
LEFT JOIN wikidatawiki_p.pagelinks wdpl ON wdpl.pl_from = wdp.page_id AND
(wdpl.pl_title = 'P31' or wdpl.pl_title = 'P279') AND wdpl.pl_namespace = 120
WHERE p.page_namespace = 0
AND pp_page = p.page_id AND pp_propname = 'wikibase_item... | {"resultsets": [{"headers": ["page_title"], "rowcount": 283}], "runningtime": "0.31"} | wikidatawiki_p |
User names (b43) | null | SELECT DISTINCT actor_name, user_registration
FROM actor_revision AS actor
INNER JOIN user ON actor.actor_user = user.user_id
WHERE
TRUE
AND user_registration >= '20200521020016'
AND user_registration <= '20200521060016'
-- AND actor_name RLIKE '^(?:B(?:r(?:e(?:ati|ta|n)?|at?|io?|o|u)|e(?:r(?:i(?:nl)?)?|n|t)|a(?:re?|tt... | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 38}], "runningtime": "4.73"} | enwiki |
Redlinks beginning with... | null | SET @pattern="College_Park%";
SELECT pl_title, COUNT(*)
FROM pagelinks
WHERE pl_namespace=0 AND pl_title LIKE @pattern
AND NOT EXISTS (SELECT 1 FROM page WHERE page_namespace=0 AND page_title=pl_title)
GROUP BY pl_title
ORDER BY pl_title | {"resultsets": [{"headers": ["pagina utente", "\u00e8 una sottopagina?", "categorie"], "rowcount": 54}], "runningtime": "159.02"} | enwiki_p |
un-protected templates on eswiki with many transclusions | null | /* Based on https://quarry.wmcloud.org/query/68671. */
WITH unprotected_templates AS (
SELECT
lt_id,
lt_title
FROM linktarget
WHERE lt_namespace = 10
)
SELECT
lt_title,
COUNT(tl_from)
FROM templatelinks tl
INNER JOIN page
ON (page_restrictions.pr_page = page.page_id)
INNER JOIN unprotected_templates
O... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 261}], "runningtime": "126.43"} | eswiki_p |
Commons category circles | Find direct commons category circles. | SELECT /* SLOW_OK */ category.cat_title, page.page_namespace, page.page_title
FROM page, category, categorylinks
WHERE page.page_namespace = 14
AND page.page_id=categorylinks.cl_from
AND categorylinks.cl_to = page.page_title
AND page.page_title = category.cat_title
; | {"resultsets": [{"headers": ["page_title"], "rowcount": 500}], "runningtime": "0.54"} | commonswiki |
Editors with more than 5 edits in last 30 days (arwiki) | Results order by there edits count in the same period. | USE arwiki_p;
select actor_name, count(rev_actor)
from revision
JOIN actor ON actor_id = rev_actor
where rev_timestamp > DATE_SUB(NOW(), INTERVAL 4 MONTH)
AND actor_name IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'editor')
AND actor_name NOT IN (SELECT user_name... | {"resultsets": [{"headers": ["page_title"], "rowcount": 6618}], "runningtime": "6.53"} | arwiki_p |
Incubator wikis, first rev to last rev, (based on rev table), September 2022 | null | WITH
base_table AS (
SELECT DISTINCT
rev_id,
rev_actor,
rev_timestamp,
rev_len,
rev_parent_id,
page_namespace,
page_id,
actor_id,
REGEXP_SUBSTR(page_title, 'W[a-z]/[a-z]+') AS prefix,
rc_new_len - rc_old_len AS byte_diff,
... | {"resultsets": [{"headers": ["base_id", "id", "page_title"], "rowcount": 6930}], "runningtime": "6.02"} | incubatorwiki |
WikiDaheim 2022 media out of date | null | SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(rev_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, page.page_title
FROM image, page, revision, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
and revision.rev_page = page.page_id
and revision.rev_pa... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 22}], "runningtime": "0.08"} | commonswiki_p |
Admins w/ <100 edits since 2018 (incl. deleted) | Admins with fewer than 100 edits, live or deleted, since 1 February 2018. | SELECT user_name, SUM(rev_ids) AS `live`, SUM(ar_ids) AS `deleted`, SUM(rev_ids + ar_ids) AS `total`
FROM
(
SELECT user_name, COUNT(rev_id) AS `rev_ids`, 0 AS `ar_ids`
FROM user
JOIN user_groups ON ug_user = user_id
JOIN actor_revision ON actor_user = user_id
JOIN revision_userindex ON rev_actor = actor_id
WHERE ug_gro... | {"resultsets": [{"headers": ["Template"], "rowcount": 50}], "runningtime": "0.09"} | enwiki_p |
Indiana Memory upload metrics breakdown by institution | null | SELECT REPLACE(REPLACE(REPLACE(cl_to, "_", " "), "Media contributed by the ", ""), "Media contributed by ", "") AS "Institution",
FORMAT(COUNT(img_name), 'N0') AS "File count",
FORMAT(COUNT(DISTINCT REGEXP_REPLACE(REGEXP_REPLACE(img_name, '^.*DPLA_-_', ''), '[\.|_].*$', '')), 'N0') AS "Item count",
ROUND(SUM(img_... | {"resultsets": [{"headers": ["URL"], "rowcount": 0}], "runningtime": "58.98"} | commonswiki_p |
Tidy font link bug on User namespace | null | select /* CONCAT('*[[Wikipedia:', page_title, ']]') as page_title */
/* , count(*) as page_count*/
CONCAT('*[//en.wikipedia.org/w/index.php?title=User:', page_title, '&action=edit&lintedit=true User:', page_title, ']') as page_title
from linter
join page on page.page_id = linter.linter_page
join revision on rev_id = p... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect"], "rowcount": 25}], "runningtime": "0.08"} | enwiki |
nlwiki Page titles with x possibly as multiplication sign | null | SELECT page_namespace AS ns, page_title, page_len AS len, GROUP_CONCAT(cl_to SEPARATOR ' | ') AS cats
FROM page LEFT JOIN categorylinks ON cl_from=page_id
WHERE page_namespace IN (0,4,6,8,10,12,14,100,828) AND page_is_redirect=0 AND page_title REGEXP '[0-9]_*x[^x]|[^AEaeiknorux]x_*[0-9]'
GROUP BY page_id | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 92}], "runningtime": "0.39"} | nlwiki |
Bikrookanpurgangster sock search | Query to look for Bikrookanpurgangster socks who tend to use "Published" as an edit summary | select *
from revision r
join comment c on r.rev_comment_id = c.comment_id
where r.rev_timestamp >= '20230102000000'
AND c.comment_text = 'Published' | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 100}], "runningtime": "30.50"} | enwiki_p |
Get all page triage details of a page | null | select * from page where page_id=39238;
select * from pagetriage_page join page on page_id=ptrp_page_id where ptrp_page_id=39238;
select ptrpt_page_id, ptrt_tag_name, ptrpt_value from pagetriage_page_tags join pagetriage_tags on ptrpt_tag_id = ptrt_tag_id
where ptrpt_page_id=39238;
| {"resultsets": [{"headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i", "tag_s"], "rowcount": 1000}], "runningtime": "40.67"} | enwiki |
Redirects_from_case_citations | Pages pointed by a redirect not in Category:Redirects_from_case_citations | #pages pointed by a redirect not in Category:Redirects_from_case_citations
SELECT
pl_title
FROM
pagelinks
LEFT JOIN
page ON page_id = pl_from
WHERE
page_title REGEXP '^[0-9]+_[^_]+_[0-9]+$'
AND
page_namespace = 0
AND
page_is_redirect = 1
AND page_id NOT IN (SELECT cl_from FROM ca... | {"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 20}], "runningtime": "11.25"} | enwikisource_p |
Unreviewed new pages by user | Count of pages in the enwiki new pages patrol queue grouped by user that created them. | SELECT actor_name, COUNT(*)
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN revision ON rev_page = page_id
JOIN actor ON actor_id = rev_actor
WHERE ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 1
AND rev_parent_id = 0
GROUP BY actor_name
ORDER BY COUNT(*) DESC... | {"connection_id": 134804440} | enwiki |
Sdrqaz's deletion log, grouped by type | null | SELECT SUBSTR(comment_text, 1, 12), COUNT(*)
FROM logging_userindex
JOIN comment ON comment_id = log_comment_id
WHERE log_actor = (
SELECT actor_id
FROM actor
JOIN user ON actor_user = user_id
WHERE user_name = 'Sdrqaz'
)
AND log_type = 'delete'
AND log_action = 'delete'
GROUP BY SUBSTR(comment_text, 1, 12)... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 6}], "runningtime": "0.68"} | enwiki |
Users with the most unpatrolled created articles | I copied this code from Joe Roe with plans to make changes to it later down the road but if you found this and want to see his great work check it out here https://quarry.wmcloud.org/query/65640 | SELECT actor_name, COUNT(*)
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN revision ON rev_page = page_id
JOIN actor ON actor_id = rev_actor
WHERE ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_parent_id = 0
GROUP BY actor_name
ORDER BY COUNT(*) DESC... | {"resultsets": [{"headers": ["Name", "img_width", "img_height"], "rowcount": 0}], "runningtime": "0.04"} | enwiki |
Blank pages last edited by MalnadachBot | null | /*
Due to a glitch in AWB, MalnadachBot sometimes blanks
The glitch corrects by itself after a short time.
This query can be used to detect such pages
*/
select CONCAT('[[User talk:', page_title, ']]') as user_talk -- format as wikilink so that it can be read by AWB
from page
join revision r1 on rev_id = page_latest a... | {"resultsets": [{"headers": ["Talk page"], "rowcount": 1}], "runningtime": "0.05"} | enwiki |
frwiki .js/.css edits | null | SELECT actor_name AS user_name, COUNT(rev_id) AS num_edits
FROM revision, actor, page, user_groups
# Page test
WHERE page_id = rev_page
AND ( page_content_model = 'javascript' OR page_content_model = 'css' )
AND ( page_namespace = 2 OR page_namespace = 8 )
# User test
AND ug_user = actor_user
AND ug_group = 'interface-... | {"resultsets": [{"headers": ["mainspace_title"], "rowcount": 430521}], "runningtime": "364.16"} | frwiki |
Список користувачів за кількістю започаткованих статей | null | USE ukwiki_p;
SELECT @rownum := @rownum + 1 AS rank,
actor_name,
created,
percents
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|]]') as actor_name,
COUNT(1) AS created,
CONCAT(
ROUND(
COUNT(1) /
(SELECT COUNT(1)
FROM page
... | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 0}], "runningtime": "0.04"} | ukwiki_p |
Files on bn.wiki NOT in spec categories (no license) | null | #USE bnwiki_p;
SELECT
CONCAT("# [[:File:", img_name, "]]") AS file, actor_name
###FROM templatelinks
###JOIN page ON tl_from = page_id
###JOIN image ON img_name = page_title AND page_namespace = 6
###JOIN actor_image ON img_actor = actor_id
FROM image
JOIN page
ON page_namespace=6
AND page_title = img_name
AND pag... | {"resultsets": [{"headers": ["page_id"], "rowcount": 0}], "runningtime": "0.05"} | bnwiki_p |
Files on pa.wiki NOT in spec categories (no license) | null | #USE pawiki_p;
SELECT
CONCAT("# [[:File:", img_name, "]]") AS file, actor_name
###FROM templatelinks
###JOIN page ON tl_from = page_id
###JOIN image ON img_name = page_title AND page_namespace = 6
###JOIN actor_image ON img_actor = actor_id
FROM image
JOIN page
ON page_namespace=6
AND page_title = img_name
AND pag... | {"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}], "runningtime": "1.67"} | pawiki_p |
Blocks of admins on enwiki | null | SELECT user_name, log_id, comment_text, log_params
FROM logging
LEFT JOIN user ON user_name = REPLACE(log_title, "_", " ")
INNER JOIN user_groups ON ug_user = user_id
INNER JOIN actor ON actor_user = user_id
INNER JOIN comment ON comment_id = log_comment_id
WHERE log_type = "block"
AND log_action = "block... | {"resultsets": [{"headers": ["concat('{{\u0648\u064a\u0643\u064a\u0628\u064a\u062f\u064a\u0627:\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0648\u064a\u0643\u064a/\u0642\u0627\u0644\u0628 \u062d\u062c\u0645 \u0627\u0644\u0645\u0642\u0627\u0644\u06292|\u0627\u0633\u0645={{\u0648\u0625\u0648|',page_title,'}}|\u0647\u062f... | enwiki_p |
WLM-UA participants 2012-2022 | null | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2012_in_Ukraine",
"Images_from... | {"resultsets": [{"headers": ["ll_from", "ll_lang", "ll_title", "page_title"], "rowcount": 10}], "runningtime": "0.06"} | commonswiki |
Dobre Artykuły z martwymi linkami | null | SET @cat = 'Dobre_Artykuły';
SET @missing_links = 'Niezweryfikowane_martwe_linki';
SELECT article.page_title AS "Dobre Artykuły z martwymi linkami" FROM page article
JOIN page talk ON article.page_namespace + 1 = talk.page_namespace AND article.page_title = talk.page_title
JOIN categorylinks c1 ON c1.cl_from = artic... | {"resultsets": [{"headers": ["actor_name", "page_title", "COUNT(*)"], "rowcount": 100}], "runningtime": "3.14"} | plwiki_p |
Listy na Medal z martwymi linkami | null | SET @cat = 'Listy_na_Medal';
SET @missing_links = 'Niezweryfikowane_martwe_linki';
SELECT article.page_title AS "Listy na Medal z martwymi linkami" FROM page article
JOIN page talk ON article.page_namespace + 1 = talk.page_namespace AND article.page_title = talk.page_title
JOIN categorylinks c1 ON c1.cl_from = artic... | {"resultsets": [{"headers": ["p"], "rowcount": 146}], "runningtime": "1283.21"} | plwiki_p |
Artykuły na Medal z martwymi linkami | null | SET @cat = 'Artykuły_na_Medal';
SET @missing_links = 'Niezweryfikowane_martwe_linki';
SELECT article.page_title AS "Artykuły na Medal z martwymi linkami" FROM page article
JOIN page talk ON article.page_namespace + 1 = talk.page_namespace AND article.page_title = talk.page_title
JOIN categorylinks c1 ON c1.cl_from =... | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 2}], "runningtime": "0.06"} | plwiki_p |
পূর্বাবস্থায় ফেরত | null | SELECT COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE actor_name = 'Yahya'
AND ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-undo'); | {"resultsets": [{"headers": ["cl_to"], "rowcount": 8970}], "runningtime": "137.99"} | wikidatawiki_p |
Files with redlinked creator templates | null | SELECT CONCAT("Creator:", lt_title), COUNT(*) AS files
FROM page p0
JOIN templatelinks ON tl_from = p0.page_id
JOIN linktarget ON lt_id = tl_target_id
LEFT JOIN page p1 ON lt_title = p1.page_title AND lt_namespace = p1.page_namespace
WHERE
lt_namespace = 100
AND p0.page_namespace = 6
AND p1.page_id IS NULL
GRO... | {"resultsets": [{"headers": ["suffix", "count"], "rowcount": 6720}], "runningtime": "6.19"} | commonswiki_p |
Unreviewed new pages by user (top 20) | Count of pages in the enwiki new pages patrol queue grouped by user that created them. | SELECT actor_name as `creator`, COUNT(*) as `#`, page_title as `Example page`
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN revision ON rev_page = page_id
JOIN actor ON actor_id = rev_actor
WHERE ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_parent_id ... | {"resultsets": [{"headers": ["reviews", "rc_title", "accepted", "accept %", "declined", "decline %"], "rowcount": 1405}], "runningtime": "33.26"} | enwiki |
IP edits in 1mo - reverted, total | Reverted and total # of IP edits in a month | /*IP edits in a month: reverted and total*/
/*ct_tag_id in (58,59) = revert and manual revert*/
SET @from = "20230420";
SET @to = DATE_FORMAT(@from + INTERVAL 1 MONTH, "%Y%m%d");
/*SELECT @from, @to;*/
SELECT count(DISTINCT rev_id) FROM revision
JOIN change_tag ON rev_id = ct_rev_id
JOIN actor ON actor_id = rev_ac... | {"resultsets": [{"headers": ["source_title", "target_title"], "rowcount": 422}], "runningtime": "0.59"} | hrwiki_p |
Olympian biographies by Sander.v.Ginkel | This query produces a list of small Olympian biographies that are created and primarily contain content by Sander.v.Ginkel. This is currently defined as articles with a page length under 4000 with Sander.v.Ginkel contributing more than half the content, but can be adjusted. In addition, redirects, lists and disambiguat... | WITH creations as (SELECT page_title, page_id, rev_timestamp, page_len, rev_len
FROM revision_userindex
JOIN page ON page_id = rev_page
WHERE rev_parent_id = 0
AND page_is_redirect = 0
AND rev_actor = 204363
AND page_namespace = 0)
SELECT DISTINCT contributions.page_title, rev_timestamp, contributions.page_len... | {"resultsets": [{"headers": ["page_title"], "rowcount": 117}], "runningtime": "40.62"} | enwiki_p |
BlackJack cricketer stubs external links | null | SELECT DISTINCT page_title, el_to
FROM revision
JOIN actor_revision ON actor_id = rev_actor
JOIN page ON page_id = rev_page
JOIN categorylinks ON cl_from = page_id
JOIN externallinks on el_from = page_id
WHERE rev_parent_id = 0
AND actor_name = "BlackJack"
AND page_namespace = 0
AND rev_len > 150
AND page_len <... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 19}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 8}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 9}], "runningtime": "0.58"} | enwiki_p |
BeautyQueen accounts | Find thanks | select user_name, user_registration, TIME_FORMAT(user_registration, "%H%i") as time, user_editcount from user where user_registration > "20230101" and (user_name like "%BeautyQueen" or user_name like "%Waltz" or user_name like "%Glamour")
order by user_registration desc
limit 250 | {"resultsets": [{"headers": ["Table", "Non_unique", "Key_name", "Seq_in_index", "Column_name", "Collation", "Cardinality", "Sub_part", "Packed", "Null", "Index_type", "Comment", "Index_comment"], "rowcount": 0}], "runningtime": "0.05"} | enwiki |
Article creators by volume 2018 by month | Most prolific article creators from September 2021 to August 2022
Counts only non-redirect pages currently in the main namespace, with their first edit after September 2021. In particular, it doesn't count redirects or drafts created earlier that became mainspace articles since August 1, nor articles that have since ... | SELECT
actor_name as "Creator",
COUNT(*) AS "Year total",
SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 01 THEN 1 ELSE 0 END) AS "Jan",
SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 02 THEN 1 ELSE 0 END) AS "Feb",
SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 03 THEN 1 ELSE 0 END) AS "Mar",
SUM(CASE WHEN SUBSTR... | {"resultsets": [{"headers": ["pl_title"], "rowcount": 10}], "runningtime": "28.28"} | enwiki_p |
Top New NPP reviewers | null | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Article Reviews`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_t... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.63"} | enwiki_p |
Redlinks ending | My redlinks | SELECT pl_title, COUNT(*)
FROM pagelinks
WHERE pl_namespace=0 AND pl_title LIKE "%TVB)"
AND NOT EXISTS (SELECT 1 FROM page WHERE page_namespace=0 AND page_title=pl_title)
GROUP BY pl_title
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"], "rowcount": 100}], "runningtime": "0.14"} | enwiki_p |
পাতা অপসারণের পরিসংখ্যান | null | SELECT
DATE_FORMAT(log_timestamp, "%Y-%m-%d") AS day,
COUNT(log_id) AS deletions
FROM logging_userindex
WHERE log_type = 'delete'
AND log_action = 'delete'
GROUP BY day; | {"resultsets": [{"headers": ["page_namespace", "page_title", "page_touched"], "rowcount": 1000}], "runningtime": "3.54"} | bnwiki_p |
WikiDaheim 2022 media by date | null | SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(img_timestamp, INTERVAL 2 Hour),'%Y-%m-%d') AS date, COUNT(image.img_name) as images
FROM image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
AND categorylinks.cl_to = "Media_from_WikiDaheim_2022_in_A... | {"resultsets": [{"headers": ["comment_text"], "rowcount": 100}], "runningtime": "0.21"} | commonswiki_p |
WikiDaheim Constraints 2022 | check the 2 MPixel minimum requirement | #USE commonswiki_p;
SELECT /* SLOW_OK */ image.img_name, image.img_height, image.img_width, (image.img_height * image.img_width) as size
FROM image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
AND categorylinks.cl_to = "Media_from_WikiDahei... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8368}], "runningtime": "16.90"} | commonswiki |
Links to non-existing portals in cswiki | null | SELECT pages.page_title, pl_title, pages.page_latest FROM pagelinks
LEFT JOIN page AS portals ON portals.page_title = pl_title AND portals.page_namespace = pl_namespace
JOIN page AS pages ON pages.page_id = pl_from
WHERE pl_namespace = 100 AND portals.page_title IS NULL AND pl_from_namespace = 0
ORDER BY pages.page_lat... | {"resultsets": [{"headers": ["CONCAT(\"* [[\",article.page_title, \"]]\")", "talk_page_id"], "rowcount": 100}], "runningtime": "34.77"} | cswiki_p |
comPreview | null | # DESCRIBE page;
select substring(img_name, 4,3) as db, count(*),max(img_size), avg(img_size), sum(img_size) from image where img_actor = 26878372 and img_name LIKE "NLC%" group by db;
select "TOTAL" as db, count(*), max(img_size), avg(img_size), sum(img_size) from image where img_actor = 26878372 and img_name LIKE "NL... | {"resultsets": [{"headers": ["page_title", "count(c.cl_to)", "rev_timestamp", "URL"], "rowcount": 1}], "runningtime": "7.11"} | commonswiki |
NLC No Category | null | SELECT image.*
FROM image
LEFT JOIN categorylinks ON image.img_name = categorylinks.cl_sortkey
WHERE image.img_actor = 26878372 AND categorylinks.cl_to IS NULL;
#DESCRIBE revision;
# select SUM(img_size) from image
# where img_actor = 26878372;
#select actor_id from actor JOIN user on actor.actor_user = user.user_id... | {"resultsets": [{"headers": ["page_id", "pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 1000}], "runningtime": "0.94"} | commonswiki_p |
Delete vs upload stats on commons | See how deletions and uploads have changed over time on commons | use commonswiki_p;
select log_type, substring(log_timestamp,1,4), count(*) from logging where
((log_type = 'delete' and log_action = 'delete' )OR ( log_type="upload" and log_action= "upload") ) and log_namespace =6
group by 2,1 limit 40; | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 84}], "runningtime": "4.79"} | commonswiki_p |
Redlink start | null | SELECT pl_title, COUNT(*)
FROM pagelinks
WHERE pl_namespace=0 AND pl_title LIKE "Marissa_Jim%"
AND NOT EXISTS (SELECT 1 FROM page WHERE page_namespace=0 AND page_title=pl_title)
GROUP BY pl_title
ORDER BY pl_title | {"resultsets": [{"headers": ["CONCAT(\"File:\", page_title)", "GROUP_CONCAT(tl_target_id ORDER BY tl_target_id SEPARATOR ', ')"], "rowcount": 97155}], "runningtime": "100.40"} | enwiki_p |
Rev | null | SELECT actor_name AS `reviewer`,
COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects`,
COUNT(DISTINCT(logtemp.log_page)) AS `Total`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging... | {"resultsets": [{"headers": ["page_title", "actor_name"], "rowcount": 0}], "runningtime": "0.05"} | enwiki |
রোলব্যাকের পরিসংখ্যান | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-rollback')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["rev_timestamp", "actor_name", "page_title", "comment_text", "page_id"], "rowcount": 0}], "runningtime": "0.05"} | bnwiki |
WMUA photo contests participants 2012-2021 | null | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2012_in_Ukraine",
"Images_from... | {"resultsets": [{"headers": ["actor_user", "actor_name", "page_id", "page_title", "count(rev_id)"], "rowcount": 163}], "runningtime": "0.44"} | commonswiki |
Count fixes in Wikipedia:Correct typos in one click | null | SELECT comment_text
FROM revision
LEFT JOIN comment on rev_comment_id=comment_id
WHERE rev_page in (411894,411901,411902,411903,411905,411906,411907,411908,411909,411910,411911,411912,411913,411914,411915,411916,411917,411918,411919,411920)
AND comment_text LIKE "% was dismissed"; | {"resultsets": [{"headers": ["actor_id", "actor_user", "user_id", "user_name", "user_registration", "revision_actor"], "rowcount": 100}], "runningtime": "0.16"} | enwikibooks_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.