title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 200}], "runningtime": "16.28"} | enwiki_p |
enWikiquote: Experimental: Potential untagged #SheSaid since 20221201 | This experimental query is designed to help identify some women's articles that are not tagged by .#SheSaid. It does this by looking at templates and categories related to women. This will miss some women articles that do not have such a template or article, and therefore a further sweep may be required. In general ... | SELECT
CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS "Potential untagged #SheSaid articles",
IF(ISNULL(pp_value),pp_value,CONCAT('[[:d:',pp_value,']]')) AS "Wikidata item",
actor_name AS "Creator",
CONCAT( MID(r.rev_timestamp,1,4),'-',MID(r.rev_timestamp,5,2),'-',MID(r.rev_timestamp,7,2),' ',
MID(r... | {"resultsets": [{"headers": ["count(distinct cat_id)"], "rowcount": 1}], "runningtime": "2.54"} | enwikiquote_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": ["img_name"], "rowcount": 3}], "runningtime": "0.05"} | eswiki |
Users on svwiki editing most unique days in 2022 | Users editing in the main namespace more than 300 unique days in 2021 on svwiki. | SELECT actor_name, COUNT(DISTINCT substring(rev_timestamp, 1, 8)) as days
FROM
revision
JOIN page ON rev_page = page_id
JOIN actor ON rev_actor = actor_id
WHERE
rev_timestamp like '2022%'
AND page_namespace= 0
GROUP BY actor_name
HAVING COUNT(DISTINCT substring(rev_timestamp, 1, 8)) > 300
ORDER BY days DESC | {"resultsets": [{"headers": ["ptrpt_page_id", "ptrp_created", "COUNT(*)"], "rowcount": 26}], "runningtime": "1.23"} | mlwiki_p |
New articles created by a User with category | null | USE trwiki_p;
/* SELECT COUNT (p.page_id) FROM revision r, page p
WHERE r.rev_parent_id = 0
AND p.page_namespace = 0
AND p.page_is_redirect = 0
AND r.rev_page = p.page_id
AND r.rev_actor = 4193345;
*/
SELECT CONCAT("# [[",p.page_title,"]]") AS Sayfa, /*r.rev_timestamp,*/ p.page_len AS Byte, c.cl_to AS Kategori ... | {"resultsets": [{"headers": ["\uc81c\ubaa9", "\ud06c\uae30", "\ub9c8\uc9c0\ub9c9\ud3b8\uc9d1\uc2dc\uac01", "\ub9c8\uc9c0\ub9c9\ud3b8\uc9d1\uc790"], "rowcount": 816}], "runningtime": "0.83"} | trwiki_p |
Test subst:#timel | null | select * from revision where rev_id in (69164680, 69185881) | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 95}], "runningtime": "0.70"} | plwiki |
Disambiguation pages in mainspace with no links to mainspace | null | SELECT page_title
FROM page
WHERE page_namespace = 0
AND page_id IN (
SELECT pp_page FROM page_props
WHERE pp_propname = 'disambiguation'
AND pp_page NOT IN (
SELECT pl_from FROM pagelinks WHERE pl_namespace = 0 and pl_from_namespace = 0
)
)
| {"resultsets": [{"headers": ["id", "language", "text"], "rowcount": 0}], "runningtime": "65.12"} | enwiki_p |
ويكيبيديا:إحصاءات العام/2022| أكثر مستخدمين إضافة للموسوعة | null | USE arwiki_p;
SELECT CONCAT("[[مستخدم:",actor_name,"|",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 revision rev
INNER JOIN actor on rev.rev_actor = actor_id
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
IN... | {"resultsets": [{"headers": ["logid", "title", "timestamp", "redirect", "last_edited"], "rowcount": 516}], "runningtime": "0.55"} | arwiki_p |
Identyfikatory znaczników | null | SELECT *
FROM change_tag_def
ORDER BY ctd_id; | {"resultsets": [{"headers": ["wbit_id", "wbit_item_id", "wbit_term_in_lang_id", "wbtl_id", "wbtl_type_id", "wbtl_text_in_lang_id", "wby_id", "wby_name", "wbxl_id", "wbxl_language", "wbxl_text_id", "wbx_id", "wbx_text"], "rowcount": 1}], "runningtime": "0.07"} | plwiki_p |
Sugerowane wstawienie ilustracji: wszystkie edycje vs wycofane | Zapytanie zlicza wszystkie edycje wykonane w 2022 roku, które zostały oznaczone znacznikiem "Zasugerowano edycję: dodanie ilustracji" 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_image := 155; -- Id znacznika "Zasugerowano edycję: dodanie ilustracji"
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 revi... | {"resultsets": [{"headers": ["wbpt_id", "wbpt_property_id", "wbpt_term_in_lang_id", "wbxl_id", "wbxl_language", "wbxl_text_id", "wbx_id", "wbx_text"], "rowcount": 10}], "runningtime": "0.05"} | plwiki_p |
ويكيبيديا:إحصاءات العام/2022| عدد المقالات لكل شهر | null | SELECT
DATE_FORMAT(r.rev_timestamp, '%Y-%m') as month,
COUNT(*) as page_count
FROM revision r
JOIN page p ON p.page_id = r.rev_page
WHERE p.page_namespace = 0 AND p.page_is_redirect = 0 AND r.rev_timestamp BETWEEN '20220101000000' AND '20221231235959' AND r.rev_parent_id = 0
GROUP BY month
ORDER BY month;
| {"resultsets": [{"headers": ["wbit_id", "wbit_item_id", "wbit_term_in_lang_id", "wbtl_id", "wbtl_type_id", "wbtl_text_in_lang_id", "wbxl_id", "wbxl_language", "wbxl_text_id", "wbx_id", "wbx_text", "wbpt_id", "wbpt_property_id", "wbpt_term_in_lang_id"], "rowcount": 2}], "runningtime": "0.07"} | arwiki_p |
Liczba edycji w plwikisource w 2022 roku | null | USE plwikisource_p;
SET @w:=0;
SELECT @w:=@w+1 AS 'Lp',/*`Użytkownik`,*/`Link`,`Liczba edycji`
FROM (SELECT user_name AS 'Użytkownik', CONCAT('[[Wikiskryba:',user_name,'|',user_name,']]') AS 'Link', COUNT(*) AS 'Liczba edycji'
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON actor_user=user_id JOIN page ON ... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 200}], "runningtime": "15.42"} | plwikisource |
Liczba edycji w przestrzeni Strona plwikisource w 2022 roku | null | USE plwikisource_p;
SET @w:=0;
SELECT @w:=@w+1 AS 'Lp',/*`Użytkownik`,*/`Link`,`Liczba edycji`
FROM (SELECT user_name AS 'Użytkownik', CONCAT('[[Wikiskryba:',user_name,'|',user_name,']]') AS 'Link', COUNT(*) AS 'Liczba edycji'
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON actor_user=user_id JOIN page ON ... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 4}], "runningtime": "45.34"} | plwikisource |
Liczba edycji w przestrzeni Strona plwikisource w latach 2013-2022 | null | USE plwikisource_p;
SET @w:=0;
SELECT @w:=@w+1 AS 'Lp',/*`Użytkownik`,*/`Link`,`Liczba edycji`
FROM (SELECT user_name AS 'Użytkownik', CONCAT('[[Wikiskryba:',user_name,'|',user_name,']]') AS 'Link', COUNT(*) AS 'Liczba edycji'
FROM actor JOIN revision ON rev_actor=actor_id JOIN user ON actor_user=user_id JOIN page ON ... | {"connection_id": 91189375} | plwikisource |
TOP reviewers pl 2022 | null | -- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as review_count_i
FRO... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 4}], "runningtime": "38.54"} | plwiki_p |
List of top priority math articles missing on idwiki | null | SELECT DISTINCT
page_title,
page_len
#ll_title
FROM
page, langlinks
WHERE
page_title in (
SELECT page_title AS member
FROM categorylinks LEFT JOIN page ON (cl_from = page_id)
WHERE cl_to = "Top-priority_mathematics_articles"
) # Judul halaman ada di Kategori
AND page... | {"resultsets": [{"headers": ["rc_user_text", "rc_title", "91_197_23_timestamp", "abc10_timestamp"], "rowcount": 225}], "runningtime": "0.76"} | mlwiki |
Daily deletions on plwiki (main namespace) | null | select
log_timestamp div 1000000 as day,
count(log_id) as deletions
from
logging
where
log_type = "delete" and
log_action = "delete" and
log_namespace = 0
group by
day
order by
day desc; | {"resultsets": [{"headers": ["file", "actor_name"], "rowcount": 3073}], "runningtime": "2.80"} | plwiki_p |
enWikiquote: Articles on Pages not connected to items list | New articles. on Articles on Pages not connected to items list. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable". The default sort order is date of creation descending.
One key use is identifying new art... | SELECT
CONCAT('"',
NVL((SELECT 'V'
WHERE EXISTS (SELECT 1
FROM templatelinks tm1
JOIN linktarget lt1 ON lt1.lt_id=tm1.tl_target_id
WHERE tm1.tl_from=page_id AND tm1.tl_from_namespace=0
... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 31}], "runningtime": "0.39"} | enwikiquote_p |
Sandboxes in use | null | select * from templatelinks join page on page_id=tl_from
join linktarget on lt_id=tl_target_id
where lt_namespace in (10,828)
and tl_from_namespace=0 and lt_title like "%/sandbox"
limit 750; | {"connection_id": 62403330} | mlwiki_p |
تعديلات ذات ملخص تعديل محدد | null | use arwiki_p;
select concat("[[",page_title,"]]"), concat("[[:en:",(select ll_title from langlinks
where ll_from = rev_page
and ll_lang = "en"
... | {"resultsets": [{"headers": ["logid", "title", "timestamp", "redirect", "last_edited"], "rowcount": 621}], "runningtime": "0.61"} | arwiki_p |
jawiki sock blocks | null | SELECT
COUNT(CASE WHEN comment_text REGEXP '.*sockpuppet.*' THEN 1 END) AS sockpuppet_blocks,
COUNT(CASE WHEN NOT comment_text REGEXP '.*sockpuppet.*' THEN 1 END) AS other_blocks
FROM
user
JOIN ipblocks ON user_id = ipb_user
JOIN comment ON ipb_reason_id = comment_id
WHERE
ipb_expiry = 'infinity' | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 200}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 200}], "runningtime": "3.88"} | jawiki |
jawiki blocked users | null | SELECT
COUNT(CASE WHEN ipb_expiry >= 20230104235959 THEN 1 END) AS time_bound_blocked,
COUNT(CASE WHEN ipb_expiry = 'infinity' THEN 1 END) AS infinitely_blocked_all,
COUNT(CASE WHEN ipb_expiry = 'infinity' AND comment_text REGEXP '.*sockpuppet.*' THEN 1 END) AS infinitely_blocked_sockpuppets,
COUNT(CASE... | {"resultsets": [{"headers": ["pl_title", "COUNT(*)"], "rowcount": 3}], "runningtime": "2.52"} | jawiki |
tlWikiquote: All new articles the past two weeks | New articles. on Tagalog WikiQuote from the last few weeks. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable"
The latest version leverages the current date through the NOW() function and is set to examine... | SELECT /*Not good enought yes - needs page & reivions into the query below*/
(SELECT '#SheSaid' WHERE EXISTS(SELECT 'ọ'
FROM comment_revision
JOIN revision x ON x.rev_comment_id=comment_id
WHERE x.rev_page=page_id... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 300}], "runningtime": "0.36"} | tlwikiquote_p |
deWikiquote: #SheSaid tagged new articles (01-Oct-22 : 31-Dec-22) | New #SheSaid WikiQuote 2022 campaign articles. on German WikiQuote from Oct 1st 2022 till 31 Dec 2022. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable"
The last length size (in the #SheSaid campaign perio... | SELECT
CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS "New WikiQuote #SheSaid article",
actor_name AS "Creator",
CONCAT( MID(rev_timestamp,1,4),'-',MID(rev_timestamp,5,2),'-',MID(rev_timestamp,7,2),' ',
MID(rev_timestamp,9,2),':',MID(rev_timestamp,11,2),':',MID(rev_timestamp,13,2)) AS "Date created",
... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "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"],... | dewikiquote_p |
deWikiquote: #SheSaid tagged updated articles (01-Oct-22 : 31-Dec-22) | This is related to a query for new #SheSaid WikiQuote 2022 campaign articles on German WikiQuote from Oct 1st 2022 till 31 Dec 2022 and lists individual articles that identify as having been modified in the campaign period. This query looks at mainspaces article only and precisely considers the articles that have a #... | SELECT
CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS "WikiQuote updated article in #SheSaid 2022",
rvmax.rev_len - NVL(rvprior.rev_len,0) "Campaign size increase",
rvmax.rev_len "Current size",
CONCAT( MID(rvmax.rev_timestamp,1,4),'-',MID(rvmax.rev_timestamp,5,2),'-',MID(rvmax.rev_timestamp,7,2),' ',
... | {"connection_id": 92273341} | dewikiquote_p |
deWikiquote: All new articles the past two weeks | New articles. on German WikiQuote from the last few weeks. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable"
The latest version leverages the current date through the NOW() function and is set to examines... | SELECT /*Not good enought yes - needs page & reivions into the query below*/
(SELECT '#SheSaid' WHERE EXISTS(SELECT 'ọ'
FROM comment_revision
JOIN revision x ON x.rev_comment_id=comment_id
WHERE x.rev_page=page_id... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "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"],... | dewikiquote_p |
incubator things | null | select page_title from page where page_namespace=0 and page_is_redirect=0 and page_id not in(select cl_from from categorylinks where cl_to like "W_/__" or cl_to like "W_/___"); | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "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"],... | incubatorwiki_p |
Finals | Titles with "(The xxx song)" | select page_title from page where page_namespace=0
and (page_title like '%_Finals')
and page_is_redirect=0
| {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 30}], "runningtime": "0.08"} | enwiki |
WS: RC bug (missing changes) | null | select * from recentchanges where rc_timestamp > 20230105001059 AND rc_timestamp < 20230105050059 and rc_bot<>1
and rc_title like 'Wikiprojekt_Proofread_%'
-- oldid expected: 3326443 | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "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"],... | plwikisource |
Twiki:User-wise new articles count | null | use tewiki_p;
select substr(rev_timestamp,1,4) as yeard,actor_name,count(actor_name)
from
revision,page,actor
where
page_id=rev_page
and page_namespace=0
and page_is_redirect=0
and page_id not in (select pp_page from page_props where pp_propname="disambiguation")
and actor_id=rev_actor
and rev... | {"connection_id": 92349180} | tewiki |
TWP articles that link to disambiguation pages | Links to disambiguation pages on the English Wikipedia from articles managed by WikiProject Trains. Derived from https://quarry.wmcloud.org/query/1632. | SELECT page1.page_title AS source_title, concat('https://en.wikipedia.org/wiki/', page1.page_title) as source_url, page2.page_title AS target_title, concat('https://en.wikipedia.org/wiki/', page2.page_title) as target_url
FROM page as page1
JOIN pagelinks
ON page1.page_id = pagelinks.pl_from
AN... | {"resultsets": [{"headers": ["rc_title", "rc_timestamp", "rc_this_oldid", "rc_last_oldid", "actor_name", "rc_comment", "rc_old_len", "rc_new_len", "rc_new_len-rc_old_len"], "rowcount": 337}], "runningtime": "0.45"} | enwiki_p |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"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": 10}], "runningtime": "0.07"} | enwiki |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214'
and rc_timestamp < '20230108'
group by rc_actor
or... | {"resultsets": [{"headers": ["cl_from", "page_id"], "rowcount": 100}], "runningtime": "0.13"} | wikidatawiki_p |
المستخدمون الـ 5 الأوائل في إضافة نصوص|ويكيبيديا:مستخدمو الأسبوع الأكثر نشاطا | null | SELECT actor_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 revision rev
INNER JOIN actor on rev.rev_actor = actor_id
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
INNER JOIN comment_revision on rev.rev_comment_id = comment_id
JOIN p... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1715}], "runningtime": "769.73"} | arwiki_p |
أنشط 5 مستخدمين بين المستخدمين الواعدين|ويكيبيديا:مستخدمو الأسبوع الأكثر نشاطا | null | USE arwiki_p;
SELECT
CONCAT("[[مستخدم:",actor_name,"|",actor_name,"]]") AS "المستخدم",
SUM(CASE WHEN rev_timestamp BETWEEN 20220103000000 AND 20220110000000 THEN 1 ELSE 0 END) AS recent_user_editcount
FROM user
INNER JOIN revision
JOIN actor ON actor_id = rev_actor
INNER JOIN page
ON page.page_id = revision.rev_page
WH... | {"resultsets": [{"headers": ["cl_from", "page_id"], "rowcount": 100}], "runningtime": "0.13"} | arwiki_p |
latest enwikisource edits not showing up on recent changes | null | select
page_title,
page_namespace,
rev_id,
rev_timestamp
from revision
inner join page on page_id = rev_page
left join recentchanges on rc_this_oldid = rev_id
where
rev_timestamp > 20221208000000 and
rc_id is null
order by
rev_timestamp desc; | {"resultsets": [{"headers": ["sum(user_editcount)"], "rowcount": 1}], "runningtime": "0.05"} | enwikisource_p |
latest plwiki edits not showing up on recent changes | null | select
page_title,
page_namespace,
rev_id,
rev_timestamp
from revision
inner join page on page_id = rev_page
left join recentchanges on rc_this_oldid = rev_id
where
rev_timestamp > 20221208000000 and
rc_id is null
order by
rev_timestamp desc; | {"resultsets": [{"headers": ["Tables_in_eswiki_p"], "rowcount": 93}], "runningtime": "0.14"} | plwiki_p |
Latest plwiktionary edits not showing up on recent changes | null | select
page_title,
page_namespace,
rev_id,
rev_timestamp
from revision
inner join page on page_id = rev_page
left join recentchanges on rc_this_oldid = rev_id
where
rev_timestamp > 20221207000000 and
rc_id is null
order by
rev_timestamp desc; | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 12}], "runningtime": "0.07"} | plwiktionary_p |
itWikiquote: #SheSaid tagged new articles (20-Oct-22 : 20-Dec-22) | New #SheSaid WikiQuote 2022 campaign articles. on Italian WikiQuote from Oct 20th 2022 till Dec 20th 2022. This is optimised for download as a wikitable and is even better when changed to a sortable wikitable by changing class="wikitable" to class="wikitable sortable" | SELECT
CONCAT('[[',REPLACE(page_title,'_',' '),']]') AS "New WikiQuote #SheSaid article",
actor_name AS "Creator",
CONCAT( MID(rev_timestamp,1,4),'-',MID(rev_timestamp,5,2),'-',MID(rev_timestamp,7,2),' ',
MID(rev_timestamp,9,2),':',MID(rev_timestamp,11,2),':',MID(rev_timestamp,13,2)) AS "Date created",
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 6}], "runningtime": "67.94"} | itwikiquote_p |
DjVus on English Wikipedia | null | SELECT concat("File:", img_name), img_timestamp FROM image
WHERE img_name RLIKE "\.([dD][jJ][vV])[uU]$"; | {"resultsets": [{"headers": ["logid", "title", "timestamp", "redirect", "last_edited"], "rowcount": 622}, {"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.72"} | enwiki |
all signpost articles that are redirects | null | SELECT page_title AS title, page_is_redirect AS rd FROM page
WHERE page_namespace = "4"
AND page_title LIKE "Wikipedia_Signpost/%%%%-%%-%%/%"
AND page_title NOT LIKE "Wikipedia_Signpost/%%%%-%%-%%/SPV"
AND page_is_redirect = "1"
ORDER BY page_title ASC; | {"resultsets": [{"headers": ["ref_child_id", "ref_parent_id"], "rowcount": 37971}], "runningtime": "31.79"} | enwiki_p |
Query all userbox templates | Query all user box pages | SELECT * FROM logging WHERE log_id > 12398465 && log_namespace = 10 && log_type = "create" && log_action = "create" && log_title LIKE "User\_%" | {"resultsets": [{"headers": ["actor_id", "count(*)"], "rowcount": 64}], "runningtime": "0.13"} | zhwiki |
Disambiguation pages that aren't disambig-class or tagged with WikiProject Disambiguation | The minimal fixes to get this working.
For [[WP:RAQ#Disambiguation pages with no WikiProject banner]] circa 25 August 2022. | SELECT Pa.page_title
FROM categorylinks
JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = cl_from
JOIN page Pt ON Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
WHERE cl_to = "All_disambiguation_pages"
AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Pt.page_id AND c... | {"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 13697}], "runningtime": "68.60"} | enwiki_p |
Disambiguation pages that aren't disambig-class or tagged with WikiProject Disambiguation | The minimal fixes to get this working.
For [[WP:RAQ#Disambiguation pages with no WikiProject banner]] circa 25 August 2022. | SELECT Pa.page_title
FROM categorylinks
JOIN page Pa ON Pa.page_namespace = 0 AND Pa.page_is_redirect = 0 AND Pa.page_id = cl_from
JOIN page Pt ON Pt.page_title = Pa.page_title AND Pt.page_namespace = 1
WHERE cl_to = "All_disambiguation_pages"
AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Pt.page_id AND c... | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "page_title", "page_id", "count(*)", "count(distinct(page_id))"], "rowcount": 29}], "runningtime": "0.53"} | enwiki_p |
blocks | 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
lower(cast(comment_text as CHAR)) RLIKE 'пароль'
ORDER BY ipb_timestamp DESC | {"resultsets": [{"headers": ["title"], "rowcount": 0}], "runningtime": "0.12"} | ruwiki_p |
all signpost pages (talk) | null | #Wikipedia:Signpost
SELECT page_title AS title FROM page
WHERE page_namespace = "5"
AND page_title LIKE "Signpost%"
ORDER BY page_title ASC;
# Wikipedia:Wikipedia Signpost
SELECT page_title AS title FROM page
WHERE page_namespace = "5"
AND page_title LIKE "Wikipedia_Signpost%"
ORDER BY page_title ASC;
# Template:Signpo... | {"resultsets": [{"headers": ["page_id", "wb_item", "page_title", "page_len", "iw_count", "rev_count", "rev_first", "rev_first_user", "rev_last", "rev_last_user"], "rowcount": 242450}], "runningtime": "269.03"} | 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)');
| {"connection_id": 62936580} | eswiki |
Get latest rc_id | null | SELECT rc_id
FROM recentchanges
ORDER BY rc_id DESC
LIMIT 1 | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 533}], "runningtime": "5.80"} | zhwiki_p |
Query new userboxes | null | SELECT *
FROM recentchanges
WHERE rc_id > 155007332 AND rc_namespace = 10 AND rc_new = 1 AND rc_title LIKE "User\_%"
ORDER BY rc_id ASC | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.05"} | zhwiki_p |
Thanks for 2020 frwiki per user | null | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20220000000000" AND
log_timestamp <= "20230000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["T\u00edtiulo p\u00e1gina", "Fecha de creaci\u00f3n", "Tama\u00f1o", "Usuario"], "rowcount": 252}], "runningtime": "0.51"} | frwiki_p |
المستخدمون الـ5 الأوائل بعدد التعديلات|ويكيبيديا:مستخدمو الأسبوع الأكثر نشاطا | null | SELECT actor_name, COUNT(rev.rev_id) as edit_count
FROM revision rev
INNER JOIN actor on rev.rev_actor = actor_id
INNER JOIN comment_revision on rev.rev_comment_id = comment_id
JOIN page ON page_id = rev.rev_page
AND comment_text NOT LIKE ucase (_utf8"%[[ميدياويكي:Gadget-Cat-a-lot|تعديل تصنيفات]]%") collate utf8_genera... | {"resultsets": [{"headers": ["cl_to", "wikipage"], "rowcount": 4}], "runningtime": "0.06"} | arwiki_p |
أنشط 5 مستخدمين بين المستخدمين الواعدين|ويكيبيديا:مستخدمو الأسبوع الأكثر نشاطا | null | SELECT actor_name, COUNT(revision.rev_id) AS recent_user_editcount
FROM user
INNER JOIN actor ON user_id = actor_user
INNER JOIN revision ON rev_actor = actor_id
INNER JOIN page ON page.page_id = revision.rev_page
WHERE rev_timestamp BETWEEN 20230102000000 AND 20230108000000
AND user_registration BETWEEN 20221202000000... | {"resultsets": [{"headers": ["cl_to", "wikipage"], "rowcount": 0}], "runningtime": "0.04"} | arwiki_p |
10 most edited pages on svwiki 2022 | Main namespace edits only | SELECT page_title, COUNT(rev_id) AS edits
FROM
revision
JOIN page ON rev_page = page_id
WHERE
rev_timestamp like '2022%'
AND page_namespace= 0
GROUP BY page_title
ORDER BY edits DESC
LIMIT 10 | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.53"} | svwiki_p |
self_redirect | null | SELECT
CONCAT(
CASE p.page_namespace
WHEN 0 THEN 'Main'
WHEN 1 THEN 'Talk'
WHEN 2 THEN 'User'
WHEN 3 THEN 'User talk'
WHEN 4 THEN 'Wikipedia'
WHEN 5 THEN 'Wikipedia talk'
WHEN 6 THEN 'File'
WHEN 7 THEN 'File talk'
WHEN 8 THEN 'MediaWiki'
WHEN 9 THEN 'Med... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 3263}], "runningtime": "26.18"} | ckbwiki_p |
Commons files re-created after previous F10 deletion | null | SELECT DISTINCT CONCAT('https://commons.wikimedia.org/wiki/File:', rc.rc_title) AS 'File', TIMESTAMP(rc.rc_timestamp) AS 'Re-created at'
FROM recentchanges_userindex rc
INNER JOIN logging_logindex l ON l.log_type = 'delete' AND l.log_action = 'delete' AND rc.rc_title = l.log_title AND rc.rc_namespace = l.log_namespace
... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 467}], "runningtime": "222.01"} | commonswiki_p |
enwiki: Pages re-created after previous U5 or G11 deletion | null | WITH sock_template AS (
SELECT tl.tl_from FROM
enwiki_p.templatelinks tl
WHERE tl.tl_target_id IN (32197, 277052, 282063, 115252, 1968835)
)
SELECT DISTINCT CONCAT('https://en.wikipedia.org/wiki/', CASE WHEN rc.rc_namespace = 2 THEN 'User:' WHEN rc.rc_namespace = 118 THEN 'Draft:' ELSE '' END, rc.rc_title) AS 'P... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 362}], "runningtime": "169.27"} | enwiki_p |
ckb: User pages of IPs with no contributions or logs | null | SELECT CONCAT('https://ary.wikipedia.org/wiki/User', CASE WHEN p.page_namespace = 3 THEN '_talk:' ELSE ':' END, p.page_title) AS URL
FROM arywiki_p.page p
LEFT JOIN arywiki_p.actor a ON a.actor_user IS NULL AND a.actor_name = SUBSTRING_INDEX(p.page_title, '/', 1)
WHERE p.page_namespace = 2
AND p.page_is_redirect = 0
AN... | {"resultsets": [{"headers": ["page_title", "page_namespace", "ptrp_page_id", "ptrp_reviewed", "ptrp_deleted", "ptrp_created", "ptrp_tags_updated", "ptrp_reviewed_updated", "ptrp_last_reviewed_by"], "rowcount": 104}], "runningtime": "0.47"} | arywiki_p |
ckb: Pages of non-existent users that redirect outside userspace | null | SELECT CONCAT('https://ckb.wikipedia.org/w/index.php?title=User', CASE WHEN p.page_namespace = 3 THEN '_talk:' ELSE ':' END, p.page_title, '&redirect=no') AS URL
FROM ckbwiki_p.page p
LEFT JOIN ckbwiki_p.user u ON REPLACE(SUBSTRING_INDEX(p.page_title, '/', 1), '_', ' ') = u.user_name
INNER JOIN ckbwiki_p.pagelinks pl O... | {"resultsets": [{"headers": ["page_title", "page_namespace", "page_is_redirect"], "rowcount": 3}], "runningtime": "1.15"} | ckbwiki_p |
new test | null | WITH sock_template AS (
SELECT tl.tl_from FROM
arwiki_p.templatelinks tl
WHERE tl.tl_target_id IN (32197, 277052, 282063, 115252, 1968835)
)
SELECT DISTINCT CONCAT('https://ar.wikipedia.org/wiki/', CASE WHEN rc.rc_namespace = 2 THEN 'User:' WHEN rc.rc_namespace = 118 THEN 'Draft:' ELSE '' END, rc.rc_title) AS 'P... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 33}], "runningtime": "0.24"} | arwiki_p |
Userspace pages of non-existent users (no talk, no subpages) | null | SELECT CONCAT('https://en.wikipedia.org/wiki/User:', p.page_title) AS URL
FROM enwiki_p.page p
LEFT JOIN enwiki_p.user u ON REPLACE(p.page_title, '_', ' ') = u.user_name
WHERE p.page_namespace = 2
AND u.user_id IS NULL
AND p.page_is_redirect = 0
AND NOT IS_IPV4(p.page_title) -- Exclude IPv4
AND NOT IS_IPV6(p.page_title... | {"resultsets": [{"headers": ["page_title", "pl_title"], "rowcount": 774}], "runningtime": "3.45"} | enwiki_p |
Linked misspellings | null | SELECT
p1.page_title AS 'Page',
COUNT(*) AS 'Count'
FROM
page AS p1
JOIN categorylinks ON p1.page_id = cl_from
JOIN pagelinks ON p1.page_title = pl_title
AND pl_namespace = 0
JOIN page AS p2 ON pl_from = p2.page_id
AND p2.page_namespace = 0
WHERE
p1.page_namespace = 0
AND p1.page_is_redirect = 1
A... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 38}], "runningtime": "42.93"} | enwiki_p |
Most thanked 2022 | Most thanked editors on the English Wikipedia in 2022 | SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20230000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["user_talk"], "rowcount": 26}], "runningtime": "27.51"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 195}], "runningtime": "24.29"} | enwiki_p |
test | null | SELECT page.page_title
FROM page
JOIN categorylinks AS cl ON cl.cl_to = page.page_title
WHERE cl.cl_to NOT IN (SELECT cl2.cl_to FROM categorylinks AS cl2 WHERE cl2.cl_type = 'subcat')
AND page.page_namespace = 14
GROUP BY cl.cl_to
HAVING COUNT(*) = 1 | {"connection_id": 93222543} | arwiki_p |
Thanked people for 2022 frwiki | Most thanked people in 2022 on frwiki
Blame Mz7, SQL, and stwalkerster for this | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20220000000000" AND
log_timestamp <= "20230000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["user_talk"], "rowcount": 3036}], "runningtime": "1299.09"} | frwiki |
A user's nth edit | null | SELECT CONCAT("https://az.wikipedia.org/wiki/X%C3%BCsusi:Diff/", rev_id)
FROM revision
INNER JOIN actor ON rev_actor = actor_id
WHERE actor_name = "Wiki6421"
ORDER BY rev_timestamp ASC
LIMIT 100
OFFSET 399
| {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 1}], "runningtime": "0.06"} | azwiki_p |
wikidata: items deleted by username | null | SELECT
DISTINCT log_title
FROM
logging_userindex
JOIN actor_logging ON log_actor=actor_id
WHERE
actor_name='username'
AND log_namespace=0
AND log_type='delete'
AND log_action='delete'
AND log_title NOT IN (SELECT page_title FROM page WHERE page_namespace=0)
ORDER BY
CAST(SUBSTRING(log_title, 1) AS i... | {"connection_id": 93278677} | wikidatawiki |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214'
and rc_timestamp < '20230108'
group by rc_actor
or... | {"resultsets": [{"headers": ["title"], "rowcount": 0}], "runningtime": "0.10"} | wikidatawiki_p |
Files on sr.wiki NOT in spec categories | null | #USE srwiki_p;
SELECT
CONCAT("# [[:File:", img_name, "]]") AS file, actor_name
FROM image
JOIN actor_image ON img_actor = actor_id #
JOIN page
ON page_namespace=6
AND page_title = img_name
AND page_is_redirect=0
AND NOT EXISTS(
SELECT * FROM categorylinks
WHERE page_id=cl_from
AND (cl_to="Сви_слободни_медији"
#... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1987}], "runningtime": "865.83"} | srwiki_p |
WStaமொஹஞ்சதரோஅல்லதுசிந்துவெளிநாகரிகம் | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["ipb_address", "ipb_by_actor", "ipb_timestamp", "ipb_expiry"], "rowcount": 0}], "runningtime": "0.05"} | tawikisource_p |
Recently added statements using property Wikidata | null | SELECT pagelinks.pl_from_namespace, page.page_title, pagelinks.pl_namespace, pagelinks.pl_title
FROM pagelinks
INNER JOIN page
ON pagelinks.pl_from = page.page_id
WHERE pl_namespace = 120 AND pl_title = 'P9831'
LIMIT 10; | {"connection_id": 93763607} | wikidatawiki_p |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214'
and rc_timestamp < '20230110'
group by rc_actor
or... | {"resultsets": [{"headers": ["from", "to"], "rowcount": 11}], "runningtime": "1.13"} | wikidatawiki_p |
pdf upload count by year | Number of files with the .pdf extension uploaded every year.
For [[WT:CSD#Proposal: Remove F10]] circa 7 July 2021.
Forked from Cryptic to rerun för [[WT:CSD#Deprecating_F10]] circa 9 January 2021. | SELECT LEFT(log_timestamp, 4) AS year, COUNT(*)
FROM logging
WHERE log_type = 'upload' AND log_action = 'upload'
AND log_title RLIKE '\.[pP][dD][fF]$'
GROUP BY LEFT(log_timestamp, 4); | {"resultsets": [{"headers": ["page_title", "page_namespace", "rev_timestamp", "comment_text"], "rowcount": 18}], "runningtime": "3.94"} | enwiki |
Userspace pages of non-existent users (no talk, no subpages) | null | SELECT CONCAT('https://en.wikipedia.org/wiki/User:', p.page_title) AS URL
FROM enwiki_p.page p
LEFT JOIN enwiki_p.user u ON REPLACE(p.page_title, '_', ' ') = u.user_name
WHERE p.page_namespace = 2
AND u.user_id IS NULL
AND p.page_is_redirect = 0
AND NOT IS_IPV4(p.page_title) -- Exclude IPv4
AND NOT IS_IPV6(p.page_title... | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.00"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 92}], "runningtime": "26.84"} | enwiki_p |
heuristic to find wrong coordinates and / or wrong iso-codes | Find coordinates by iso-code that are far away from the average center of all coordinates with the same iso-code and sort them by descending distance from that center. This is a heuristic to find wrong coordinates and / or wrong iso-codes. If you get to the first point already inside the iso-code area, it is unlikely t... | set @ns:=0;
#use commonswiki_p;set @ns:=6;
set @iso1:='GR';
#set @iso2:='' or code
set @iso2:='29';
/*
'XA', 'XI', 'XN', 'XO', 'XP', 'XS',
'AE','AF','AX','AL','AS','AD','AO','AI','AQ','AG','AR','AM','AW','AU','AT','AZ',
'BS','BH','BD','BB','BL','BY','BE','BZ','BJ','BM','BT','BO','BQ','BA','BW','BV','BR','BN','BG... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 13}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 6}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.17"} | elwiki_p |
Most thanked 2022 | Most thanked editors on the English Wikipedia in 2022 | SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20220000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"headers": ["CONCAT(page_title)"], "rowcount": 0}], "runningtime": "0.18"} | enwiki_p |
IP blocks for 123.*.*.* | null | SET @address = "49.206.1%";
SELECT ipb_address, ipb_timestamp, ipb_expiry, actor_name, comment_text
FROM ipblocks
JOIN `comment` ON comment_id=ipb_reason_id
JOIN actor ON actor_id=ipb_by_actor
WHERE ipb_address LIKE @address AND ipb_user = 0
ORDER BY ipb_range_start, ipb_range_end DESC, ipb_timestamp | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "6.78"} | enwiki_p |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214'
and rc_timestamp < '20230108'
group by rc_actor
or... | {"resultsets": [{"headers": ["page_title"], "rowcount": 22}], "runningtime": "0.15"} | wikidatawiki_p |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214'
and rc_timestamp < '20230108'
group by rc_actor
or... | {"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "3.49"} | wikidatawiki_p |
Wikidata edits with Czech-Authorities-Sync | null | USE wikidatawiki_p;
SELECT rev_id, actor_name, page_title, comment_text
FROM change_tag
JOIN revision ON rev_id=ct_rev_id
JOIN actor ON actor_id=rev_actor
JOIN comment ON comment_id=rev_comment_id
JOIN page ON page_id=rev_page WHERE ct_tag_id=(
SELECT ctd_id
FROM change_tag_def
WHERE ctd_name='Czech-Authorities-... | {"resultsets": [{"headers": ["title", "length"], "rowcount": 3648}], "runningtime": "3.24"} | wikidatawiki |
Count of user's NPP reviews, all time total | null | SELECT COUNT(*) AS review_count, user_name
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
JOIN user ON actor_user = user_id
WHERE log_type = 'pagetriage-curation'
AND log_action = 'reviewed'
AND user_name = 'MB'
GROUP BY log_actor
ORDER BY review_count DESC, user_name ASC | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 2}], "runningtime": "82.38"} | enwiki |
tests | null | SELECT log_title
FROM logging
JOIN actor
ON actor.actor_id = logging.log_actor
JOIN comment
ON comment.comment_id = logging.log_comment_id
WHERE actor.actor_name = 'LuchoCR'
AND logging.log_type = 'block'
AND logging.log_timestamp >= 20230109194400
AND comment.comment_text LIKE '%Abuso a largo plazo%';
| {"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.10"} | eswiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 400}], "runningtime": "18.05"} | enwiki_p |
Mainspace page titles containing non-ASCII hyphen (U+2010) | This character may not display properly in all browsers, so it should be replaced with dash or hyphen. | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('[[', replace(page_title, '_', ' '), ']]') as 'Page title', -- Format as wikilink, replace _ with space
case when page_is_redirect then 'Yes' else 'No' end as 'Is redirect?' -- Is the page is a redirect or not
from page
where page... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 400}], "runningtime": "21.11"} | enwiki_p |
Mainspace page titles containing Zero-width joiner | null | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('[[', replace(page_title, '_', ' '), ']]') as 'Page title', -- Format as wikilink, replace _ with space
case when page_is_redirect then 'Yes' else 'No' end as 'Is redirect?' -- Is the page is a redirect or not
from page
where page... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 400}], "runningtime": "21.64"} | enwiki_p |
Mainspace page titles containing Zero-width non-joiner | null | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('[[', replace(page_title, '_', ' '), ']]') as 'Page title', -- Format as wikilink, replace _ with space
case when page_is_redirect then 'Yes' else 'No' end as 'Is redirect?' -- Is the page is a redirect or not
from page
where page... | {"resultsets": [{"headers": ["user_name", "user_registration"], "rowcount": 117}], "runningtime": "41.58"} | enwiki_p |
Mainspace page titles containing combining grapheme joiner (U+034F) | null | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
CONCAT('[[', replace(page_title, '_', ' '), ']]') as 'Page title', -- Format as wikilink, replace _ with space
case when page_is_redirect then 'Yes' else 'No' end as 'Is redirect?' -- Is the page is a redirect or not
from page
where page... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1302}], "runningtime": "892.99"} | enwiki_p |
Wikidata Latam Contest Results | null | use wikidatawiki_p;
select count(rc_id) as edits, actor_name as user
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where comment_text like '%The Distributed Game (83)%'
and rc_timestamp > '20221214 03:00'
and rc_timestamp < '20230109 03:00'
group by... | {"resultsets": [{"headers": ["MAX(rev_id)", "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.06"} | wikidatawiki_p |
CSD U2 worthy pages | Forked from https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Ownerless_pages_in_the_user_space/Configuration and updated to work with changed database schema | select ROW_NUMBER() OVER(order by page_title) num, -- get row number
case when page_namespace = 2 then CONCAT('[[User:', replace(page_title, '_', ' '), ']]') -- Format as wikilink, check whether it is in User namespace
else CONCAT('[[User talk:', replace(page_title, '_', ' '), ']]') -- Format as wiki... | {"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": 10}], "runningtime": "0.07"} | enwiki_p |
Early admins | Find thanks | select user_name, user_registration from user, user_groups where user_registration < "20030615" AND ug_user=user_id and ug_group="sysop"
order by user_registration asc
limit 250 | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 109}], "runningtime": "14.68"} | enwiki |
Wikispecies reference templates | null | SELECT page_id, page_title, page_latest
FROM page
INNER JOIN categorylinks ON cl_from = page_id
WHERE cl_to = "Reference_templates"
AND page_namespace = 10 | {"resultsets": [{"headers": ["MAX(rev_id)", "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.06"} | specieswiki_p |
Earlier admins | Find thanks | select user_name, user_registration from user, user_groups where user_registration < "20030325" AND ug_user=user_id and ug_group="sysop"
order by user_registration asc
limit 250 | {"resultsets": [{"headers": ["AAAA", "Total"], "rowcount": 9}], "runningtime": "0.83"} | enwiki |
mlwiki Articles without content category | Pages without any categories or with only maintenance categories.
Query breakdown:
1. outer query = a list of article pages that are not nominated for deletion and older than 24 hours
2. hc = a list of maintenance categories, meaning the titles of category pages with the __HIDDENCAT__ or __EXPECTUNUSEDCATEGORY__ prope... | SELECT page_title, rev_timestamp, (SELECT pp_value FROM page_props WHERE pp_page=page_id AND pp_propname='wikibase_item') AS Wikidata
FROM page
INNER JOIN (SELECT DISTINCT rc_cur_id FROM recentchanges WHERE rc_type IN (0,1) AND rc_namespace=0) rc ON rc_cur_id=page_id
INNER JOIN revision ON (
rev_parent_id=0 AND pa... | {"resultsets": [{"headers": ["AAAA", "Total"], "rowcount": 9}], "runningtime": "17.59"} | mlwiki |
eswiki articles with less than 1500 chars | null | select concat('https://es.wikipedia.org/wiki/',page_title) from page where page_namespace=0 and page_len<1500 and not page_is_redirect; | {"resultsets": [{"headers": ["user_talk"], "rowcount": 2679}], "runningtime": "1205.95"} | eswiki |
elwiki:Most frequent unexisting links | null | USE elwiki_p;
SELECT pl_title, COUNT(pl_title) AS counting
FROM pagelinks
INNER JOIN page ON pl_from = page_id AND pl_from_namespace = 0 AND pl_namespace = 0
WHERE
NOT EXISTS
(SELECT p1.page_title FROM page AS p1
WHERE p1.page_title = pl_title
AND pl_namespace = 0
AND p1.page_namespace = 0)
GROUP BY pl_title
HAVING co... | {"resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 24}], "runningtime": "0.70"} | elwiki_p |
count of eswiki articles with less than 1500 chars | null | select count(*) from page where page_namespace=0 and page_len<1500 and not page_is_redirect; | {"resultsets": [{"headers": ["user_name", "user_registration"], "rowcount": 5}], "runningtime": "32.56"} | eswiki |
Wikidata edits with Czech-Authorities-Sync | null | USE wikidatawiki_p;
SELECT rev_id, actor_name, page_title, comment_text, rev_timestamp
FROM change_tag
JOIN revision ON rev_id=ct_rev_id
JOIN actor ON actor_id=rev_actor
JOIN comment ON comment_id=rev_comment_id
JOIN page ON page_id=rev_page WHERE ct_tag_id=(
SELECT ctd_id
FROM change_tag_def
WHERE ctd_name='Cze... | {"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.21"} | wikidatawiki |
Wikispecies reference templates with sitelinks | null | SELECT page_id, pp_value
FROM page
INNER JOIN categorylinks ON cl_from = page_id
INNER JOIN page_props ON pp_page = page_id
WHERE cl_to = "Reference_templates"
AND page_namespace = 10
AND pp_propname = "wikibase_item" | {"resultsets": [{"headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 17}, {"headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 105}], "runningtime": "14.20"} | specieswiki_p |
Creation with u1 | null | SELECT log_title, log_timestamp, comment_text
FROM logging_userindex
JOIN comment_logging ON log_comment_id = comment_id
WHERE
log_namespace = 2
AND log_type = "create"
AND log_action = "create"
AND comment_text LIKE "%{{db-u1}}%"
ORDER BY log_timestamp DESC | {"resultsets": [{"headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}], "runningtime": "20.10"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.