title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Links to nli.org.il in hewiki | Links to nli.org.il in hewiki | use hewiki_p;
select
el_from,
page_title,
el_to
from
externallinks,
page
where
el_to like '%www.nli.%' and
el_from = page_id
limit 500000; | {"resultsets": [], "runningtime": "0.02"} | hewiki_p |
– Singles and Doubles Qualifying | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and ((page_title like '%–%Singles_Qualifying')
or (page_title like '%–%Doubles_Qualifying')
)
| {"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": ... | enwiki_p |
recentchanges Exploration | Just exploring recentchanges data | select rc_timestamp, rc_title, rc_type, rc_source, rc_bot, rc_patrolled, rc_params
, actor_name
, comment_text, comment_data -- rc.rc_title
from recentchanges as rc
join comment as c on c.comment_id = rc.rc_comment_id
join actor as a on a.actor_id = rc.rc_actor
-- where rc.rc_namespace = 2 and not (rc_log_type = 'new... | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 1}, {"headers": ["page_title"], "rowcount": 3}, {"headers": ["tl_title", "count_tl_title"], "rowcount": 4}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"... | enwiki_p |
recentchanges Aggregation | null | select rc_timestamp, rc_title, rc_type, rc_source, rc_bot, rc_patrolled, rc_params
, actor_name
, comment_text, comment_data -- actor_name -- rc_title -- round(rc_timestamp,-6) as date
-- , count(rc_timestamp) as units
from recentchanges as rc
join comment as c on c.comment_id = rc.rc_comment_id
join actor as a on a... | {"resultsets": [{"headers": ["actor_name", "count(DISTINCT page_id)"], "rowcount": 8}], "runningtime": "0.79"} | enwiki_p |
All non-free files linked to project namespace on te.wiki | All non-free files linked to Wikipedia namespaces | SELECT
actor_name,
CONCAT("File:",p.page_title) as file,
CONCAT("Wikipedia:",ilp.page_title) as lnprojpage
from page p
join image ON p.page_namespace=6 AND p.page_title=img_name
JOIN categorylinks c1 ON p.page_id = c1.cl_from
JOIN imagelinks i ON p.page_title = i.il_to AND i.il_from_namespace = 4
... | {"resultsets": [{"headers": ["page_id"], "rowcount": 0}], "runningtime": "7.60"} | tewiki_p |
Burwell U.S. coins | A list of all Wikimedia Commons files that include "Burwell" in the metadata. Burwell and Burwell is a contractor used by the U.S. mint to take photographs of coins, and its photographs are protected by copyright. | SELECT CONCAT("* [[:File:", img_name, "]]")
FROM image
WHERE INSTR(img_metadata, "Burwell") > 0 AND img_media_type = "BITMAP" | {"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", page_title)", "page_len"], "rowcount": 12179}], "runningtime": "17.94"} | commonswiki_p |
Number of external links on Jan 10 2022 | null | SELECT COUNT(*)
FROM externallinks | {"resultsets": [{"headers": ["CONCAT('[[:Kategorie:', cl_to, ']]')", "CONCAT('[[', page_title, ']]')", "cl_sortkey_prefix"], "rowcount": 4348}], "runningtime": "23.89"} | enwiki |
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": ["year", "month", "page_namespace", "count"], "rowcount": 80}], "runningtime": "44.50"} | zhwiki_p |
Autoren nach Land, Geschlecht und Geb.Jahrzehnt V2 | Inklusive DDR-Bürger
Die Gesamtanzahl ist nicht immer die Summe der Spalten, einige Personen haben mehrere Staaten in der Kategorie, Beispiele:
* Ruth_Maria_Kubitschek (* 1931) Deutscher und Schweizer
* Michael_Hametner (* 1950) Österreicher und Deutscher
* Rosemarie_Schwarzwälder (*1945) Schweizer und Österreicher
| WITH RECURSIVE Cat AS (SELECT page_title, page_id
FROM page
WHERE page_title = 'Autor'
AND page_namespace = 14
UNION
SELECT SubCat.page_title, SubCat.page_id
FROM page AS SubCat, ... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 179}], "runningtime": "3.24"} | dewiki_p |
Links to nli.org.il in hewiki | Links to nli.org.il in hewiki | use hewiki_p;
select
el_from,
page_title,
el_to
from
externallinks,
page
where
el_to like '%nli.%' and
el_from = page_id
limit 500000; | {"resultsets": [{"headers": ["el_id", "page_title", "el_to"], "rowcount": 0}], "runningtime": "0.83"} | hewiki_p |
Users on tewiki editing most unique days in 2021 | Users editing in the main namespace more than specified days in year | 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 '2021%'
AND page_namespace= 0
GROUP BY actor_name
HAVING COUNT(DISTINCT substring(rev_timestamp, 1, 8)) > 133
ORDER BY days DESC
L... | {"resultsets": [{"headers": ["el_id", "page_title", "el_to"], "rowcount": 0}], "runningtime": "0.39"} | tewiki_p |
A-Class, but not good or featured, articles | There's no single category listing all A-Class articles. The tc.cl_to matches in this query contain the entire [[Category:A-Class articles]] subtree, without any false positives I can find; the raw data is at <https://petscan.wmflabs.org/?project=wikipedia&categories=A-Class%20articles&ns%5B14%5D=1&depth=10&sortby=ns_... | SELECT main.page_title
FROM page AS main
WHERE main.page_namespace = 0
AND main.page_title IN (SELECT talk.page_title
FROM page AS talk
JOIN categorylinks AS tc ON tc.cl_from = talk.page_id
WHERE talk.page_namespace = 1
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "3.99"} | enwiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding, 10 januari 2022: 1128 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": ["page_title", "page_len"], "rowcount": 16092}], "runningtime": "21.53"} | nlwiki_p |
Users on svwiki editing most unique days in 2021 | 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 '2021%'
AND actor_name like 'Sabelöga'
AND page_namespace= 0
GROUP BY actor_name | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 104}], "runningtime": "0.24"} | svwiki_p |
reverts by registered and unregistered editors in mainspace recentchanges | null | SELECT
IF(ctd_name = "mw-reverted", "reverted", "revert") AS `action`,
actor_user IS NOT NULL as `registered`,
COUNT(*)
FROM recentchanges_userindex
JOIN change_tag ON ct_rc_id = rc_id
JOIN change_tag_def ON ctd_id = ct_tag_id
JOIN actor_recentchanges ON rc_actor = actor_id
WHERE
rc_type = 0
AND ctd_na... | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 104}], "runningtime": "0.21"} | enwiki_p |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["up_value", "COUNT(*)"], "rowcount": 8}], "runningtime": "1.85"} | incubatorwiki |
Users on wikidata editing most unique days in 2021 | Users editing in the main namespace every day in 2021 on wikidata. | 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 '2021%'
AND page_namespace= 0
GROUP BY actor_name
HAVING COUNT(DISTINCT substring(rev_timestamp, 1, 8)) > 364
ORDER BY days DESC | {"resultsets": [{"headers": ["upa_touched", "up_property", "up_value"], "rowcount": 1}], "runningtime": "0.05"} | wikidatawiki_p |
non-bot blocks 2022 | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text
FROM
ipblocks
INNER JOIN actor ON ipblocks.ipb_by_actor = actor.actor_id
INNER JOIN comment ON ipblocks.ipb_reason_id = comment.comment_id
WHERE
TRUE
AND ipb_timestamp > "20220000000000"
AND actor_name != "ST47ProxyBot"
ORDER BY ipb_timestamp DESC | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 0}, {"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 1}, {"headers": ["Tables_... | enwiki_p |
red links caused by moving pages without leaving a rediredt behind | null | USE arwiki_p;
SELECT DISTINCT concat('# [[',log_title,']]'),COUNT(pl_title),log_params
FROM logging JOIN pagelinks ON pl_title=log_title AND pl_namespace=log_namespace
WHERE log_type='move'
AND log_namespace=0
AND pl_from_namespace=0
AND log_params LIKE '%dir";s:1:"1";}'
#AND log_timestamp >20160600000000
#AND log_use... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 0}], "runningtime": "1.16"} | arwiki |
Categorias com apenas uma página com muitos interwikis | null | SELECT
REPLACE(cat_title, '_', ' ') CATEGORIA,
GROUP_CONCAT(cl_to SEPARATOR ', ') É_SUBCAT_DE,
iw_num INTERWIKIS
FROM category
INNER JOIN page ON cat_title = page_title AND page_namespace = 14
LEFT JOIN categorylinks ON page_id = cl_from
LEFT JOIN (SELECT
page_id iw_page,
COUNT(ll_lang) iw_num
FROM page
I... | {"resultsets": [{"headers": ["page_title", "page_namespace", "created"], "rowcount": 6}], "runningtime": "0.97"} | ptwiki_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": ["year", "month", "page_namespace", "count"], "rowcount": 80}], "runningtime": "37.70"} | eswiki |
Categorias com apenas uma página e sem interwikis | null | SELECT
CONCAT('Categoria:', REPLACE(cat_title, '_', ' ')) CATEGORIA,
GROUP_CONCAT(cl_to SEPARATOR ', ') É_SUBCAT_DE
FROM category
INNER JOIN page ON cat_title = page_title AND page_namespace = 14
LEFT JOIN categorylinks ON page_id = cl_from
WHERE cat_pages = 1 AND cat_subcats = 0
AND cat_title NOT IN (
SELECT pa... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | ptwiki_p |
Edit milestones | Shows when a user reaches a certain milestone. | WITH edit_dates AS
(
SELECT
DATE(rev_timestamp) AS date,
COUNT(rev_id) AS edits
FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id)
-- Điền tên người dùng đây
WHERE actor.actor_name = "TranHieu0706" -- Nếu muốn xem cột mốt cho cả Wikipedia thì xóa luôn lệnh này.
GROUP BY date
ORDE... | {"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": 371}], "runningtime": "0.63"} | viwiki_p |
Edit milestones | Shows when a user reaches a certain milestone. | WITH edit_dates AS
(
SELECT
DATE(rev_timestamp) AS date,
COUNT(rev_id) AS edits
FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id)
-- Điền tên người dùng đây
WHERE actor.actor_name = "Đức Anh" -- Nếu muốn xem cột mốt cho cả Wikipedia thì xóa luôn lệnh này.
GROUP BY date
ORDER BY ... | {"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": 151}], "runningtime": "0.30"} | viwikibooks_p |
Edit milestones | Shows when a user reaches a certain milestone. | WITH edit_dates AS
(
SELECT
DATE(rev_timestamp) AS date,
COUNT(rev_id) AS edits
FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id)
-- Điền tên người dùng đây
WHERE actor.actor_name = "Tuanminh01"
GROUP BY date
ORDER BY date ASC
)
SELECT date AS ngày, SUM(edits) over (ORDER BY dat... | {"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": 145}], "runningtime": "0.32"} | viwiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding nlwiki, 12-01-2022, 16:38 (CET) 1296 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": ["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": 20}], "runningtime": "0.46"} | nlwiki_p |
all blocks 2021 | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text
FROM
ipblocks
INNER JOIN actor ON ipblocks.ipb_by_actor = actor.actor_id
INNER JOIN comment ON ipblocks.ipb_reason_id = comment.comment_id
WHERE
TRUE
AND ipb_timestamp > "20210000000000"
AND ipb_timestamp < "20220000000000"
ORDER BY ipb_timestamp D... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "0.33"} | enwiki_p |
Module:zh/data/dial-syn page creations | null | select
concat('Module:', log_title) as 'created page',
DATE_FORMAT(log_timestamp, '%Y-%m-%d %T') as timestamp,
actor_name, comment_text from logging
join actor on actor_id = log_actor
join comment on comment_id = log_comment_id
where log_type = 'create' and log_namespace = 828 /* Module */ and log_title like '... | {"resultsets": [{"headers": ["concat(\"Module:\",page_title)", "page_len"], "rowcount": 2193}], "runningtime": "14.68"} | enwiktionary_p |
active enwiki IP blocks by duration in months | Note: Per the documentation, if an indef is converted into a tempblock, `ipb_timestamp` should show the start of the tempblock, not of the indefblock. The documentation is wrong. As such, a lot of the top entries are indefs that were turned into 5-10 year blocks after 10-20 years. | SELECT ipb_address,
TIMESTAMPDIFF(MONTH, ipb_timestamp, ipb_expiry) AS $duration,
ipb_timestamp,
ipb_expiry,
ipb_anon_only
FROM ipblocks
WHERE ipb_user = 0 -- IP
AND ipb_sitewide = 1
AND ipb_expiry != 'infinity'
ORDER BY 2 DESC, 5 ASC | {"resultsets": [{"headers": ["Count", "Size_TiB", "Size_GiB", "Size_MiB"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}], "runningtime": "23.24"} | enwiki_p |
All sub pages in user space created | All sub pages in user space created from a date
| SELECT
actor_name,
LEFT(rev_timestamp,8) as date,
REPLACE(page_title, '_', ' ') as pagename
from page p
join revision ON rev_page = p.page_id AND rev_parent_id = 0 AND p.page_namespace=2
join actor ON actor_id=rev_actor
where LEFT(rev_timestamp,8) >"20210401" and page_title like "%/%"
ORDER BY ac... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 80}], "runningtime": "33.61"} | tewiki_p |
Known countries on Commons | All Countries known to Commons | SELECT `page_title` FROM
`page`
INNER JOIN `categorylinks` ON `page`.`page_id`=`categorylinks`.`cl_from`
WHERE `categorylinks`.`cl_to` IN('Countries_by_name', 'Former_countries_by_name') AND `page`.`page_namespace`=14; | {"resultsets": [{"headers": ["year", "month", "day", "page_namespace", "count"], "rowcount": 1720}], "runningtime": "44.58"} | commonswiki |
10 most edited pages on svwiki 2021 | 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 '2021%'
AND page_namespace= 0
GROUP BY page_title
ORDER BY edits DESC
LIMIT 10 | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 28}], "runningtime": "289.79"} | svwiki_p |
File in EDP non in uso e non segnati per la cancellazione | null | USE itwiki_p;
SELECT CONCAT("File:", page_title) FROM page
JOIN categorylinks
ON page_id = cl_from AND cl_to IN ("Immagini_non_commerciali",
"Autorizzate_per_Wikipedia",
"Screenshot_copyrighted_videogiochi",
... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 80}], "runningtime": "30.08"} | itwiki_p |
Wanted photograph categories (other than day) | null | WITH RECURSIVE `needed_category` AS (
SELECT `cat_title` AS `name` FROM `category` WHERE
(`cat_pages` > 0 OR `cat_subcats` > 0 OR `cat_files` > 0)
AND `cat_title` NOT IN (SELECT `page_title` FROM `page`)
),
`known_countries_cat` AS (
SELECT `page_title` AS `name` FROM
`page`
INNER JOIN `categorylinks`... | {"resultsets": [{"headers": ["actor_name", "count(DISTINCT page_id)"], "rowcount": 8}], "runningtime": "8.26"} | commonswiki |
all blocks 2021 | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text,
GROUP_CONCAT(ug_group SEPARATOR ", ")
FROM
ipblocks_ipindex
JOIN actor_ipblocks ON ipb_by_actor = actor_id
JOIN comment_ipblocks ON ipb_reason_id = comment_id
JOIN user_groups ON actor_user = ug_user
WHERE
TRUE
AND ipb_timestamp > "202100000... | {"connection_id": 3260912} | enwiki_p |
zhwiki: logging/rights changes | null | SELECT log_timestamp, user_name, log_title, log_params
FROM logging
LEFT JOIN actor ON log_actor = actor_id
LEFT JOIN user ON actor_user = user_id
WHERE log_type = 'rights'
AND log_action = 'rights'
AND log_params LIKE '%newgroups%ipblock-exempt%'
AND log_params NOT LIKE '%ldgroups%ipblock-exempt%newgroups%'
O... | {"resultsets": [{"headers": ["page_is_redirect"], "rowcount": 1988849}], "runningtime": "2800.69"} | zhwiki_p |
all blocks 2021 + UG | null | SELECT
ipb_address,
actor_name,
ipb_timestamp,
comment_text,
GROUP_CONCAT(ug_group SEPARATOR ", ")
FROM
ipblocks_ipindex
JOIN actor_ipblocks ON ipb_by_actor = actor_id
JOIN comment_ipblocks ON ipb_reason_id = comment_id
JOIN user_groups ON actor_user = ug_user
WHERE
TRUE
AND ipb_timestamp > "202100000... | {"connection_id": 3261390} | enwiki_p |
How many editors with <200 edits on dewiki edited in October 2021? | null | USE dewiki_p;
SELECT COUNT(user_name)
FROM user
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_after
FROM revision_compat
WHERE rev_timestamp > "20201001000000"
AND rev_timestamp < "20201101000000"
GROUP BY edit_usernam... | {"resultsets": [{"headers": ["img_name", "img_metadata"], "rowcount": 10}], "runningtime": "1.44"} | dewiki_p |
strony całości | null | use plwikisource_p;
select count(*) from page where page_title RLIKE "/[Cc]ałość$"; | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 306}], "runningtime": "1.43"} | plwikisource_p |
Time trial labels | replaced by 1235 | SELECT #*
CONCAT("Q",wbit_item_id), CONCAT("Lar"), CONCAT('" ', wbx_text , ' "')
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang tt
ON wbit_term_in_lang_id = tt.wbtl_id
#INNER JOIN wbt_type oo
#ON tt.wbtl_type_id = oo.wby_id
INNER JOIN wbt_text_in_lang dd
ON tt.wbtl_text_in_lang_id = dd.wbxl_id
INNER ... | {"resultsets": [{"headers": ["concat(\"Module:\",page_title)", "page_len"], "rowcount": 2192}], "runningtime": "14.69"} | wikidatawiki_p |
My edits on zhwikibooks | null | SELECT * FROM revision_userindex
JOIN actor ON actor_id = rev_actor
WHERE actor_name = 'WhitePhosphorus'
ORDER BY rev_id DESC LIMIT 50; | {"resultsets": [{"headers": ["Page", "ID"], "rowcount": 0}], "runningtime": "0.10"} | zhwikibooks |
Wanted (but deleted) photograph categories | Categories which have items in them, but are not yet created | WITH `needed` AS (
SELECT "Photographs_taken_on_1904-05-01" AS name UNION
SELECT "Photographs_taken_on_1962-12-07" AS name UNION
SELECT "Photographs_taken_on_1946-01-19" AS name UNION
SELECT "Photographs_taken_on_1948-03-14" AS name UNION
SELECT "Photographs_taken_on_1949-02-17" AS name UNION
SELECT "Photographs_taken_... | {"resultsets": [{"headers": ["log_title", "COUNT(log_id)"], "rowcount": 2371}], "runningtime": "3.48"} | commonswiki |
Speedy deletion category counts | Miscounts in {{PAGESINCATEGORY}} for the categories linked from [[Template:CSD-categories]].
COUNT(page_id) is the expected result.
COUNT(*) shows that the rows in the categorylinks table aren't being deleted when the corresponding rows in the page table are (the new bug).
cat_pages+cat_subcats+cat_files shows the old... | SELECT cl_to, COUNT(page_id), COUNT(*), cat_pages+cat_subcats+cat_files
FROM categorylinks
LEFT JOIN page ON page_id = cl_from
LEFT JOIN category ON cat_title = cl_to
WHERE cl_to IN (SELECT pl_title
FROM pagelinks
WHERE pl_namespace = 14
AND pl_from = (SELECT page_id
... | {"resultsets": [{"headers": ["page_title", "page_is_redirect"], "rowcount": 95}], "runningtime": "0.23"} | enwiki_p |
مؤکد | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%موکد%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["page_is_redirect"], "rowcount": 100}], "runningtime": "0.27"} | fawiki_p |
مؤذن | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%موذن%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Link"], "rowcount": 95}], "runningtime": "0.24"} | fawiki_p |
مؤدی | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%مودی%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Link"], "rowcount": 95}], "runningtime": "0.22"} | fawiki_p |
مؤتلف | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%موتلف%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Link"], "rowcount": 19227}], "runningtime": "22.64"} | fawiki_p |
مؤانست | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%موانست%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Link"], "rowcount": 19227}], "runningtime": "23.41"} | fawiki_p |
مؤالفت | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%موالفت%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "109.58"} | fawiki_p |
لؤم | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%لوم%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["\u0b87\u0ba8\u0bcd\u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bcd \u0bae\u0bc6\u0baf\u0bcd\u0baa\u0bcd\u0baa\u0bc1\u0baa\u0bcd\u0baa\u0ba3\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b88\u0b9f\u0bc1\u0baa\u0b9f\u0bcd\u0b9f\u0bcb\u0bb0\u0bcd:<br/>"], "rowcount": 39}], "runningtime": "2.67"} | fawiki_p |
تلألؤ | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%تلالو%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["page_title"], "rowcount": 261}], "runningtime": "69.61"} | fawiki_p |
تلألؤ | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%تلألو%'
AND page_is_redirect = 0; | {"resultsets": [], "runningtime": "0.03"} | fawiki_p |
تلألؤ | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%تلالؤ%'
AND page_is_redirect = 0; | {"resultsets": [], "runningtime": "0.03"} | fawiki_p |
সংশোধিত ও খালি | null | select concat("পাতা:", page_title), page_len
from page
join page_props
on pp_page = page_id
where pp_propname = 'proofread_page_quality_level'
and pp_value in (3, 4)
and page_namespace = 104
and page_len = 0; | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "13.33"} | bnwikisource_p |
collect all images for WLM per year with country | null | SELECT
subcat.page_title,
img.page_title,
img.page_namespace
FROM
page AS subcat
INNER JOIN categorylinks AS catlink1 ON subcat.page_id = catlink1.cl_from
INNER JOIN categorylinks AS catlink2 ON subcat.page_title = catlink2.cl_to
INNER JOIN page AS img ON img.page_id = catlink2.cl_from
WHERE
catlink1.cl_to =... | {"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "3.33"} | commonswiki_p |
collect all images for WLM per year with country | query seems fine, quarry doesn't like it though. | SELECT
subcat.page_title,
img.page_title
FROM
page AS subcat
INNER JOIN categorylinks AS catlink1 ON subcat.page_id = catlink1.cl_from
INNER JOIN categorylinks AS catlink2 ON subcat.page_title = catlink2.cl_to
INNER JOIN page AS img ON img.page_id = catlink2.cl_from
WHERE
catlink1.cl_to = "Images_from_Wiki_Loves... | {"resultsets": [{"headers": ["actor_name", "count(rev_page)"], "rowcount": 0}], "runningtime": "0.07"} | commonswiki_p |
Top reverter in the year | 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-reverted') AND rev_timestamp LIKE "2021%"
GROUP BY user
ORDER BY cnt DESC
LIMIT 1000; | {"resultsets": [{"headers": ["page_title"], "rowcount": 20}], "runningtime": "1.10"} | tewiki_p |
Omdirigeringar från huvudnamrymden till Wikipedianamnrymden | På svenska Wikipedia. | SELECT page_title, rd_title FROM page
JOIN redirect ON page_id = rd_from
WHERE
page_namespace = 0
AND rd_namespace = 4
LIMIT 100 | {"resultsets": [{"headers": ["actor_id", "actor_name"], "rowcount": 23}], "runningtime": "0.37"} | svwiki_p |
Orphaned File talkpages | Talkpages without a file or a page | #Talkpages without a file or a page.
#1: principlae, 7:file, 11:template, 15:categoria, 119:bozza
SELECT CONCAT("# [[Discussioni file:",page_title,"]]") #,page_namespace, page_is_redirect
FROM page talkpage
WHERE talkpage.page_title NOT LIKE '%/%'
AND talkpage.page_namespace IN (7) # 1,7,11,15,119
AND NOT EXIST... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 66}], "runningtime": "336.30"} | itwiki |
collect all images for WLM per year with country | null | SELECT
subcat.page_title,
catlink2.cl_from,
pg_img.page_title
FROM
page AS subcat
INNER JOIN categorylinks AS catlink1 ON subcat.page_id = catlink1.cl_from
INNER JOIN categorylinks AS catlink2 ON subcat.page_title = catlink2.cl_to
INNER JOIN page AS pg_img ON pg_img.page_id = catlink2.cl_from
WHERE
catlink1.... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.18"} | commonswiki_p |
enwiki log_type values | null | SELECT DISTINCT log_type
FROM logging | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.19"} | enwiki_p |
enwiki log_action values | null | SELECT DISTINCT log_action
FROM logging | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.10"} | enwiki_p |
'zinbot pagetriage reviews on enwiki | Updated periodically | SELECT COUNT(*) AS $curations
FROM logging
WHERE log_type = "pagetriage-curation"
AND log_action = "reviewed"
AND log_actor = "216043524"
AND log_timestamp > 20210911000000 -- First review | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.21"} | enwiki_p |
Most new page reviews of 2021 on enwiki | null | SELECT RANK() OVER (ORDER BY $reviews DESC), actor_name, COUNT(*) AS $reviews
FROM logging
JOIN actor ON log_actor = actor_id
WHERE log_type = "pagetriage-curation"
AND log_action = "reviewed"
AND log_timestamp >= 20210000000000
AND log_timestamp < 20220000000000
GROUP BY 2
ORDER BY 1 ASC | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.08"} | enwiki_p |
Rollb | 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_title"], "rowcount": 0}], "runningtime": "0.05"} | bnwiki_p |
User edits for users in a registration period | user edits for user registered in a time period with min edit count. | Select
user_id,
user_name,
LEFT(user_registration,8) as regdate,
user_editcount
from user
where LEFT(user_registration,8) > "20201231" and LEFT(user_registration,8) < "20220000" AND user_editcount > 59
ORDER BY user_editcount DESC
LIMIT 200
| {"resultsets": [{"headers": ["page_title"], "rowcount": 444}], "runningtime": "0.84"} | tewiki_p |
Top new page reviews of 2021 on nowiki | null | SELECT RANK() OVER (ORDER BY $reviews DESC) AS Rank, actor_name, COUNT(*) AS $reviews
FROM logging
JOIN actor ON log_actor = actor_id
AND (
(
log_type = 'patrol'
AND log_action = 'patrol'
) OR (
log_type = 'pagetriage-curation'
AND log_action = 'reviewed'
)
)
AND log_timestamp >= 20210000000000
AN... | {"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 2220}], "runningtime": "15.45"} | nowiki_p |
ptwiki files with no "oi_archive_name", related to T244567 | null | SELECT oi_name, oi_archive_name
FROM oldimage
WHERE oi_archive_name = "" | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 1703}], "runningtime": "15.06"} | ptwiki |
Top rollbacker in the year | 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') AND rev_timestamp LIKE "2021%"
GROUP BY user
ORDER BY cnt DESC
LIMIT 50; | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 100}], "runningtime": "4.48"} | enwiki |
lowest pageIDs in Wikipedia namespace | null | SELECT page_title, page_len, page_namespace, page_id
FROM page
WHERE page_namespace='4'
# 0/1 main 2/3 user 4/5 wp 6/7 file 8/9 mediawiki 10/11 template
# 12/13 help 14/15 cat 100/101 portal 118/119 draft 710/711 timedtext 828/829 module
# 2300/2301 gadget 2302/2303 g. ... | {"resultsets": [{"headers": ["page_title", "comment_text"], "rowcount": 1971}], "runningtime": "9.87"} | enwiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type", "rc_log_acti... | eswiki |
jawiki files with no "oi_archive_name", related to T244567 | null | SELECT oi_name, oi_archive_name
FROM oldimage
WHERE oi_archive_name = "" | {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 100}], "runningtime": "0.22"} | jawiki |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding, IP-controle, 16 januari 2022, 22:40h | # 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": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"], "rowcount": 1}], "runningtime": "0.08"} | nlwiki_p |
Nguyenmy2302 chart data (Example) | Nguyenmy2302 high frequency data | SELECT
DAYOFWEEK(revision.rev_timestamp) AS dow,
HOUR(revision.rev_timestamp) AS hour,
COUNT(DISTINCT rev_id) AS edits
FROM revision
INNER JOIN actor ON revision.rev_actor = actor.actor_id
INNER JOIN change_tag ON change_tag.ct_rev_id = revision.rev_id
INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_ta... | {"resultsets": [{"headers": ["\u0b87\u0ba8\u0bcd\u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bcd \u0bae\u0bc6\u0baf\u0bcd\u0baa\u0bcd\u0baa\u0bc1\u0baa\u0bcd\u0baa\u0ba3\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b88\u0b9f\u0bc1\u0baa\u0b9f\u0bcd\u0b9f\u0bcb\u0bb0\u0bcd:<br/>"], "rowcount": 40}], "runningtime": "0.88"} | viwiki_p |
ruwiki: all pages names with id's | null | select page_id, page_title from page | {"resultsets": [{"headers": ["rev_actor", "actor_name", "edit_count"], "rowcount": 11}], "runningtime": "2.26"} | ruwiki |
14001027 # of fa articles | null | SELECT COUNT(page_id)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0; | {"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 218}], "runningtime": "16.04"} | fawiki_p |
Orphan articles counted? | null | SELECT page_title
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0
AND page_title LIKE "ارتب%"
#AND page_title LIKE "آبدو%" | {"resultsets": [{"headers": ["Datee", "Translated_articles"], "rowcount": 300}], "runningtime": "0.62"} | fawiki_p |
جلب اسماء صفحات ارشيف نقاش المستخدم التي تحتوي علي اسماء غريبة | null | select distinct pa.page_title from templatelinks as tl
join page as pa
on tl.tl_from = pa.page_id
where
tl.tl_from_namespace = 3
and tl.tl_title IN ("أرشيف_صفحة_رئيسية","تمت_الأرشفة","تصفح_أرشيف")
and pa.page_title like "%/%"
and pa.page_title not REGEXP "([\w|\W]*?)\/أرشيف" | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 73}], "runningtime": "358.63"} | arwiki_p |
User page moves by users with low editcount | recentchanges on commonswiki | -- User moves by users with low editcount
SELECT
DATE_FORMAT(rc_timestamp, "%b %d %Y %h:%i %p") AS ts,
REPLACE(rc_title, '_', ' ') AS oldname,
REPLACE(
SUBSTRING_INDEX(SUBSTRING_INDEX(rc_params, ';', 2), ':', -2),
'"',
' '
) AS newname,
rc_actor AS user_id,
u.user_editcount AS editcount,
u.us... | {"resultsets": [{"headers": ["cpt"], "rowcount": 1}], "runningtime": "0.06"} | fawiki_p |
fawiki articles without any outgoing link | null | select page_title
from page
left join pagelinks
on pl_from = page_id
where
page_namespace = 0
and page_is_redirect = 0
and pl_from is null | {"resultsets": [{"headers": ["PT", "link"], "rowcount": 16}], "runningtime": "15.42"} | fawiki_p |
enwiki articles without any outgoing link | null | select page_title
from page
left join pagelinks
on pl_from = page_id
where
page_namespace = 0
and page_is_redirect = 0
and pl_from is null | {"resultsets": [{"headers": ["log_type"], "rowcount": 29}], "runningtime": "0.35"} | enwiki_p |
Tracking #SheSaid hashtags on English Wikiquote from Oct 1st 2021 (1) | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM enwikiquote_p.revision R
JOIN enwikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN enwikiquote_p.page P ON R.rev_page=P.page_id
JOIN enwikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202201100... | {"resultsets": [{"headers": ["Page", "User", "Diff"], "rowcount": 1333}], "runningtime": "152.15"} | enwikiquote_p |
Tracking #SheSaid hashtags on Catalian Wikiquote from Oct 1st 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM cawikiquote_p.revision R
JOIN cawikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN cawikiquote_p.page P ON R.rev_page=P.page_id
JOIN cawikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"connection_id": 8266966} | cawikiquote_p |
WLM-UA Photo Competition participants 2012-2021 | WLM-UA Photo Competition participants 2012-2021 | SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2012_in_Ukraine",
"Images_fro... | {"resultsets": [{"headers": ["pl_from", "page_title"], "rowcount": 385}], "runningtime": "2.33"} | commonswiki_p |
Organizations_by_country_and_subject | null | use enwiki_p;
select
CONCAT('Category:', cl_to) as category_name,
count(*) as fawiki_counterparts
from (
select cl_to
from categorylinks
join page
on page_id = cl_from
join langlinks
on ll_from = cl_from
and ll_lang = 'fa'
where cl_to in (
select page_title
from categorylinks
join ... | {"resultsets": [{"headers": ["pl_from", "page_title"], "rowcount": 380}], "runningtime": "1.92"} | enwiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Vandalismebestrijding 18 januari 2022, 11:41 (CET) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["user_name", "edits"], "rowcount": 889}], "runningtime": "32.50"} | nlwiki_p |
Count fixes in Wikipedia:Correct typos in one click | null | SELECT COUNT(*)
FROM revision
LEFT JOIN comment on rev_comment_id=comment_id
WHERE rev_page in (60533818,62053073,61925999,61926002,61926007,61926012,61926014,62002342,62002343,62002345,62002348,62002349,61925967,62057349,61925968,61925974,61925980,61925985,61925989,61925991,61925997)
AND comment_text LIKE "% fixed!"; | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.07"} | enwiki_p |
fawiki lonely articles | null | select
page_title
from page
left join pagelinks
on pl_namespace = page_namespace
and pl_title = page_title
left join templatelinks
on tl_namespace = page_namespace
and tl_title = page_title
left join categorylinks
on cl_from = page_id
and cl_to = 'همه_صفحههای_ابهامزدایی'
where
page_namespace = 0
and... | {"resultsets": [{"headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"], "rowcount": 0}], "runningtime": "0.06"} | fawiki_p |
largest FACs | null | SELECT page_title, page_len
FROM page
WHERE page_namespace='4'
AND page_title LIKE 'Featured_article_candidates/%/archive%'
ORDER BY page_len DESC limit 100; | {"resultsets": [{"headers": ["CONCAT('{{Commons:', p.page_title, '}}')"], "rowcount": 89}], "runningtime": "19.45"} | enwiki_p |
fawiki lonely articles with en interwiki links | null | select
page_title,
ll_title
from page
left join pagelinks
on pl_namespace = page_namespace
and pl_title = page_title
left join templatelinks
on tl_namespace = page_namespace
and tl_title = page_title
left join categorylinks
on cl_from = page_id
and cl_to = 'همه_صفحههای_ابهامزدایی'
join langlinks
on ... | {"resultsets": [{"headers": ["actor_name", "rc_this_oldid", "comment_text"], "rowcount": 207}], "runningtime": "39.77"} | fawiki_p |
fawiki lonely articles without interwiki links | null | select
page_title,
page_latest
from page
left join pagelinks
on pl_namespace = page_namespace
and pl_title = page_title
left join templatelinks
on tl_namespace = page_namespace
and tl_title = page_title
left join categorylinks
on cl_from = page_id
and cl_to in (
'همه_صفحههای_ابهامزدایی',
'نام... | {"resultsets": [{"headers": ["actor_name", "group_concat(rc_title order by edits desc separator ' - ')"], "rowcount": 292}], "runningtime": "0.55"} | fawiki_p |
Multiple AfD nominations | Example query for extracting articles with edit comments that match some character string at least k times. In this, AfD mentions.
NOTE: doesn't run to completion on enwiki. | # comments that start with AfD.
# See: https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion#Nominating_article(s)_for_deletion
WITH afd_comments AS (
SELECT
comment_id
FROM comment_revision
WHERE
comment_text LIKE 'AfD:%'
),
# Limit to just namespace 0 articles (no redirects)
articles AS (... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 166}], "runningtime": "10.72"} | enwiki |
صفحات_بها_وصلات_إنترويكي | null | select CONCAT('',page_title,'') AS "موجود في",
CONCAT('{{Q|',cl_sortkey_prefix,'}}') AS " الصفحة ",
COUNT(*) AS "عدد الاستخدامات",page_namespace
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to = "صفحات_بها_وصلات_إنترويكي"
#and cl_sortkey_prefix li... | {"resultsets": [{"headers": ["page_title"], "rowcount": 6693}], "runningtime": "12.50"} | arwiki_p |
plwiki: Gadget extenstion in page title | null | SELECT page_title
FROM page where page_title like '%.gadget'
and page_is_redirect = 0 | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 77}], "runningtime": "15.88"} | plwiki_p |
arwiki lonely articles | null | select
page_title
from page
left join pagelinks
on pl_namespace = page_namespace
and pl_title = page_title
left join templatelinks
on tl_namespace = page_namespace
and tl_title = page_title
left join categorylinks
on cl_from = page_id
and cl_to = 'صفحات_توضيح'
where
page_namespace = 0
and page_is_redi... | {"resultsets": [{"headers": ["page_title", "pp_propname", "pp_value"], "rowcount": 1}], "runningtime": "1.05"} | arwiki_p |
Los 100 usuarios que más ha usado "agradecer" en es_wiki en 202x | Los 100 usuarios que más ha usado "agradecer" en es_wiki en 202x | /* Top 100 users that have sent a "thank you" on English Wikipedia in 2022*/
SELECT ROW_NUMBER() OVER (PARTITION BY SUBSTR(log_timestamp,1,4) ORDER BY COUNT(*) DESC) AS '#',
actor_name as 'User', COUNT(*) as 'Total thanks given in 2022'
FROM
logging, actor
WHERE
log_type= 'thanks'
AND
actor_id = log_actor
AND
... | {"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": 6}], "runningtime": "0.32"} | enwiki_p |
Number of revisions per day | (per the example)
Explanation: This will pull the number of (non-deleted) revisions to a particular wiki and group the numbers by day | SELECT
DATE_FORMAT(rev_timestamp, "%Y-%m-%d") AS day,
COUNT(rev_timestamp) AS revisions
FROM revision
GROUP BY day; | {"connection_id": 8751420} | hiwiki_p |
Top 100 editors in Module namespace in English Wikipedia (in the last 30 days) | null | USE nlwiki_p;
SELECT rc_user_text, COUNT(*)
FROM recentchanges_userindex
WHERE
rc_namespace = 0 AND -- Module namespace
rc_type IN (0, 1) -- Change is an edit of some sort
GROUP BY rc_user_text
ORDER BY COUNT(*) DESC
LIMIT 1000; | {"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": 77}], "runningtime": "0.75"} | nlwiki_p |
Top 100 editors in Module namespace in English Wikipedia (in the last 30 days) | null | USE enwiki_p;
SELECT rc_user_text, COUNT(*)
FROM recentchanges_userindex
WHERE
rc_namespace = 828 AND -- Module namespace
rc_type IN (0, 1) -- Change is an edit of some sort
GROUP BY rc_user_text
ORDER BY COUNT(*) DESC
LIMIT 100; | {"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": 33}], "runningtime": "0.74"} | enwiki |
Los 100 usuarios que más ha usado "agradecer" en es_wiki en 202x | Los 100 usuarios que más ha usado "agradecer" en es_wiki en 202x | /* Top 100 users that have sent a "thank you" on English Wikipedia in 2022*/
SELECT ROW_NUMBER() OVER (PARTITION BY SUBSTR(log_timestamp,1,4) ORDER BY COUNT(*) DESC) AS '#',
actor_name as 'User', COUNT(*) as 'Total thanks given in 2022'
FROM
logging, actor
WHERE
log_type= 'thanks'
AND
actor_id = log_actor
AND
... | {"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": 355}], "runningtime": "1.47"} | ruwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.