title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
user contributions | null | SELECT
DISTINCT actor_name AS username,
YEAR(rev_timestamp) AS year,
COUNT(rev_id) AS number_of_edits,
SUM(rev_len) AS total_bytes,
CASE
WHEN rev_parent_id = 0 THEN 1
ELSE 0
END AS new_page
FROM revision
JOIN actor
ON revision.rev_actor = actor.actor_id
WHERE actor_name IN ('KCVelag... | {"resultsets": [{"headers": ["page_title"], "rowcount": 44}], "runningtime": "62.36"} | commonswiki_p |
Osierocone artykuły w polskojęzycznej Wikipedii | null | SELECT p.page_id, p.page_title FROM page AS p
LEFT JOIN pagelinks AS pl
ON p.page_title = pl.pl_title AND p.page_namespace = 0 AND pl.pl_namespace = 0
WHERE pl.pl_title IS NULL AND p.page_is_redirect = 0 AND p.page_namespace = 0; | {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 4}], "runnin... | plwiki_p |
User talk of IP ranges | WP:THEYCANTHEARYOU, especially when the user talk page purports to be for a range rather than a single IP address. (I ignore IPv6 pages beginning with A-F, as I've never seen one.) | SELECT page_title, page_len
FROM page
WHERE page_namespace=3 AND page_title BETWEEN "1" AND "999" AND page_title REGEXP "^\\d[\\d.:A-Fa-f]+/\\d+$"
ORDER BY page_title | {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 0}], "runnin... | enwiki_p |
MassMassage list creator:Active user of Malayalam Wikisource NS0 & NS106 | MassMassage list creator:Active user of Indic Wikisource, here NS:0 an NS:104 ( Main namespace and Page namespace) edit done by the user account | USE mlwikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = ml.wikisource.org }}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN (0,106)
AN... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 142}], "runningtime": "0.34"} | mlwikisource_p |
MassMassage list creator:Active user of Odia Wikisource NS0 & NS104 | MassMassage list creator:Active user of Indic Wikisource, here NS:0 an NS:104 ( Main namespace and Page namespace) edit done by the user account | USE orwikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = or.wikisource.org }}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN (0,250)
AN... | {"resultsets": [{"headers": ["page_id"], "rowcount": 29}], "runningtime": "17.30"} | orwikisource_p |
COI ER via RC (last 90) | null | SELECT actor_name,rc_title,comment_text,REPLACE(STR_TO_DATE(rc_timestamp, '%Y%m%e%H%i%s'),'T',' ') AS time
FROM recentchanges rc
INNER JOIN actor ON rc.rc_actor=actor.actor_id
INNER JOIN comment ON rc.rc_comment_id=comment.comment_id
WHERE comment_text LIKE "%COI%Request%Tool%"
AND rc_namespace="1"
AND (rc_timestam... | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "pp_page", "pp_pr... | enwiki_p |
fo | null | SELECT rc_title,actor_name,comment_text,REPLACE(STR_TO_DATE(rc_timestamp, '%Y%m%e%H%i%s'),'T',' ') AS time FROM recentchanges_userindex
INNER JOIN comment ON rc_comment_id = comment_id
INNER JOIN actor ON rc_actor = actor_id
WHERE lower(comment_text) LIKE "%fuck off%" AND (rc_timestamp >= DATE_ADD(NOW(), INTERVAL -90 D... | {"resultsets": [{"headers": ["edition_count", "actor_name"], "rowcount": 1}], "runningtime": "0.78"} | enwiki_p |
User talks by length (edited in the last 90 days) | null | SELECT DISTINCT actor_name,ROUND(page_len/1024,2) AS 'page_len in kB',CONCAT('https://en.wikipedia.org/wiki/User_talk:',page_title) AS link
FROM recentchanges
INNER JOIN actor ON actor_id=rc_actor
INNER JOIN page ON page_title=actor_name
WHERE page_namespace=3
ORDER BY page_len DESC
LIMIT 100 | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 30}, {"headers": ["page_title"], "rowcount": 9}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 1}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {... | enwiki_p |
Sysop gender gap | null | SELECT COUNT(*) AS 'sysops with non-default',
SUM(up_value='female' AND up_property='gender') AS female,
SUM(up_value='male' AND up_property='gender') AS male,
concat(round(SUM(up_value='female' AND up_property='gender') * 100 / count(*), 1), "%") as "female %",
concat(round(SUM(up_value='male' AND up_p... | {"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 16}], "runningtime": "21.27"} | enwiki_p |
Gender count all editors | null | SELECT COUNT(*) AS 'editors with non-default',
SUM(up_value='female' AND up_property='gender') AS female,
SUM(up_value='male' AND up_property='gender') AS male,
concat(round(SUM(up_value='female' AND up_property='gender') * 100 / count(*), 1), "%") as "female %",
concat(round(SUM(up_value='male' AND up_... | {"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 0}], "runningtime": "0.07"} | enwiki_p |
الصور المرفوعة على على ويكيبييديا العربية وغير مضافة الى المقالات | null | SELECT CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), '}}') FROM page p
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0)
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.cl_to = "All_orphan... | {"resultsets": [{"headers": ["Article", "Created by user", "Time"], "rowcount": 196}], "runningtime": "0.40"} | arwiki |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 1}], "runningtime": "0.08"} | eswiki |
User talks by length (not edited in the last 90 days) | null | SELECT DISTINCT actor_name,ROUND(page_len/1024,2) AS 'page_len in kB',CONCAT('https://en.wikipedia.org/wiki/User_talk:',page_title) AS link
FROM recentchanges
RIGHT JOIN actor ON actor_id=rc_actor
INNER JOIN page ON page_title=actor_name
WHERE page_namespace=3
AND rc_actor IS NULL
ORDER BY page_len DESC
LIMIT ... | {"resultsets": [{"headers": ["page_namespace", "page_title", "page_len"], "rowcount": 1}], "runningtime": "0.29"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"connection_id": 20647124} | enwiki_p |
Retenção de usuários | Dos usuários registrados que começaram a editar em um determinado mês, quantos permaneceram editando por menos de uma semana, entre uma semana e um mês, entre um mês e um ano e mais de um ano. A comparação é feita entre a primeira e a última edição de cada usuário. | SELECT
CONCAT(mes, '/', ano) mês,
SUM(período < 7) menos_de_1semana,
SUM(período BETWEEN 7 AND 30) entre_1semana_e_1mês,
SUM(período BETWEEN 31 AND 365) entre_1mês_e_1ano,
SUM(período > 366) mais_de_1ano
FROM (
SELECT
SUBSTR(primeira, 5, 2) mes,
SUBSTR(primeira, 1, 4) ano,
TIMESTAMPDIFF(DAY, primeira, ... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_actor", "log_namespace", "log_title", "log_comment", "log_comment_id", "log_params", "log_deleted", "log_user_text", "log_page", "comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 5}], "runningtime... | ptwiki_p |
Categories in enwiki could be created in arwiki | null | select concat("* [[:en:Category:",page_title,"]]"), count(cl_from)
from page
inner join categorylinks
on cl_to = page_title
where page_id not in (select cl_from from categorylinks where cl_to = "Hidden_categories")
and cl_from in (select ll_from from langlinks where ll_from = cl_from and ll_lang = "ar")
and page_id not... | {"resultsets": [{"headers": ["log_actor", "log_type", "COUNT(1)"], "rowcount": 1}], "runningtime": "19.43"} | enwiki |
Pages which exist with color but not colour, or vice versa | null | SELECT CONCAT(CASE page_namespace WHEN 4 THEN "Wikipedia:" ELSE "" END, page_title) as title
FROM page
WHERE page_title REGEXP "[Cc]olou?r" AND page_namespace IN (0, 4)
GROUP BY page_namespace, REPLACE(REPLACE(page_title,"colour","color"),"Colour","Color")
HAVING COUNT(*)=1
ORDER BY page_namespace, title | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}, {"headers": ["count(*)"], "rowcount": 1}, {"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.19"} | enwiki_p |
test8 | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text,
ipb_range_start,
ipb_range_end
FROM
ipblocks
INNER JOIN actor_ipblocks ON ipb_by_actor = actor_id
INNER JOIN comment_ipblocks ON ipb_reason_id = comment_id
WHERE
ipb_address REGEXP '^[0-9]'; | {"resultsets": [{"headers": ["page_title"], "rowcount": 679}], "runningtime": "2.45"} | enwiki |
test8 | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text,
ipb_range_start,
ipb_range_end
FROM
ipblocks
INNER JOIN actor_ipblocks ON ipb_by_actor = actor_id
INNER JOIN comment_ipblocks ON ipb_reason_id = comment_id
WHERE
ipb_address REGEXP '^[0-9]'; | {"resultsets": [{"headers": ["MAX(rev_timestamp)"], "rowcount": 1}], "runningtime": "5614.55"} | metawiki |
zhwiki: All infoboxes | null | USE zhwiki_p;
SELECT page_id, page_title
FROM page
WHERE page_namespace = 10
AND page_is_redirect = 0
AND page_title LIKE "%Infobox%"
AND NOT page_title LIKE "%/%";
SELECT page_id, page_title
FROM page
WHERE page_namespace = 10
AND page_is_redirect = 0
AND page_title LIKE "%資訊框%"
AND NOT page_title LIKE "%... | {"resultsets": [{"headers": ["MAX(rev_timestamp)"], "rowcount": 1}], "runningtime": "0.11"} | zhwiki_p |
Pages which exist with color but not colour, or vice versa | null | SELECT CONCAT("[[",CASE page_namespace WHEN 4 THEN "Wikipedia:" ELSE "" END, page_title,"]]") as title
FROM page
WHERE page_title REGEXP "[Cc]olou?r" AND page_namespace IN (0, 4) AND NOT page_title LIKE "%ColoradoInfColorado%"
GROUP BY page_namespace, REPLACE(REPLACE(page_title,"colour","color"),"Colour","Color")
HAVIN... | {"resultsets": [{"headers": ["tl_title", "count(tl_title)"], "rowcount": 1411}], "runningtime": "2.02"} | enwiki_p |
patrollers that have made less than M edits in the last N days (updated&forked)) | null | SELECT CONCAT("[[User:",user_name,"|]]") as kullanici, user_editcount as katki_sayisi, DATEDIFF(NOW(), rev_timestamp) as gecen_gun, user_registration as kayit_tarihi, rev_timestamp AS son_katki, GROUP_CONCAT(ug1.ug_group) AS 'kullanici_grubu', round(DATEDIFF(NOW(), rev_timestamp)/365.24,2) as yil
FROM `user`
LEFT JOIN ... | {"connection_id": 21008905} | trwiki_p |
Plateaus | null | select page_title from page where page_namespace=0
and (page_title like '%_Plateau')
and page_is_redirect=0
| {"resultsets": [{"headers": ["log_type", "AAAAMM", "count(*)"], "rowcount": 100}], "runningtime": "0.67"} | enwiki_p |
[2022] New drawings from Nationalmuseum | null | SELECT page_title
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
WHERE actor_name='AliciaFagervingWMSE-bot'
AND r1.rev_timestamp > '20220101000000'
AND comment_text LIKE '%... | {"resultsets": [{"headers": ["page_title", "page_id", "revisions", "editors", "size", "created"], "rowcount": 100}], "runningtime": "32.43"} | wikidatawiki_p |
Vandalismebestrijding (IP-controle) | IP-patrolling, 14-02-2022 17:30 (CET) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["log_title"], "rowcount": 95}], "runningtime": "0.21"} | nlwiki_p |
Contributors stats Fr.Wikipedia | null | SET @participants = ("Abodavid33,Adonis nguessan,Alomonews,Aman ADO,Angeflorekra,Anneprudence,Aristidek5maya,Assalvero,Aya Kouakou,Benoit Soubeyran,Biko05,Cyriac Gbogou,Danny-Franck Komian,Davernepat,Didierwiki,Dorcas2017,Dorianeahozo,Doumass01,Dreykanga,Durand ndri,Emmanuel Dabo,Erico ble,Ferela gnoan,Fra425,FranckAur... | {"resultsets": [{"headers": ["tl_namespace", "tl_title", "ct"], "rowcount": 0}], "runningtime": "0.34"} | frwiki_p |
Contributors stats Commons | null | SET @participants = ("Abodavid33,Adonis nguessan,Alomonews,Aman ADO,Angeflorekra,Anneprudence,Aristidek5maya,Assalvero,Aya Kouakou,Benoit Soubeyran,Biko05,Cyriac Gbogou,Danny-Franck Komian,Davernepat,Didierwiki,Dorcas2017,Dorianeahozo,Doumass01,Dreykanga,Durand ndri,Emmanuel Dabo,Erico ble,Ferela gnoan,Fra425,FranckAur... | {"resultsets": [{"headers": ["CONCAT('*{{\u03b1\u03c1\u03c7\u03b5\u03af\u03bf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 5}], "runningtime": "0.14"} | commonswiki_p |
People using SpeciesHelper script | Except for me. Within last 30 days. Limit to 100 newest results, to help with query speed. | SELECT *
FROM recentchanges_userindex
JOIN comment_recentchanges ON comment_id = rc_comment_id
JOIN actor_recentchanges ON rc_actor = actor_id
WHERE comment_text LIKE "% ([[User:Novem Linguae/Scripts/SpeciesHelper|SpeciesHelper]])"
AND actor_id != 687772 #Novem Linguae
ORDER BY rc_id DESC
LIMIT 100 | {"resultsets": [{"headers": ["CONCAT('| [[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']] ||[[:\u0391\u03c1\u03c7\u03b5\u03af\u03bf:', i_p.page_title, ']]')"], "rowcount": 21}], "runningtime": "0.18"} | enwiki |
Scrape Wikidata Item IDs from files in Artworks with mismatching digital representation of | null | use commonswiki_p;
SELECT REPLACE(el_to,'https://reasonator.toolforge.org/test/?q=','wd:') AS QID
FROM page
JOIN externallinks ON page_id=el_from AND el_to LIKE 'https://reasonator.toolforge.org%'
JOIN categorylinks ON page_id=cl_from AND cl_to='Artworks_with_mismatching_digital_representation_of'
#join templatelinks... | {"resultsets": [{"headers": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 253}], "runningtime": "0.92"} | commonswiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["user_name", "last_edit_time"], "rowcount": 19}], "runningtime": "0.26"} | eswiki |
zhwiki: Pages which title contains the People's Republic of China | null | USE zhwiki_p;
SELECT page_id, page_title
FROM page
WHERE page_namespace = 14
AND page_is_redirect = 0
AND page_title LIKE "%中華人民共和國%";
SELECT page_id, page_title
FROM page
WHERE page_namespace = 14
AND page_is_redirect = 0
AND page_title LIKE "%中华人民共和国%";
# 0/1 main 2/3 user 4/5 wp 6/7 ... | {"resultsets": [{"headers": ["CONCAT(\"[[\", fal.pl_title, \"]]\")", "GROUP_CONCAT(CONCAT(\"[[WP:\", cci.page_title, \"]]\") SEPARATOR ', ')"], "rowcount": 454}], "runningtime": "11.41"} | zhwiki_p |
zhwiki: Pages which title contains China | null | USE zhwiki_p;
SELECT page_id, page_title
FROM page
WHERE page_namespace = 14
AND page_is_redirect = 0
AND page_title LIKE "%中國%"
AND NOT page_title LIKE "%中國大陸%";
SELECT page_id, page_title
FROM page
WHERE page_namespace = 14
AND page_is_redirect = 0
AND page_title LIKE "%中国%"
AND NOT page_title LIKE "%中国大... | {"resultsets": [{"headers": ["CONCAT(\"[[\", fal.pl_title, \"]]\")", "GROUP_CONCAT(CONCAT(\"[[WP:\", cci.page_title, \"]]\") SEPARATOR ', ')"], "rowcount": 1908}], "runningtime": "12.53"} | zhwiki_p |
Wikiwalentynki | null | SELECT
page_title
FROM page
LEFT JOIN pagelinks ON pl_title = page_title AND pl_namespace = page_namespace
LEFT JOIN page_props ON pp_page = page_id AND pp_propname = "disambiguation"
WHERE
pl_from IS NULL AND
pp_page IS NULL AND
page_is_redirect = 0 AND
page_namespace = 0
AND pl_from_n... | {"resultsets": [{"headers": ["CONCAT('| [[:{{ns:', i.il_from_namespace, '}}:', p.page_title, ']] ||[[:\u0391\u03c1\u03c7\u03b5\u03af\u03bf:', i_p.page_title, ']]')"], "rowcount": 0}], "runningtime": "0.20"} | plwiki_p |
appx. number of non-subpage article talk pages | null | SELECT COUNT(*)
FROM page
WHERE page_namespace = 1 AND page_title NOT LIKE "%/%" | {"resultsets": [{"headers": ["ipb_address", "actor_name", "ipb_timestamp", "comment_text"], "rowcount": 2}], "runningtime": "7.83"} | enwiki_p |
New talk pages with < 10 bytes on ptwiki | null | SELECT page_title
FROM page
WHERE
page_namespace = 1
AND page_is_new = 1
AND page_len < 1; | {"resultsets": [{"headers": ["user_id", "user_name", "user_registration", "user_editcount"], "rowcount": 2711}], "runningtime": "3.29"} | ptwiki |
u | null | USE arwiki_p;
SELECT CONCAT(actor_name) AS user_name, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count, COUNT(rev.rev_id) as edit_count
FROM user
INNER JOIN revision rev ON user.user_id = rev.rev_actor
INNER JOIN actor ON rev.rev_actor = actor.actor_id
INNER JOIN revisi... | {"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": 2646}], "runningtime": "5.01"} | arwiki_p |
Links to nli.org.il in hewiki | Links to nli.org.il in hewiki | use hewiki_p;
select
el_from,
page_title,
el_to
from
externallinks,
page
where
el_to like '%jpress%' and
el_from = page_id
limit 500000; | {"resultsets": [{"headers": ["user_name", "ug_group", "log_timestamp", "ipb_id"], "rowcount": 2701}], "runningtime": "72.11"} | hewiki_p |
Vandalismebestrijding | IP-patrolling 16-02-2022 22:16 (CET) .. 56 unpatrolled | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["files"], "rowcount": 0}], "runningtime": "24.59"} | nlwiki_p |
[enwiki] redirects to non-free use rationale templates | null | select redirpage.page_title from redirect rd
join page tpl on
tpl.page_namespace = rd.rd_namespace and
tpl.page_title = rd.rd_title
join categorylinks cat on
cat.cl_from = tpl.page_id
join page redirpage on
redirpage.page_id = rd.rd_from
where
rd.rd_namespace = 10 and
cat.cl_to = "Non-free_use_ra... | {"resultsets": [{"headers": ["LONGITUD", "URL_Articulo"], "rowcount": 1460}], "runningtime": "5.29"} | enwiki |
Edits from an IP hopper | null | SELECT actor_name, rc_timestamp
FROM recentchanges
JOIN actor ON actor_id = rc_actor
JOIN comment ON comment_id = rc_comment_id
WHERE comment_text LIKE "%Property:P9395%" OR comment_text LIKE "%pornsite %"
order by rc_timestamp;
| {"resultsets": [{"headers": ["CONCAT('# [[:File:', page_title, ']]')"], "rowcount": 0}], "runningtime": "0.81"} | wikidatawiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["up_value", "COUNT(*)"], "rowcount": 6}], "runningtime": "0.09"} | enwiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 7435}], "runningtime": "9.32"} | eswiki |
Page creation date - WLF | null | SELECT rev_timestamp, page.page_title
FROM revision
RIGHT JOIN page ON rev_page = page.page_id
WHERE rev_parent_id=0 AND rev_page IN (
SELECT cl_from
FROM categorylinks
INNER JOIN page ON cl_from = page.page_id
WHERE cl_to = 'Images_from_Wiki_Loves_Folklore_2022' AND page_namespace=6 AND page_is_redirect=0
) | {"resultsets": [{"headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"], "rowcount": 100}], "runningtime": "16.79"} | commonswiki |
List the users with 30/500 edit count, excluding local bots in Cantonese Wikipedia | null | USE zh_yuewiki_p;
-- Date and time (UTC) to list users with 30/500 threshold.
SELECT @t := now();
SELECT
user_name, user_registration, user_editcount
FROM
user
WHERE
(user_registration IS NULL OR user_registration < DATE_FORMAT(DATE_SUB(@t, INTERVAL 30 DAY), '%Y%m%d%H%i%s')) AND
-- select for u... | {"resultsets": [{"headers": ["comment_text", "rev_timestamp"], "rowcount": 186263}], "runningtime": "280.94"} | zh_yuewiki_p |
Edits from an IP hopper | null | SELECT actor_name, rc_timestamp
FROM recentchanges
JOIN actor ON actor_id = rc_actor
JOIN comment ON comment_id = rc_comment_id
WHERE comment_text LIKE "%Property:P9395%" OR comment_text LIKE "%pornsite %"
order by rc_timestamp;
| {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "0.07"} | wikidatawiki_p |
All by length | null | SELECT page_title,ROUND(page_len/1024,2) AS 'page_len in kB',CONCAT('https://en.wikipedia.org/wiki/User_talk:',page_title) AS link
FROM page
WHERE page_title NOT RLIKE '/'
AND page_namespace=3 # 2 For User:, 3 for User talk:
AND page_title LIKE '%.%'
ORDER BY page_len DESC
LIMIT 100 | {"resultsets": [{"headers": ["actor_name", "ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"], "rowcount": 224}], "runningtime": "5.68"} | enwiki_p |
edo - nlwiki_p Anonymous edits rc_patrolled summary | forked from Bdijkstra - show all unpatrolled edits for the last weeks by day/user/lemma | USE nlwiki_p;
# anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION... | {"resultsets": [{"headers": ["Categorias_vazias"], "rowcount": 100}, {"headers": ["Categorias_com_1_p\u00e1gina"], "rowcount": 100}, {"headers": ["Categorias_com_2_p\u00e1gnas"], "rowcount": 100}, {"headers": ["Categorias_com_3_p\u00e1gnas"], "rowcount": 100}], "runningtime": "0.67"} | nlwiki |
AfC review counts, last month | ** NOT including deleted articles ** | select count(rc_id) as reviews, actor_name,
SUM(comment_text like "%Publishing accepted%") as "accept",
SUM(comment_text like "Declining submission:%") as "decline",
SUM(comment_text like "Rejecting submission:%") as "reject",
concat(round(SUM(comment_text like "%Publishing accepted%") * 100 / ... | {"resultsets": [{"headers": ["tl_title"], "rowcount": 127}], "runningtime": "1456.93"} | enwiki_p |
Edits from an IP hopper | null | SELECT LEFT(rc_timestamp, 8), COUNT(*)
FROM recentchanges
JOIN actor_recentchanges ON actor_id = rc_actor
JOIN comment_recentchanges ON comment_id = rc_comment_id
WHERE
(
comment_text LIKE "%Property:P9395%"
OR comment_text LIKE "%pornsite %"
)
AND actor_user IS NULL
GROUP BY 1 | {"resultsets": [{"headers": ["actor_name", "user_registration", "user_editcount", "ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"], "rowcount": 1000}], "runningtime": "2... | wikidatawiki_p |
Edits from an IP hopper | null | SELECT LEFT(rc_timestamp, 8), COUNT(*)
FROM recentchanges
JOIN actor_recentchanges ON actor_id = rc_actor
JOIN comment_recentchanges ON comment_id = rc_comment_id
WHERE
(
comment_text LIKE "%Property:P9395%"
# OR comment_text LIKE "%pornsite %"
)
# AND actor_user IS NULL
GROUP BY 1 | {"resultsets": [{"headers": ["actor_name", "user_registration", "user_editcount", "ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"], "rowcount": 2}], "runningtime": "13.8... | wikidatawiki_p |
Verified handles addition by date and user type | null | SELECT LEFT(rc_timestamp, 8) as `date`, actor_user IS NOT NULL as `registered`, COUNT(*)
FROM recentchanges
JOIN actor_recentchanges ON actor_id = rc_actor
JOIN comment_recentchanges ON comment_id = rc_comment_id
WHERE
comment_text LIKE "/* wbcreateclaim-create:1| */ [[Property:P9395]]:%"
GROUP BY date, registered
W... | {"resultsets": [{"headers": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 7436}], "runningtime": "8.45"} | wikidatawiki_p |
Vandalismebestrijding nlwiki | IP-patrolling 119 open | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 1}], "runningtime": "0.06"} | nlwiki_p |
List the users with 90/200 edit count, excluding local bots in Cantonese Wikipedia | null | USE zh_yuewiki_p;
-- Date and time (UTC) to list users with 90/200 threshold.
SELECT @t := now();
SELECT
user_name, user_registration, user_editcount
FROM
user
WHERE
(user_registration IS NULL OR user_registration < DATE_FORMAT(DATE_SUB(@t, INTERVAL 90 DAY), '%Y%m%d%H%i%s')) AND
-- select for u... | {"resultsets": [{"headers": ["pl_title"], "rowcount": 6}], "runningtime": "0.11"} | zh_yuewiki_p |
Vandalismebestrijding nlwiki | IP-patrolling 21 feb 2022 13:05 (CET) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title", "count(page_title)"], "rowcount": 100}], "runningtime": "13.86"} | nlwiki_p |
FR@zhwiki | null | SELECT * FROM logging WHERE log_type = 'move' AND log_namespace = 6 AND log_timestamp > 20210101000000 AND log_timestamp < 20220101000000; | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 1}], "runningtime": "0.06"} | zhwiki_p |
Size of uploads by Fæ | This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects. | USE commonswiki_p;
SELECT COUNT(img_name) AS Count,
ROUND(SUM(img_size/(1<<30))) AS Size_GB
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "1Veertje"; | {"resultsets": [{"headers": ["ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_auto", "ipb_anon_only", "ipb_create_account", "ipb_expiry", "ipb_range_start", "ipb_range_end", "ipb_enable_autoblock", "ipb_deleted", "ipb_block_email", "ipb_by_actor", "ipb_allow_usertalk", "ipb_parent_block_id", ... | commonswiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২ ফেব্রুয়ারি ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"resultsets": [{"headers": ["il_from", "il_to", "il_from_namespace"], "rowcount": 10}], "runningtime": "0.07"} | bnwiki |
Vandalismebestrijding (IP-parolling) nlwiki | Vandalismebestrijding 284 to go. 22 feb 2022 12:30 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["Rank", "User", "Total Edits"], "rowcount": 0}], "runningtime": "0.25"} | nlwiki_p |
sockblocks | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text
FROM
ipblocks
INNER JOIN actor ON ipblocks.ipb_by_actor = actor.actor_id
INNER JOIN comment ON ipblocks.ipb_reason_id = comment.comment_id
WHERE
TRUE
AND ipb_timestamp > "20220000000000"
AND comment_text RLIKE "([Bb]?l|L)ock evasion|multiple accoun... | {"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": 50}], "runningtime": "0.11"} | enwiki_p |
my uploads | This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects. | USE commonswiki_p;
SELECT img_name
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "Vojtěch Dostál"; | {"resultsets": [{"headers": ["user_name"], "rowcount": 0}], "runningtime": "11.24"} | commonswiki_p |
test | null | SELECT * FROM page
WHERE page_title LIKE '%Edit_warring%' AND page_title NOT RLIKE 'Archive' AND page_namespace=4 AND page_is_redirect=0 | {"connection_id": 23178574} | enwiki_p |
Most active non-admins at AN(/i,3RR) (excluding archiving) | Excludes archiving | SELECT actor_name, COUNT(actor_name) AS edits
FROM revision JOIN actor ON rev_actor = actor_id
JOIN user_groups ON actor_user = ug_user
JOIN comment ON rev_comment_id = comment_id
WHERE rev_page = 5137507 # AN = 5149102, ANI = 5137507, 3RR = 3741656
# AND rev_timestamp > (NOW() - INTERVAL 1 year)
AND ... | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 3}, {"headers": ["page_title"], "rowcount": 3}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 0}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"... | enwiki_p |
Most active Category:Українська_література editors in ukwiki | null | select a.actor_name, count(*) as number_of_edits
from categorylinks cl
join revision_userindex r on cl.cl_from = r.rev_page
join actor a on r.rev_actor = a.actor_id
where cl_to = "Кіпр"
group by a.actor_id
order by number_of_edits desc | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 5}], "runningtime": "3.42"} | ukwiki_p |
Most active Category:Українська_література editors in ukwiki | null | select a.actor_name, count(*) as number_of_edits
from categorylinks cl
join revision_userindex r on cl.cl_from = r.rev_page
join actor a on r.rev_actor = a.actor_id
where cl_to = "Стрийський район"
group by a.actor_id
order by number_of_edits desc | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 0}], "runningtime": "0.07"} | ukwiki_p |
Most active Category:Українська_література editors in ukwiki | null | select a.actor_name, count(*) as number_of_edits
from categorylinks cl
join revision_userindex r on cl.cl_from = r.rev_page
join actor a on r.rev_actor = a.actor_id
where cl_to = "Райони Львівської області"
group by a.actor_id
order by number_of_edits desc | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 0}], "runningtime": "0.06"} | ukwiki_p |
Most active Category:Українська_література editors in ukwiki | null | select a.actor_name, count(*) as number_of_edits
from categorylinks cl
join revision_userindex r on cl.cl_from = r.rev_page
join actor a on r.rev_actor = a.actor_id
where cl_to = "Стрийський район"
group by a.actor_id
order by number_of_edits desc | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 6398}], "runningtime": "7.97"} | ukwiki_p |
Collect all images and uploaders for Wiki Loves Monuments 2021 | null | SELECT
image.img_name AS filename,
page.page_id AS page_id,
image.img_timestamp AS timestamp,
actor.actor_name AS uploader,
tl_title AS template
FROM
page
INNER JOIN templatelinks ON page.page_id = tl_from
INNER JOIN image ON page.page_title = img_name
INNER JOIN actor ON actor.actor_id = image.img_ac... | {"resultsets": [{"headers": ["page_title"], "rowcount": 50}], "runningtime": "0.11"} | commonswiki_p |
Wanted photograph categories | Categories which have items in them, but are not yet created | WITH `needed` AS (
SELECT `cat_title` FROM `category` WHERE
(`cat_pages` > 0 OR `cat_subcats` > 0 OR `cat_files` > 0)
AND `cat_title` NOT IN (SELECT `page_title` FROM `page`)
)
SELECT CONCAT('[[:Category:', cat_title, ']]') AS `link` FROM `needed`
WHERE `cat_title` LIKE '%hotographs_taken_on_%'
ORDER BY `ca... | {"resultsets": [{"headers": ["page_title", "page_id"], "rowcount": 4}], "runningtime": "0.06"} | commonswiki |
All orphan non-free files on te.wiki | All orphan non-free files not linked from Article namespace | SELECT
CONCAT("File:", p.page_title) as pagename
from page p
join image ON p.page_namespace=6 AND p.page_title=img_name
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0 )
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 430}], "runningtime": "0.88"} | tewiki_p |
Vandalismebestrijding nlwiki (IP-patrolling) | Vandalismebestrijding: 540 te controleren/markeren (25 feb 2022, 13:15 (CET)) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title"], "rowcount": 393}], "runningtime": "0.49"} | nlwiki_p |
صفحات محذوفة مرتبطة بويكي بيانات | null | use arwiki_p;
select *
from wikidatawiki_p.wb_items_per_site
where wikidatawiki_p.wb_items_per_site.ips_site_id like "arwiki"
and replace(wikidatawiki_p.wb_items_per_site.ips_site_page," ", "_") not in (select page_title from page
where
... | {"resultsets": [{"headers": ["page_title", "page_id"], "rowcount": 4}], "runningtime": "0.07"} | arwiki_p |
مقالات تحتوي فاصلة أجنبية | null | use arwiki_p;
select concat('[[',page_title,']]'), page_namespace
from page
where page_is_redirect = 0
and (page_namespace = 0 or page_namespace = 14)
and page_title like "%,%"
limit 100; | {"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 5457}], "runningtime": "19.76"} | arwiki_p |
AfC review counts, last 30 days | Credit to KylieTastic, who I forked this from so I could pull the latest data. | use enwiki_p;
select ROW_NUMBER() OVER(ORDER BY reviews DESC) AS rank,
count(rc_id) as reviews,
actor_name,
SUM(comment_text like "%Publishing accepted%") as "accept",
SUM(comment_text like "Declining submission:%") as "decline",
SUM(comment_text like "Rejecting submission:%") as "reject",
... | {"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 2108}], "runningtime": "17.81"} | enwiki |
Longest 1,000 pages in all namespaces | null | SELECT page_title AS "Mainspace", page_len
FROM page WHERE page_namespace = "0" ORDER BY page_len DESC LIMIT 1000;
SELECT page_title AS "Talk", page_len
FROM page WHERE page_namespace = "1" ORDER BY page_len DESC LIMIT 1000;
SELECT page_title AS "User", page_len
FROM page WHERE page_namespace = "2" ORDER BY page_len DE... | {"resultsets": [{"headers": ["CONCAT(\n 'https://es.wikipedia.org/wiki/Usuario:',\n page_title)"], "rowcount": 1}], "runningtime": "0.06"} | enwiki_p |
Number of Breton lexemes per user | null | select actor_name, count(*) c
from revision_userindex
join page on rev_page=page_id
join actor_revision on rev_actor=actor_id
JOIN pagelinks ON page.page_id=pagelinks.pl_from
where page_namespace = 146
AND pagelinks.pl_title="Q12107" # Breton
group by actor_user
order by c desc;
| {"resultsets": [{"headers": ["PT", "link"], "rowcount": 39}], "runningtime": "14.11"} | wikidatawiki_p |
Empty article talks on plwiki | null | USE plwiki_p;
SELECT concat("# [[Dyskusja:",page_title,"]]") AS page_title
FROM plwiki_p.page
WHERE page_namespace = 1 AND page_len = 0
ORDER BY page_title; | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 2}, {"headers": ["cl_to", "count_cl_to"], "rowcount": 5}, {"headers": ["cl_to", "count_cl_to"], "rowcount": 38}], "runningtime": "297.14"} | plwiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 1}], "runningtime": "64.57"} | eswiki |
Top editors in the Sanskrit lemmas category | null | set @category_name := 'Sanskrit_lemmas';
select
actor_name as user,
count(*) as edit_count
from categorylinks
left join revision on rev_page = cl_from
left join actor on actor_id = rev_actor
where cl_to = @category_name
group by rev_actor
having edit_count > 20
order by edit_count desc; | {"resultsets": [{"headers": ["log_timestamp", "user_name", "link"], "rowcount": 1}], "runningtime": "0.57"} | enwiktionary_p |
Top editors in Pali lemmas category | null | set @category_name := 'Pali_lemmas';
select
actor_name as user,
count(*) as edit_count
from categorylinks
left join revision on rev_page = cl_from
left join actor on actor_id = rev_actor
where cl_to = @category_name
group by rev_actor
having edit_count > 20
order by edit_count desc; | {"resultsets": [{"headers": ["log_timestamp", "user_name", "link"], "rowcount": 10}], "runningtime": "1.71"} | enwiktionary_p |
Top editors in Hindi lemmas category | null | set @category_name := 'Hindi_lemmas';
select
actor_name as user,
count(*) as edit_count
from categorylinks
left join revision on rev_page = cl_from
left join actor on actor_id = rev_actor
where cl_to = @category_name
group by rev_actor
having edit_count > 20
order by edit_count desc; | {"resultsets": [{"headers": ["page_title"], "rowcount": 280}], "runningtime": "0.56"} | enwiktionary_p |
Top editors in Prakrit lemmas category | null | set @category_name := 'Prakrit_lemmas';
select
actor_name as user,
count(*) as edit_count
from categorylinks
left join revision on rev_page = cl_from
left join actor on actor_id = rev_actor
where cl_to = @category_name
group by rev_actor
having edit_count > 20
order by edit_count desc; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 26}], "runningtime": "0.09"} | enwiktionary_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding: 319 nog open, 27 feb. 22:27 (CET) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["rev_id", "page_title"], "rowcount": 3}], "runningtime": "0.10"} | nlwiki_p |
All orphan non-free files on te.wiki | null | #USE viwiki_p;
SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace = 0)
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 6}], "runningtime": "29.35"} | tewiki_p |
Files on vi.wiki with old versions | null | #USE viwiki_p;
SELECT CONCAT("File:", oi_name)
FROM oldimage
INNER JOIN page p ON p.page_title = oi_name AND p.page_namespace = 6
INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "Hình_không_tự_do" #Non-free files
#INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "सभी_मुक्त_मीडिया" ... | {"resultsets": [{"headers": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 13061}], "runningtime": "15.58"} | viwiki_p |
Files on te.wiki NOT in spec categories (no license) | null | #USE tewiki_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": ["CONCAT(\"Template:\", page_title)", "COUNT(tl_from)"], "rowcount": 13061}], "runningtime": "15.12"} | tewiki_p |
Black hole image usage | null | #breakdown by wiki
select gil_to, count(gil_page) as perwiki_count, gil_wiki
from globalimagelinks
where gil_page_namespace_id=0
and gil_to="Black_hole_-_Messier_87_crop_max_res.jpg"
group by gil_wiki
order by perwiki_count DESC
| {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 474}], "runningtime": "0.58"} | commonswiki_p |
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת | null | select user_name, count(page_title)
from user join revision_userindex join page join actor
on user_id = actor_user
and rev_page = page_id
and rev_actor = actor_id
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
and rev_deleted = 0
group by user_name
having count(page_title) >= 50
order by count(... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 701}], "runningtime": "2.56"} | hewiki_p |
Wistalk2 | Fork this query, change "idwiki" with target's Wikipedia language (e.g : "enwiki"), change the @target variable with the target's username, then run it.
See full list of all possible databases here : https://quarry.wmflabs.org/query/4031 | set @target = "ZomBear";
SELECT user_name,
CONCAT(substr(user_registration,1,4),"-",substr(user_registration,5,2), "-",substr(user_registration,7,2)) AS 'sejak',
user_editcount AS 'edit count',
CONCAT(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2), "-",substr(rev_timestamp,7,2)," ",substr(rev_timestamp,9,2... | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}], "runningtime": "0.07"} | enwiki |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["a", "b", "c"], "rowcount": 3}], "runningtime": "0.07"} | enwiki_p |
User edit tool usage | Users registered in a year and editing in a year with different tools to know the prevalence of tool usage like wikitext, visual editor etc. | select @a:=0;
SELECT @a:=@a+1 serial_number,
actor_user,
actor_name,
LEFT(user_registration,8) as regdate,
ctd_name,
COUNT(*) as tagcount
from revision
join actor on actor_id=rev_actor
join user on actor_user=user_id
join page on rev_page=page_id
JOIN change_tag ON rev_id = ct_rev_id
JOIN change_tag_de... | {"resultsets": [{"headers": ["page_title"], "rowcount": 572}], "runningtime": "0.98"} | tewiki_p |
Media count per user | Files uploaded per user | SELECT @a:=@a+1 serial_number,
CONCAT("[[User:",actor_name,"]]") as user_name,
COUNT(page_title) as uploaded_file_count
from image
(SELECT @a:= 0) AS a
join page ON page_namespace=6 AND page_title=img_name
join revision ON rev_page = page_id AND rev_parent_id = 0
join actor ON actor_id=re... | {"resultsets": [{"headers": ["page_title"], "rowcount": 567}], "runningtime": "1.20"} | tewiki_p |
Media count per user | Files uploaded per user | select row_number() over (order by uploaded_file_count) as "s.no",
CONCAT("[[User:",actor_name,"]]") as user_name,
COUNT(page_title) as uploaded_file_count,
CONCAT("[https://te.wikipedia.org/wiki/Special:Filelist/",REPLACE(actor_name, ' ', '_')," File list]") as filelist
from image
join page ON page_nam... | {"resultsets": [{"headers": ["\u0c17\u0c4d\u0c30\u0c3e\u0c2e\u0c02_\u0c2a\u0c47\u0c30\u0c41", "\u0c2e\u0c02\u0c21\u0c32\u0c02"], "rowcount": 18132}], "runningtime": "23.71"} | tewiki_p |
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"], "rowcount": 378}], "runningtime": "0.81"} | commonswiki |
Media count per user | Files uploaded per user | select row_number() over (order by uploaded_file_count) as "s.no",
CONCAT("[[User:",actor_name,"]]") as user_name,
COUNT(page_title) as uploaded_file_count,
CONCAT("[https://te.wikipedia.org/wiki/Special:Filelist/",REPLACE(actor_name, ' ', '_')," File list]") as filelist,
MAX(rev_timestamp) as latest_re... | {"resultsets": [{"headers": ["PT", "link"], "rowcount": 2}], "runningtime": "14.86"} | tewiki_p |
Media in category with uploader before specific time | Files uploaded per user | select
CONCAT("# [[User:",actor_name,"]]") as user_name,
CONCAT("[[File:",page_title,"]]") as file_name
from image
join page ON page_namespace=6 AND page_title=img_name
join revision ON rev_page = page_id AND rev_parent_id = 0
join actor ON actor_id=rev_actor
join categorylinks ON cl_from=page_id ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.21"} | tewiki_p |
Namespaces of mobile edits | null | SELECT page_namespace, COUNT(*) FROM change_tag
INNER JOIN revision on change_tag.ct_rev_id = revision.rev_id
INNER JOIN change_tag_def on change_tag.ct_tag_id = change_tag_def.ctd_id
INNER JOIN page on revision.rev_page = page.page_id
INNER JOIN actor on revision.rev_actor = actor.actor_id
WHERE ctd_name LIKE '%mobile... | {"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 7}, {"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 8}], "runningtime": "0.20"} | tawiki_p |
Find top Wikidata contributors 2022 | null | use wikidatawiki_p;
SELECT log_user, COUNT(*) AS c, user_name, user_real_name
FROM logging, wikidatawiki_p.user
WHERE log_timestamp >= "20220101000000"
AND log_user = user_id
GROUP BY log_user ORDER BY c DESC LIMIT 20; | {"resultsets": [{"headers": ["CONCAT(\"Category:\",page_title,\"\")"], "rowcount": 0}], "runningtime": "3.31"} | wikidatawiki_p |
Label/description/alias stats for 8th Schedule tongues | THIS QUERY NO LONGER WORKS--SEE https://www.wikidata.org/wiki/User:Mr._Ibrahem/Language_statistics_for_items INSTEAD!
(Had to split the query since it kept getting killed lately. The rest of the languages are tracked in query #31655.)
Thanks, Pasleim, for the original query! | use wikidatawiki_p;
SELECT CURRENT_DATE;
SELECT
term_entity_type,
term_language,
count(if(term_type = 'label',1,null)) as labels,
count(if(term_type = 'description',1,null)) as descriptions,
count(if(term_type = 'alias',1,null)) as aliases
FROM wb_terms
WHERE term_language IN (
'as', 'bn', 'gom', 'gom-... | {"resultsets": [{"headers": ["tl_title"], "rowcount": 76}], "runningtime": "1988.78"} | wikidatawiki |
Pages that don't have Albanian label at Wikidata | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), "Lsq", CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='sqwiki'
AND NOT EXISTS (
SELECT wbit_item_id FROM wbt_item_terms
INNER JOIN wbt_term_in_lang
ON wbtl_id = wbit_term_in_lang_id
INNER JOIN wbt_text_in_lang
ON wbxl_id = wbtl_... | {"resultsets": [{"headers": ["rev_id", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.07"} | wikidatawiki |
最短的極高/高重要度電子遊戲條目 (zhwiki) | For [[w:zh:WikiProject:电子游戏/里程碑/基础条目扩充挑战]] | SELECT
CONCAT('[[:', REPLACE(page.page_title, "_", " "), "]]") AS 條目,
page.page_len AS 長度
FROM
page AS temp
JOIN categorylinks ON (cl_to = "Top-importance physics articles" OR cl_to = "High-importance physics articles")
AND cl_type = 'page'
AND cl_from = temp.page_id
JOIN page ON page.page_title = temp.p... | {"resultsets": [{"headers": ["page_title", "actor_name", "comment_text", "rev_timestamp"], "rowcount": 11713}], "runningtime": "31.99"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.