title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 113}], "runningtime": "27.35"} | wikidatawiki_p |
audio files that are videos | null | SELECT img_name,img_size,img_width,img_height,img_media_type,img_major_mime,img_minor_mime,img_metadata
FROM `image`
WHERE ( img_major_mime = 'audio' AND img_media_type = 'AUDIO' AND img_width > 0); | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 9}], "runningtime": "30.85"} | commonswiki_p |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_... | wikidatawiki_p |
audio files that are videos | null | SELECT img_name,img_size,img_width,img_height,img_media_type,img_major_mime,img_minor_mime,img_metadata
FROM `image`
WHERE ( img_major_mime = 'video' AND img_media_type = 'VIDEO' AND img_width > 0); | {"resultsets": [{"headers": ["page_title", "$link"], "rowcount": 662}], "runningtime": "7.54"} | commonswiki_p |
Overall ratio of declared genders | For [[w:User talk:Cryptic#Curious about a stat]] circa 12 Jun 2019. | SELECT up_value, COUNT(*)
FROM user_properties
WHERE up_property='gender'
GROUP BY up_value; | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 146}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 80}], "runningtime": "2.66"} | englishwikipedia |
Admin stats experiment | Just figuring some stuff out | SELECT user_name, user_editcount
FROM user
LEFT JOIN user_groups ON ug_user = user_id
WHERE ug_group = 'sysop'
JOIN logging ON log_page = user_id
/*LEFT JOIN logging ON log_title = user_name
WHERE log_type = 'rights'
AND log_action = 'rights' */
GROUP BY user_name; | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 11}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 11}], "runningtime": "2.48"} | enwiki_p |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 216}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 60}], "runningtime": "2.53"} | wikidatawiki_p |
উইকিপিডিয়ার শীর্ষ সম্পাদকগণ | ৩০ জানু ২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন। | SET @counter:=0;
SELECT
CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং,
CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}], "runningtime": "0.15"} | bnwiki |
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": ["actor_name", "num"], "rowcount": 437}], "runningtime": "11.47"} | enwiki |
All UK marquess-related AfD discussions | null | SELECT page_id, page_title, page_len
FROM page
WHERE page_namespace='4'
AND page_title LIKE 'Articles_for_deletion/%Marquess%' | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 35}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 27}], "runningtime": "2.53"} | enwiki_p |
(Updated March 25 2022) zhwiki users having over 500 edits + all bots, sorted by edit count | null | SELECT ss_total_edits FROM site_stats;
SELECT SUM(user_editcount) FROM user
WHERE user_editcount < 500;
SELECT user.user_id AS user_id, user.user_name AS user_name, user.user_editcount AS user_editcount,
CASE
WHEN (ug.user_admin > 0 OR ue.user_admin > 0) THEN 1
ELSE 0
END AS user_admin,
CASE
WHEN (ug.user_bot ... | {"resultsets": [{"headers": ["page_title", "title_len"], "rowcount": 36}], "runningtime": "17.64"} | zhwiki_p |
All Earl-related AfD discussions | null | SELECT page_id, page_title, page_len
FROM page
WHERE page_namespace='4'
AND page_title LIKE 'Articles_for_deletion/%Earl_of%' | {"resultsets": [{"headers": ["page_title", "title_len"], "rowcount": 500}], "runningtime": "23.16"} | enwiki_p |
last edit | null | SELECT actor_name, DATE_FORMAT(rev_timestamp,'%Y-%m-%d %H:%I:%S') as timestamp, page_title
FROM revision_userindex JOIN page ON rev_page=page_id
JOIN actor ON `actor_id` = `rev_actor`
WHERE actor_name = 'Vexations'
ORDER BY rev_actor, rev_timestamp DESC
LIMIT 10; | {"resultsets": [{"headers": ["site_id", "site_global_key", "site_type", "site_group", "site_source", "site_language", "site_protocol", "site_domain", "site_data", "site_forward", "site_config"], "rowcount": 10}], "runningtime": "0.06"} | enwiki |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["img_name"], "rowcount": 8406}], "runningtime": "101.12"} | wikidatawiki_p |
Deletion rates of CX and non-CX articles for a wiki | For one wiki, shows how many articles were created using Content Translation (CX articles) and how frequently they were deleted, compared to articles created using other methods (non-CX articles). | SET @start_time = '20220101'; -- 1 Jan 2020
SET @end_time = '20220401'; -- 1 Jan 2021
SET @cx_tag_id = (
SELECT ctd_id
FROM change_tag_def
WHERE ctd_name = 'contenttranslation'
);
WITH nondeleted_new_articles AS (
SELECT
SUM(IF(ct_tag_id = @cx_tag_id, 1, 0)) AS cx,
SUM(IF(ct_tag_id IS N... | {"resultsets": [{"headers": ["year", "COUNT(user_name)"], "rowcount": 14}], "runningtime": "0.20"} | lgwiki_p |
File pages (no redirects) without file archives and not linked to {{Imagem sensível}} on ptwiki | null | SELECT page_title
FROM page
WHERE page_namespace = 6 AND page_is_redirect = 0 AND NOT EXISTS
(SELECT *
FROM image
WHERE page.page_title = image.img_name)
AND NOT EXISTS (SELECT *
FROM templatelinks
WHERE page.page_id = templatelinks.tl_from AND templatelinks.tl_title = 'Imagem_sen... | {"resultsets": [{"headers": ["COUNT(user_name)"], "rowcount": 1}], "runningtime": "0.10"} | ptwiki_p |
Talk pages for nonexistent users | Talk pages for nonexistent users | SELECT
page_title,
user_name
FROM page LEFT JOIN user ON (page_title = user_name)
WHERE page_namespace = 3
AND user_name IS NULL; | {"resultsets": [{"headers": ["item", "wbxl_language", "wbx_text", "page_latest"], "rowcount": 497}], "runningtime": "1.03"} | viwiki_p |
Talk pages for nonexistent users | Talk pages for nonexistent users | SELECT
page_title,
user_name
FROM page LEFT JOIN user ON (page_title = user_name)
WHERE page_namespace = 3
AND user_name IS NULL; | {"resultsets": [{"headers": ["qid", "type", "lang", "text"], "rowcount": 1}], "runningtime": "861.53"} | viwiki_p |
Talk pages for nonexistent users | Talk pages for nonexistent users | SELECT
page_title,
user_name
FROM page LEFT JOIN user ON (page_title = user_name)
WHERE page_namespace = 3
AND user_name IS NULL
LIMIT 5000; | {"resultsets": [{"headers": ["count(*)", "count(distinct p.page_id)"], "rowcount": 1}], "runningtime": "18.32"} | viwiki_p |
User pages for nonexistent users | null | SELECT COUNT(*)
FROM page
WHERE
page_namespace IN (2,3)
AND NOT EXISTS(
SELECT 1
FROM user
WHERE REGEXP_REPLACE(user_name, ' ', '_') = REGEXP_REPLACE(page_title, '/.*', '')
)
LIMIT 1000 | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "page_id", "page_title"], "rowcount": 10}], "runningtime": "0.07"} | viwiki |
User pages for nonexistent users (II) | null | SELECT COUNT(*)
FROM page
LEFT JOIN user ON REGEXP_REPLACE(user_name, ' ', '_') = REGEXP_REPLACE(page_title, '/.*', '')
WHERE
page_namespace IN (2,3)
LIMIT 1000 | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "page_id", "page_title"], "rowcount": 100}], "runningtime": "0.17"} | viwiki |
Talk pages for nonexistent users | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
user_talk_pages AS (
SELECT page_title FROM page WHERE page_namespace = 3
)
SELECT page_title, log_timestamp
FROM user_talk_pages LEFT JOIN new_users ON (page_title = log_title)
WHERE log_timestamp IS NULL;
LIMIT 5 | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 34}], "runningtime": "0.11"} | viwiki_p |
Russian oligarch editor blocks 5 | Created for a Signpost investigation. | # Simplified query to focus on blocked editors.
# The page_id list can be manually compiled by looking at page id under "page information" in the Wiki web interface,
# or by running Quarry query #62940 with a list of titles.
select page_title as 'page title', actor_name as editor, count(actor_id) as N, comment_... | {"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 8}], "runningtime": "30.72"} | enwiki |
trying to understand logging. | example to understand Administrator logging. | select * from logging where log_title='Nicola' and log_type='rights' limit 1000; | {"resultsets": [{"headers": ["page_title", "page_count"], "rowcount": 100}], "runningtime": "0.80"} | dewiki |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["source", "destination"], "rowcount": 28892}], "runningtime": "32.64"} | wikidatawiki_p |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 107}], "runningtime": "0.19"} | wikidatawiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"connection_id": 38872614} | enwiki_p |
Most prolific Lexeme creators (Dagbani) | null | SELECT actor.actor_name as Username,
COUNT(actor.actor_name) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN pagelinks ON page.page_id=pagelinks.pl_from
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creatio... | {"resultsets": [{"headers": ["user_name", "edits"], "rowcount": 1}], "runningtime": "14.24"} | wikidatawiki_p |
Number of Esperanto 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="Q8765"
group by actor_user
order by c desc;
| {"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 14082}], "runningtime": "18.82"} | wikidatawiki_p |
Users with certain editcount + time on wiki | null | SELECT user_id,user_name,user_editcount,REPLACE(STR_TO_DATE(user_registration, '%Y%m%e%H%i%s'),'T',' ') AS registration_date
FROM user
WHERE user_editcount>=180000
# AND (DATE_ADD(NOW(), INTERVAL -user_registration)
AND user_registration<20040327000000 | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 15}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 8}, {"headers": ["rc_namespace", "rc_... | enwiki_p |
unknown cite params | null | select page_title, cl_sortkey_prefix, COUNT(*)
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to = "صفحات_تحتوي_مراجع_بوسائط_غير_مدعومة"
#and page_namespace = 0
group by cl_sortkey_prefix #having count(*) > 1
ORDER BY COUNT(*) DESC
#limit 100;
; | {"resultsets": [{"headers": ["page_title", "reviewed", "unreviewed"], "rowcount": 1}], "runningtime": "0.06"} | arwiki_p |
Capture QuickStatement external links of {{Artwork}} templates 2 | null | use commonswiki_p;
SELECT el_to
FROM externallinks
JOIN page ON page_id = el_from
JOIN categorylinks ON cl_from = page_id
WHERE
page_namespace in (6,14) and #14
cl_to='Artworks_with_Wikidata_item:_quick_statements' AND
el_to LIKE 'https://quickstatements.toolforge.org%'
limit 20000
| {"resultsets": [{"headers": ["day", "MAX(reviewed)", "MAX(unreviewed)", "MAX(patrolled)", "MAX(autopatrolled)"], "rowcount": 1}], "runningtime": "0.16"} | commonswiki_p |
Talk pages for nonexistent users | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
anonymous_users AS (
SELECT DISTINCT actor_name FROM actor WHERE actor_user IS NULL
),
user_talk_pages AS (
SELECT page_title, actor_name FROM page LEFT JOIN anonymous_users ON (page_title = actor_name)
WHERE page_namesp... | {"resultsets": [{"headers": ["day", "reviewed", "unreviewed", "patrolled", "autopatrolled"], "rowcount": 8}], "runningtime": "0.15"} | viwiki_p |
Most pending changes accepts (last 30 days) | 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'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["user", "cnt"], "rowcount": 915}], "runningtime": "3.71"} | enwiki |
Talk pages for nonexistent users (1) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
anonymous_users AS (
SELECT DISTINCT actor_name FROM actor WHERE actor_user IS NULL
),
user_talk_pages AS (
SELECT page_title, actor_name FROM page LEFT JOIN anonymous_users ON (page_title = actor_name)
WHERE page_namesp... | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 1}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "rev_timestamp"], "rowcount": 11}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pp_propname"], "... | viwiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-ukraine | null | SELECT page_title, comment_text
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
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": ... | commonswiki_p |
trying to understand logging. | example to understand Administrator logging. | select * from logging where log_title='Geschichte' and log_type='rights' limit 1000; | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_new", "page_latest", "actor_name"], "rowcount": 102}], "runningtime": "107.98"} | enwiki_p |
trying to understand logging. | example to understand Administrator logging. | select * from logging where log_title='Nicola@dewiki' and log_type='rights' limit 1000; | {"connection_id": 25870263} | metawiki_p |
SVG defect thumbs (Commons) | null | SELECT i.img_name FROM image i
WHERE
-- p.page_is_redirect = FALSE
-- AND p.page_len > 0
-- AND p.page_namespace = 6
i.img_media_type = "DRAWING"
AND (i.img_width = 0)
LIMIT 100
| {"resultsets": [{"headers": ["number", "actor_user", "rev_user_text", "recent_user_editcount"], "rowcount": 5}], "runningtime": "3.20"} | commonswiki_p |
PDF defect thumbs (Commons) | null | SELECT i.img_name FROM image i
WHERE
-- p.page_is_redirect = FALSE
-- AND p.page_len > 0
-- AND p.page_namespace = 6
i.img_media_type = "OFFICE"
AND (i.img_width = 0)
LIMIT 100 | {"resultsets": [{"headers": ["number", "actor_user", "rev_user_text", "recent_user_editcount"], "rowcount": 500}], "runningtime": "4.85"} | commonswiki_p |
Ownerless pages in the user space (Commons) | https://wikitech.wikimedia.org/wiki/Help:MySQL_queries#Ownerless_pages_in_the_user_space | SELECT
page_namespace,
page_title,
page_len
FROM page
LEFT JOIN `user`
ON user_name = REPLACE(page_title, '_', ' ')
WHERE page_namespace IN (2,3)
AND page_is_redirect = 0
AND page_title NOT LIKE "%/%"
AND page_title NOT RLIKE "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5... | {"resultsets": [{"headers": ["actor_user", "rev_user_text", "recent_user_editcount"], "rowcount": 500}], "runningtime": "4.36"} | commonswiki_p |
ruwiki wanted templates for articles | null | USE ruwiki_p;
SELECT
tl_title,
pg2.page_title,
count(*) over (partition by tl_title) page_count
FROM templatelinks
join page pg2 on pg2.page_id = tl_from
WHERE tl_from_namespace = 0
AND tl_namespace = 10
and not exists(select * from page where page_title=tl_title limit 1)
order by page_count desc
limit 5000; | {"resultsets": [{"headers": ["cl_to", "page_title"], "rowcount": 332}], "runningtime": "0.42"} | ruwiki_p |
Infobox_film | null |
SELECT /*SLOW OK*/ page_title
FROM page
WHERE page_id IN (
SELECT tl_from
FROM templatelinks
WHERE tl_title = "Infobox_football_biography"
AND tl_namespace = 10
AND tl_from IN (
SELECT ll_from
FROM langlinks
WHERE ll_from
... | {"resultsets": [{"headers": ["page_title", "added_time"], "rowcount": 58}], "runningtime": "0.12"} | enwiki |
Talk pages for nonexistent users (excluding IPs) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
user_talk_pages AS (
SELECT page_title FROM page
WHERE page_namespace = 3
AND NOT is_ipv4(page_title)
AND NOT is_ipv6(page_title)
)
SELECT page_title, log_timestamp
FROM user_talk_pages LEFT JOIN new_users ON (page... | {"resultsets": [{"headers": ["page_title", "added_time"], "rowcount": 80}], "runningtime": "0.13"} | viwiki_p |
Talk pages for nonexistent users (A) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
anonymous_users AS (
SELECT DISTINCT actor_name FROM actor WHERE actor_user IS NULL
),
user_talk_pages AS (
SELECT page_title, actor_name FROM page LEFT JOIN anonymous_users ON (page_title = actor_name)
WHERE page_namesp... | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 500}], "runningtime": "0.58"} | viwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 500}], "runningtime": "0.66"} | enwiki_p |
IP blocks for 123.*.*.* | null | 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 " 207.236%" AND ipb_user = 0
ORDER BY ipb_range_start, ipb_range_end DESC, ipb_timestamp | {"resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "user_groups"], "rowcount": 1}], "runningtime": "1.08"} | enwiki_p |
IP blocks for 123.*.*.* | null | 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 "207.%" AND ipb_user = 0
ORDER BY ipb_range_start, ipb_range_end DESC, ipb_timestamp | {"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "76.21"} | enwiki_p |
help to find start of admins | example to understand Administrator logging. | select * from logging where log_params like '%sysop%' and log_type='rights' ; | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 40}], "runningtime": "1.14"} | dewiki |
edit bucket distributions (with N edits in timeframe) | null | WITH active_editors AS (
SELECT rev_actor, COUNT(rev_id) AS recent_edit_count
FROM revision
WHERE
rev_timestamp > '20211201000000'
AND rev_timestamp < '20220228235959'
GROUP BY rev_actor
HAVING COUNT(rev_id) >= 5),
non_bot_editors AS (
SELECT actor_id, user_id, user_name, user_editcount
FROM actor
... | {"resultsets": [{"headers": ["cat_title", "cat_id", "page_id"], "rowcount": 11}], "runningtime": "0.13"} | kowiki |
Talk pages for nonexistent users (B) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
anonymous_users AS (
SELECT DISTINCT actor_name FROM actor WHERE actor_user IS NULL
),
user_talk_pages AS (
SELECT page_title, actor_name FROM page LEFT JOIN anonymous_users ON (page_title = actor_name)
WHERE page_namesp... | {"resultsets": [{"headers": ["\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u062d\u0627\u062a", "\u0627\u0644\u0639\u0646\u0648\u0627\u0646"], "rowcount": 166}], "runningtime": "0.90"} | viwiki_p |
editors by gender | null | SELECT up_value, COUNT(DISTINCT user_id) AS user_count
FROM user
LEFT JOIN user_properties ON up_user = user_id
WHERE up_property = 'gender'
GROUP BY up_value | {"resultsets": [{"headers": ["min(rc_id)"], "rowcount": 1}], "runningtime": "2.58"} | dewiki_p |
editors by gender | null | SELECT up_value, COUNT(DISTINCT user_id) AS user_count
| {"resultsets": [{"headers": ["actor_name", "file", "lnprojpage"], "rowcount": 3}], "runningtime": "2.16"} | metawiki_p |
IP blocks for 123.*.*.* | null | 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 "82.33.%" AND ipb_user = 0
ORDER BY ipb_range_start, ipb_range_end DESC, ipb_timestamp | {"resultsets": [{"headers": ["CONCAT('# [[', page_title, ']]')"], "rowcount": 0}], "runningtime": "0.05"} | enwiki_p |
Critical Race Theory - Query 1 | null | select rev_timestamp as timestamp, rev_id, rev_minor_edit, comment_text, ctd_name, actor_user
from revision
left join (comment, change_tag, change_tag_def, actor)
on (revision.rev_comment_id = comment.comment_id
and revision.rev_id = change_tag.ct_rev_id
and change_tag.ct_tag_id = change_tag_def.ctd_... | {"resultsets": [], "runningtime": "0.03"} | enwiki |
User pages for nonexistent users | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
anonymous_users AS (
SELECT DISTINCT actor_name FROM actor WHERE actor_user IS NULL
),
user_talk_pages AS (
SELECT page_title, actor_name FROM page LEFT JOIN anonymous_users ON (page_title = actor_name)
WHERE page_namesp... | {"connection_id": 27588567} | viwiki_p |
উইকিপিডিয়ার শীর্ষ সম্পাদকগণ | ৩০ জানু ২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন। | SET @counter:=0;
SELECT
CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং,
CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "... | {"connection_id": 26793735} | bnwiki |
Talk pages for nonexistent users (excluding IPs) | Talk pages for nonexistent users | WITH
new_users AS (
SELECT * FROM logging WHERE log_type = 'newusers'
),
user_talk_pages AS (
SELECT page_title FROM page LEFT JOIN actor ON (page_title = actor_name)
WHERE page_namespace = 3
AND actor_name IS NULL
AND NOT is_ipv4(page_title)
AND NOT is_ipv6(page_title)
)
SELECT page_... | {"resultsets": [{"headers": ["page_title"], "rowcount": 397}], "runningtime": "0.75"} | viwiki_p |
Possible non-CONCISE titles on enwiki | Work in progress | SELECT page_title
FROM page dabbed
WHERE dabbed.page_namespace = 0
AND dabbed.page_is_redirect = 0
AND dabbed.page_title LIKE "_%(_%)"
AND dabbed.page_title NOT LIKE "%(disambiguation)" -- often valid; MALPLACED already monitored
AND EXISTS (SELECT 1
FROM page base
INNER JOIN redirect ON base.pa... | {"resultsets": [{"headers": ["fiwiki_p", "year", "month", "c"], "rowcount": 6}], "runningtime": "0.13"} | enwiki_p |
Inactive users in user groups | Inactive users in user groups | SELECT
actor_name,
STR_TO_DATE(LEFT(MAX(rev_timestamp), 15), '%Y%m%d') AS latest,
group_concat(distinct ug.ug_group)
FROM revision
JOIN actor
ON rev_actor = actor_id
AND actor_user <> 0
JOIN user_groups AS ug
ON ug_user = actor_user
LEFT JOIN user_groups AS ug2
ON ug2.ug_user = actor_user
AND ug2.ug_gro... | {"resultsets": [{"headers": ["date", "edits"], "rowcount": 6}], "runningtime": "0.68"} | fawiki |
Playing card titles on enwiki | null | SELECT page_title, rd_title
FROM page
LEFT JOIN redirect ON page_id = rd_from
WHERE page_namespace = 0
AND page_title RLIKE '^(\\d[1-3]?|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|Eleven|Twelve|Thirteen|J(ack)?|Q(ueen)?|K(ing)?|A(ce)?)_of_([Cc]lub|[Dd]iamond|[Hh]eart|[Ss]pade)s$' | {"resultsets": [{"headers": ["ng\u00e0y", "t\u1ed5ng_s\u1eeda_\u0111\u1ed5i_t\u1eeb_khi_m\u1edbi_tham_gia"], "rowcount": 6596}], "runningtime": "235.69"} | enwiki_p |
Titles on enwiki starting with playing card names | null | SELECT page_title, page_is_redirect
FROM page
WHERE page_namespace = 0
AND page_title RLIKE '^(\\d[1-3]?|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|Eleven|Twelve|Thirteen|J(ack)?|Q(ueen)?|K(ing)?|A(ce)?)_of_([Cc]lub|[Dd]iamond|[Hh]eart|[Ss]pade)s_' | {"resultsets": [{"headers": ["ng\u00e0y", "t\u1ed5ng_s\u1eeda_\u0111\u1ed5i_t\u1eeb_khi_m\u1edbi_tham_gia"], "rowcount": 2428}], "runningtime": "158.24"} | enwiki_p |
Non-dead people on Czech Wikipedia since year 1500 | null | SELECT cat_title, @count_all := (SELECT COUNT(DISTINCT cl_from) FROM categorylinks WHERE cl_to = cat_title) AS count_all, @count_dead := (SELECT COUNT(DISTINCT cl_from) FROM categorylinks WHERE cl_from IN (SELECT cl_from FROM categorylinks WHERE cl_to = cat_title) AND cl_to REGEXP '^Úmrtí_[0-9][0-9][0-9][0-9]$') AS cou... | {"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 10723}], "runningtime": "13.13"} | cswiki_p |
IP-patrolling nlwiki | Vandalismebestrijding, 31 maart 2022, 17:50 (CEST) | # 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": 62}], "runningtime": "73.33"} | nlwiki_p |
Protected titles on Czech Wikipedia | null | SELECT * FROM protected_titles WHERE pt_namespace = 0 ORDER BY pt_expiry, pt_timestamp, pt_title | {"resultsets": [{"headers": ["page_title"], "rowcount": 100}], "runningtime": "0.16"} | cswiki_p |
Templates on cswiki by number of transcluding articles | null | SELECT tl_title, COUNT(tl_from) AS transclusions FROM templatelinks WHERE tl_namespace = 10 AND tl_from_namespace = 0 GROUP BY tl_title HAVING transclusions > 1000 ORDER BY transclusions DESC, tl_title | {"resultsets": [{"headers": ["day", "titles", "page_creation_count"], "rowcount": 100}], "runningtime": "2.32"} | cswiki_p |
सदस्य ज्यांनी सर्वाधिक पृष्ठे तयार केली आहेत | Test | SELECT Count(*) number,
actor_name
FROM revision
JOIN actor
ON rev_actor = actor_id
JOIN page
ON rev_page = page_id
WHERE rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_timestamp > 20010000000000
AND rev_timestamp ... | {"resultsets": [{"headers": ["ipb_address", "$duration", "ipb_expiry", "ipb_timestamp", "ipb_anon_only"], "rowcount": 1}], "runningtime": "0.38"} | mrwiki_p |
Sys-op protected templates on Czech Wikipedia by latest edit | null | SELECT * FROM page_restrictions JOIN page ON pr_page = page_id WHERE page_namespace = 10 AND pr_type = 'edit' AND pr_level = 'sysop' ORDER BY page_latest | {"resultsets": [{"headers": ["ipb_address", "$duration", "ipb_expiry", "ipb_timestamp", "ipb_anon_only"], "rowcount": 1}], "runningtime": "0.42"} | cswiki_p |
सदस्य ज्यांनी सर्वाधिक पृष्ठे तयार केली आहेत | Test | SELECT Count(*) number,
actor_name
FROM revision
JOIN actor
ON rev_actor = actor_id
JOIN page
ON rev_page = page_id
WHERE rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_timestamp > 20010000000000
AND rev_timestamp ... | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 1004}], "runningtime": "120.05"} | mrwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["user_name", "totale_edits", "edits_after"], "rowcount": 15}], "runningtime": "0.11"} | enwiki_p |
All pages with 10 or more slashes in their titles | null | SELECT LENGTH(page_title) AS title_length, page_len AS "size", page_namespace AS "ns", page_title AS "title"
FROM page WHERE page_title LIKE "%14th_nomination%" OR page_title LIKE "%13th_nomination%" OR page_title LIKE "%12th_nomination%" OR page_title LIKE "%15th_nomination%"
ORDER BY page_len ASC;
| {"resultsets": [{"headers": ["ug_group"], "rowcount": 2}], "runningtime": "0.14"} | enwiki_p |
enwiki articles LIKE "_%\_(people)" | null | SELECT page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_title LIKE "_%\_(people)" | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 15}], "runningtime": "3.11"} | 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": ["pl_from", "pl_title", "cl_to"], "rowcount": 317}], "runningtime": "3.71"} | enwiki |
Wikidata items with Yoruba labels matching their item ID | null | SELECT wbx_text
FROM wbt_text
JOIN wbt_text_in_lang ON wbxl_text_id = wbx_id
JOIN wbt_term_in_lang ON wbtl_text_in_lang_id = wbxl_id
JOIN wbt_item_terms ON wbit_term_in_lang_id = wbtl_id
WHERE wbxl_language = 'yo'
AND wbtl_type_id = (SELECT wby_id FROM wbt_type WHERE wby_name = 'label')
AND wbx_text LIKE 'Q%'
AND wbx_t... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.37"} | wikidatawiki_p |
Living people with paid contributors | null | SELECT page_title
FROM page
JOIN categorylinks
ON cl_from = page_id
WHERE cl_to = "Living_people" | {"resultsets": [{"headers": ["replace(page_title,\"_\",\" \")"], "rowcount": 23}], "runningtime": "0.10"} | enwiki_p |
Article creation statistics on plwikinews | null | set @start_timestamp := 20220101000000;
#set @end_timestamp := 20220401000000;
select
actor_name,
count(log_id) as creation_count
from logging
inner join page on page_id = log_page
inner join actor on actor_id = log_actor
where
log_type = "create" and
page_namespace = 0 and
log_timestamp >= @start_t... | {"resultsets": [{"headers": ["@counter := @counter +1", "user_editcount", "user_name"], "rowcount": 1000}], "runningtime": "1.27"} | plwikinews_p |
Article creation statistics on plwikinews | null | set @start_timestamp := 20220301000000;
#set @end_timestamp := 20220331000000;
select
actor_name,
count(log_id) as creation_count
from logging
inner join page on page_id = log_page
inner join actor on actor_id = log_actor
where
log_type = "create" and
page_namespace = 0 and
log_timestamp >= @start_t... | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp"], "rowcount": 1063}, {"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp"], "rowcount": 410}], "runningtime": "1.88"} | plwikinews_p |
Article creation statistics on plwikinews | null | set @start_timestamp := 20220301000000;
#set @end_timestamp := 20220401000000;
select
actor_name,
count(log_id) as creation_count
from logging
inner join page on page_id = log_page
inner join actor on actor_id = log_actor
where
log_type = "create" and
page_namespace = 0 and
log_timestamp >= @start_t... | {"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 410}], "runningtime": "0.62"} | plwikinews_p |
Persian Wiktionary, all new main namespace pages from a certain month with timestamp | Should work for all Wiktionaries and even other projects. | select replace(concat("[[", page_title, "]]"), "_", " ") as Page, concat("{{subst:#time: j F Y|", substring(rev_timestamp, 1, 8), "}}") as Time
from page
join revision
on rev_page = page_id
join actor
on rev_actor = actor_id
where rev_parent_id = 0
and rev_timestamp > 20220201000000 -- Change this timestamp to change t... | {"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": 1}], "runningtime": "0.07"} | fawiktionary_p |
plwikinews: Liczba stron dziennie | null | select substring(rev_created, 1, 8) as data_RMD, count(*) as str_na_dzien
, min(rev_created), max(rev_created), min(page_len), max(page_len)
, min(page_title) as np_tytul
from
(
select page_title, rev_created, page_touched, page_len
from page
left join
(select rev_page, min(rev_timestamp) as rev_created ... | {"resultsets": [{"headers": ["tl_title"], "rowcount": 221}], "runningtime": "1627.92"} | plwikinews_p |
Vandalismebestrijding 2 april 2022, nlwiki | IP-controle, 2 april 2022, 828 unpatrolled, 14:26 (CEST) | # 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": 14}], "runningtime": "14.48"} | nlwiki_p |
WP:MILHIST articles w/ <11 inbound mainspace links (summary) | Non-redirect articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links, summarized.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SELECT inlinks, COUNT(title)
FROM (SELECT COUNT(pl_title) AS inlinks, artpage.page_title AS title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage.page_title
LEFT JOIN pagel... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 28}], "runningtime": "9.71"} | enwiki_p |
WP:MILHIST articles w/ <11 inbound mainspace links | Non-redirect articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SELECT COUNT(pl_title) AS inlinks, artpage.page_title AS title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage.page_title
LEFT JOIN pagelinks
ON pl_namespace = 0 AND pl_title = artpage.page_title AND pl_fro... | {"resultsets": [{"headers": ["user_name", "user_registration", "COUNT(*)"], "rowcount": 5}, {"headers": ["actor_name", "COUNT(*)"], "rowcount": 56}, {"headers": ["actor_name", "COUNT(*)"], "rowcount": 59}], "runningtime": "13.10"} | enwiki_p |
WP:MILHIST articles w/ <11 inbound mainspace links (summary) | Non-redirect, non-dab articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links from non-redirects, summarized.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SELECT inlinks, COUNT(title)
FROM (SELECT COUNT(inlinkpage.page_id) AS inlinks, artpage.page_title AS title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage.page_title
LEFT ... | {"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "10.48"} | enwiki_p |
WP:MILHIST articles w/ <11 inbound mainspace links | Non-redirect, non-dab articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links from non-redirects.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SELECT COUNT(inlinkpage.page_id) AS inlinks, artpage.page_title AS title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage.page_title
LEFT JOIN pagelinks
ON pl_namespace = 0 AND pl_title = artpage.page_title ... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8380}], "runningtime": "20.64"} | enwiki_p |
Get page ID of second degree backlinks to the page Covid-19 | null | SELECT
page_title,
page_id
FROM
page
WHERE
page_is_redirect = 0
AND page_random BETWEEN 0.1 AND 0.4
AND page_id IN (
SELECT
pl_from
FROM
pagelinks
WHERE
pl_namespace = 0
AND pl_title IN (
SELECT
page_title
FROM
page
WHERE
... | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp"], "rowcount": 810}], "runningtime": "1.06"} | enwiki_p |
Show page linking to COVID-19 | Get the ID of all pages linking to the page COVID-19 | SELECT
pl_title,
pl_from
FROM
pagelinks
WHERE
pl_title = 'COVID-19'
AND pl_namespace = 0 | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp"], "rowcount": 1657}], "runningtime": "2.52"} | enwiki_p |
mw-undo | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-undo')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp"], "rowcount": 983}], "runningtime": "1.38"} | bnwiki |
Get second degree backlinks to the page Covid-19 | null | SELECT
pl_from,
pl_title
FROM
pagelinks
WHERE
pl_namespace = 0
AND pl_title IN (
SELECT
page_title
FROM
page
WHERE
page_is_redirect = 0
AND page_random BETWEEN 0.1 AND 0.4
AND page_id IN (
SELECT
... | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 1004}], "runningtime": "132.35"} | enwiki_p |
code lint | null | select page.page_namespace,page.page_title,linter_cat,linter_params
from linter
join page on page.page_id = linter.linter_page
where linter_params like '{"name":"code"%' and page.page_namespace not in (2,3)
group by page.page_namespace,page.page_title,linter_cat,linter_params
order by page.page_namespace,page.page_titl... | {"resultsets": [{"headers": ["page_title", "count(pl_title)"], "rowcount": 30}], "runningtime": "0.57"} | enwiki |
WP:MILHIST articles w/ <11 inbound mainspace links | Non-redirect articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SET max_recursive_iterations=2;
WITH results AS (
WITH RECURSIVE artred AS (
SELECT talkpage.page_title AS art_title, talkpage.page_title AS red_title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage... | {"resultsets": [{"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 500}, {"headers": ["distanz_ungefaehr", "gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 284}], "runningtime": "6.05"} | enwiki_p |
Vandalismebestrijding, nlwiki (IP-patrolling) | IP-controle, 4 april 2022, 14:57 (CEST) 1052 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": ["actor_name", "ctd_name", "tagcount"], "rowcount": 6}], "runningtime": "1.34"} | nlwiki_p |
Slovak Wikidatists > 2021 | null | USE wikidatawiki_p;
SELECT actor_name, COUNT(rev_id) AS c FROM pagelinks
JOIN revision_userindex ON rev_page = pl_from
JOIN actor_revision ON rev_actor = actor_id
WHERE pl_title = 'Q214' # parameter
AND pl_namespace = 0 AND pl_from_namespace = 0
AND actor_user IS NOT NULL
AND actor_user NOT IN (SELECT ug_user FROM user... | {"resultsets": [{"headers": ["ug_user", "ug_group", "ug_expiry"], "rowcount": 100}], "runningtime": "0.18"} | wikidatawiki_p |
Find Brazil's Leaders | null | SELECT `page_title` as `Page` FROM `page` WHERE `page_title` LIKE 'Federative_units%' | {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 6}], "runningtime": "0.07"} | enwiki |
Vandalismebestrijding nlwiki (IP-patrolling) | IP-controle, 5 april 2022, 17:18 (CEST) 745 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": ["log_namespace", "log_title", "comment_text", "log_timestamp", "log_actor"], "rowcount": 156}], "runningtime": "0.29"} | nlwiki_p |
top rollbacker | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-rollback')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 429}], "runningtime": "1.22"} | bnwiki |
top rollbacker | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-rollback')
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["CONVERT(p1.page_title USING utf8)", "COUNT(*)"], "rowcount": 24}], "runningtime": "15.50"} | bnwiki |
WP:MILHIST articles w/ <11 inbound mainspace links | Non-redirect articles whose talk page is tagged {{WikiProject Military history}} with 10 or fewer inbound mainspace links.
For [[WP:RAQ#Orphans, and poorly-linked articles in a WikiProject]] circa 2 April 2022. | SET max_recursive_iterations=2;
WITH results AS (
WITH RECURSIVE artred AS (
SELECT talkpage.page_title AS art_title, talkpage.page_title AS red_title
FROM templatelinks
JOIN page AS talkpage
ON talkpage.page_id = tl_from
JOIN page AS artpage
ON artpage.page_namespace = 0 AND artpage.page_title = talkpage... | {"resultsets": [{"headers": ["rev_actor", "actor_name", "COUNT(*)"], "rowcount": 137}], "runningtime": "2.90"} | enwiki_p |
Select all values from categorylinks where page title is COVID-19 | null | SELECT cl_from, cl_to FROM categorylinks join page on page_id = cl_from where page_title = 'COVID-19' | {"resultsets": [{"headers": ["page_title"], "rowcount": 8}], "runningtime": "0.07"} | enwiki_p |
Get first degree categories for the page COVID-19 | null | SELECT
cl_from,
cl_to
FROM
categorylinks
WHERE
cl_from IN (
SELECT
page_id
FROM
page
WHERE
page_is_redirect = 0
AND page_random BETWEEN 0.1 AND 0.4
AND page_id IN (
SELECT
pl_from
FROM
pagelinks
WHERE
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 65}], "runningtime": "0.15"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.