title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
cswiki pages containing Legionář template | null | SELECT page_title
FROM templatelinks
JOIN linktarget ON tl_target_id = lt_id
JOIN page ON page_id = tl_from
WHERE lt_title = 'Legionář' | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 36}], "runningtime": "0.14"} | cswiki_p |
nlwiki Improper use of year categories | null | SELECT cl_to, page_title
FROM categorylinks, page
WHERE cl_to REGEXP '_naar_jaar' AND cl_from=page_id AND page_namespace=0 AND page_title NOT REGEXP '[0-9]{4}|_naar_jaar'
LIMIT 50 | {"resultsets": [{"headers": ["ipb_address", "actor_name", "ipb_timestamp", "comment_text"], "rowcount": 34323}], "runningtime": "49.04"} | nlwiki |
Tewiki: New pages created, using content translation in 2021 | All publishings from Content translation tool, repeat publishings are not counted, first time overwriting is counted | use tewiki_p;
select
-- concat(substr(rev_timestamp,1,4),"-",substr(rev_timestamp,5,2),"-",substr(rev_timestamp,7,2)) as Date_time,
-- actor_name as User,
page_title-- , rev_len
first_edit
from
change_tag,
change_tag_def,
revision,
page,
actor
where
ct_tag_id = ctd_id
and rev_id = ct_rev_id
and pa... | {"resultsets": [{"headers": ["page_title"], "rowcount": 3}], "runningtime": "6.96"} | tewiki |
500 forgotten articles | Redirects, disambiguation pages and non-article-namespace pages are excluded (i.e. only real articles should show up here) | SELECT CONCAT("# [[",page.page_title,"]]") AS title, page.page_id AS id, revision.rev_timestamp AS timestmp
FROM page
JOIN revision ON page.page_latest=revision.rev_id
WHERE page.page_namespace=0
AND page.page_is_redirect=0
AND page.page_id NOT IN (
SELECT pp_page FROM page_props WHERE pp_propname='disambiguatio... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 4}], "runningtime": "51.01"} | tewiki_p |
అత్యధికంగా "ధన్యవాదాలు" ఉపయోగించిన 100 మంది వినియోగదారులు | null | SELECT (ROW_NUMBER() OVER (PARTITION BY 'Total' ORDER BY COUNT(*) DESC)) AS '#',
concat('[[Username:',actor_name,'|',actor_name,']]') as 'Username/a', COUNT(*) as 'Total'
FROM
logging, actor
WHERE
log_type= 'thanks'
AND
actor_id = log_actor
AND
SUBSTR(log_timestamp,1,4) = '2022'
AND
log_namespace = '2'
G... | {"connection_id": 49779616} | tewiki_p |
Bulk edits, 27 Sep 2022 | null | SELECT actor_name, SUBSTRING(rc_timestamp, 9, 2) hour, COUNT(*) AS edits
FROM recentchanges
JOIN actor ON actor_id = rc_actor
WHERE rc_timestamp BETWEEN "20220927000000" AND "20220927235959"
GROUP BY actor_name, hour
HAVING edits>1
ORDER BY actor_name, hour | {"resultsets": [{"headers": ["comment_text"], "rowcount": 5000}], "runningtime": "5.11"} | tewiki_p |
around János Korom's appartment | null | #use commonswiki_p;
set @cat1:="Photographs_by_János_Korom";
#describe geo_tags;
select distinct #gt_lat, gt_lon, gt_page_id,
(select concat (page_title,"|") from page where page_id = gt_page_id) as title
#,count(*)
from geo_tags
inner join categorylinks on gt_page_id = cl_from
wher... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 74}], "runningtime": "0.53"} | commonswiki_p |
Query 68022 | null | select concat("Category:", page_title) as "from", concat("Category:",pl_title) as "to"
from templatelinks join pagelinks on pl_from=tl_from join page on page_id=tl_from
where tl_namespace=10 and tl_title="Category_redirect" and pl_namespace=14
and not exists (select * from page where page_namespace=14 and page_title=p... | {"resultsets": [{"headers": ["CONCAT('[[\u0645\u0633\u062a\u062e\u062f\u0645:',actor_name,'|',actor_name,']]')", "COUNT(*)"], "rowcount": 48}], "runningtime": "606.09"} | enwiki |
Query 68022 | null | select concat("Category:", page_title) as "from", concat("Category:",pl_title) as "to"
from templatelinks join pagelinks on pl_from=tl_from join page on page_id=tl_from join linktarget on tl_target_id = lt_id
where lt_namespace=10 and lt_title="Category_redirect" and pl_namespace=14
and not exists (select * from page ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 384}], "runningtime": "3.54"} | enwiki |
#/articles in CAT:LP, and #/those that are footballers | Identical to queries #33441 and #33442 (except for the updated schema).
Specifically, the first query is the number of pages in the enwiki main namespace that are in [[Category:Living people]]; and the second is the number of those that transclude {{Infobox football biography}}.
For [[WT:RAQ#Proportion of biographies... | SELECT COUNT(*)
FROM categorylinks
JOIN page ON page_id = cl_from
WHERE page_namespace = 0
AND cl_to = 'Living_people';
SELECT COUNT(*)
FROM page
JOIN templatelinks ON page_id = tl_from
JOIN linktarget ON lt_id = tl_target_id
JOIN categorylinks ON page_id = cl_from
WHERE page_namespace = 0
AND cl_to = 'Living_peop... | {"resultsets": [{"headers": ["Artikel", "Weiterleitung"], "rowcount": 0}], "runningtime": "1.38"} | enwiki_p |
Wikidata items with <i> and </i> HTML tags in labels | null | SELECT
wbit_item_id as id,
wbxl_language as language,
wbx_text as text
FROM wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id = wby_id
LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
LEFT JOIN wbt_text ON wbxl_text_id = wbx_id
WHERE wby_nam... | {"resultsets": [{"headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}], "runningtime": "15.73"} | wikidatawiki_p |
List of redirects to categoryspace without {{R to category}} | null | SELECT page_namespace, page_title
FROM page
JOIN redirect ON rd_from = page_id
JOIN templatelinks ON tl_from = page_id
WHERE page_is_redirect = 1
AND rd_namespace = 14
AND tl_target_id = (SELECT lt_id FROM linktarget WHERE lt_namespace = 10 AND lt_title = 'R_to_category')
ORDER BY page_title ASC | {"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace", "tl_target_id"], "rowcount": 1}], "runningtime": "0.06"} | enwiki |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["title", "size"], "rowcount": 36337}], "runningtime": "44.15"} | tewiki |
WLM2022 pre-check | null | SELECT img_name
FROM categorylinks, page, image_compat
WHERE
cl_to="Images_from_Wiki_Loves_Monuments_2022_in_Finland"
AND cl_from=page_id
AND page_namespace=6
AND img_name=page_title
AND img_user_text NOT IN ('Zache', 'Zache-test', 'Eteil', 'Htm')
AND img_width*img_height>1000000
# AND img_width... | {"resultsets": [{"headers": ["Actor", "Edits", "Uploaded images", "Images KiB", "Images MiB", "Images GiB", "Images TiB"], "rowcount": 3}], "runningtime": "14.58"} | commonswiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["title", "size"], "rowcount": 65994}], "runningtime": "71.48"} | tewiki |
bsumsearch | 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
comment.comment_text REGEXP '.*Test.*'
ORDER BY ipb_timestamp DES... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 10000}], "runningtime": "309.86"} | enwiki_p |
Railway stations in Switzerland without geocoded images | Subcategories of https://commons.wikimedia.org/wiki/Category:Railway_stations_in_Switzerland_by_name that contain no geocoded images. | SELECT CONCAT('Category:', page_title) AS category_title
FROM categorylinks INNER JOIN page ON cl_from = page_id
WHERE cl_to = 'Railway_stations_in_Switzerland_by_name' AND cl_type = 'subcat' AND (
SELECT cl1.cl_from
FROM categorylinks AS cl1 JOIN categorylinks AS cl2 ON cl1.cl_from = cl2.cl_from
WHERE cl1.cl_t... | {"resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 5}], "runningtime": "0.05"} | commonswiki_p |
T320814 workaround | null | SELECT CONCAT('Kategorie:', page_title)
FROM page_props
JOIN page ON pp_page = page_id
WHERE pp_propname = 'unexpectedUnconnectedPage'
AND pp_sortkey = -14 -- the special page incorrectly searches for 14
ORDER BY pp_page DESC; | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 59}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 8}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 16}], "runningtime": "0.23"} | dewiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["page_title"], "rowcount": 30}], "runningtime": "0.12"} | tewiki |
#SheSaid on Italian Wikiquote from Oct 1st 2022 till 31 Dec | null | SELECT
page_title,
page_namespace,
actor_name,
rev_timestamp,
comment_text
FROM
revision
JOIN comment_revision ON rev_comment_id=comment_id
JOIN page ON rev_page=page_id
JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_timestamp BETWEEN 20221001000000 AND 20221231999999
AND comment_text ... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"], "rowcount": 4}], "runningti... | itwikiquote_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment", "cl_from", "cl_to", "cl_sort... | enwiki_p |
Incorrect Quarry | Incorrect syntax |
*/
function getSqlConnection() {
$credentials = include_once 'credentials.php';
$connection = new mysqli(
'meta.web.db.svc.wikimedia.cloud',
$credentials['username'],
$credentials["password"],
'meta_p'
); | {"resultsets": [{"headers": ["title", "size"], "rowcount": 65994}], "runningtime": "69.97"} | wikipedia |
IP subpage un/deletions | All logged deletions and restorations of userspace subpages of IPs.
For [[WT:CSD#Clarification on U2 for IP subpages]] circa 15 October 2022. | SELECT CAST(log_timestamp AS DATETIME) AS time_stamp,
log_action,
actor_name,
CONCAT('User:', REPLACE(log_title, '_', ' ')) AS page_name,
comment_text
FROM logging_logindex
JOIN actor_logging ON actor_id = log_actor
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_namespace = 2
... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 3071}], "runningtime": "24.00"} | enwiki_p |
Count fixes by editor in Wikipedia:Correct typos in one click | null | SELECT actor_name AS contributor, COUNT(*) AS fixes
FROM revision
LEFT JOIN comment ON rev_comment_id=comment_id
LEFT JOIN actor ON rev_actor=actor_id
WHERE rev_page IN (60533818,62053073,61925999,61926002,61926007,61926012,61926014,62002342,62002343,62002345,62002348,62002349,61925967,62057349,61925968,61925974,61925... | {"connection_id": 51242573} | enwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"connection_id": 51213078} | tewiki |
Users with most edits in the past month (including bots and IPs) | List of a user's edit times. | SELECT
actor.actor_name AS thành_viên,
GROUP_CONCAT(DISTINCT user_groups.ug_group) AS nhóm,
COUNT(DISTINCT rev_id) AS lần_sửa_đổi
FROM revision LEFT JOIN actor ON (revision.rev_actor = actor.actor_id)
LEFT JOIN user_groups ON (actor.actor_user = user_groups.ug_user)
-- Lọc theo thời gian
WHERE DATEDIFF(CURDATE(... | {"resultsets": [{"headers": ["page_title"], "rowcount": 200}], "runningtime": "20.78"} | viwiki_p |
Demo of planned {{random image}} | null | select il_to from imagelinks join page on page_id=il_from where page_namespace=2 and page_title="Legoktm/sandbox"; | {"resultsets": [{"headers": ["page_title"], "rowcount": 50}], "runningtime": "2.58"} | enwiki_p |
T256704 | null | SELECT ptrp_created, ptrp_page_id FROM pagetriage_page WHERE ptrp_page_id NOT IN (SELECT page_id FROM page) and ptrp_created != 0 order by ptrp_created asc limit 10;
#SELECT count(*) FROM pagetriage_page WHERE ptrp_page_id NOT IN (SELECT page_id FROM page);
#SELECT count(*) FROM pagetriage_page;
select * from archive w... | {"resultsets": [{"headers": ["Page Name", "Nav Template"], "rowcount": 500}], "runningtime": "0.74"} | enwiki |
Csonklapok megszámolása | null | SELECT * FROM category
where SUBSTR(cat_title FROM 1 FOR 5) = 'Csonk'
and cat_subcats>=5
order by cat_pages DESC; | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.50"} | huwiki_p |
Biografien mit Klammerlemma am 5. September 2020 in der deWP | null | USE dewiki_p;
SELECT page_title
FROM page, templatelinks
WHERE page_namespace = 0
AND page_title like '%\_(%)'
AND tl_from = page_id
AND tl_namespace = 10
AND tl_title = 'Personendaten' | {"resultsets": [{"headers": ["user_talk"], "rowcount": 10000}], "runningtime": "751.08"} | dewiki_p |
Klammerlemmata 16. Oktober 2022 | dewiki_p | SELECT page_title
FROM page, templatelinks, linktarget
WHERE page_namespace = 0
AND page_title like '%\_(%)'
AND tl_from = page_id
AND tl_target_id = lt_id
AND lt_namespace = 10
AND lt_title = 'Personendaten' | {"resultsets": [], "runningtime": "0.03"} | dewiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 1}], "runningtime": "51.03"} | tewiki |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 1}], "runningtime": "0.12"} | tewiki |
#SheSaid on Igbo Wikiquote from Oct 1st 2022 till 31 Dec | null | SELECT
page_title,
page_namespace,
actor_name,
rev_timestamp,
comment_text
FROM
revision
JOIN comment_revision ON rev_comment_id=comment_id
JOIN page ON rev_page=page_id
JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_timestamp BETWEEN 20221001000000 AND 20221231999999
AND comment_text ... | {"resultsets": [{"headers": ["log_id", "log_timestamp", "log_actor", "log_namespace", "log_page", "log_title", "rd_title", "img_metadata"], "rowcount": 10}], "runningtime": "0.07"} | igwikiquote_p |
Użytkownicy, którzy przesłali pliki w ramach WLZ 2022 | Wszystkie zdjęcia, bez ograniczeń rozdzielczości | SELECT actor_name AS "Użytkownik", COUNT(*) AS "Wgrane multimedia" FROM page
JOIN categorylinks ON page_id = cl_from
JOIN image ON img_name = page_title
JOIN actor ON img_actor = actor_id
WHERE page_namespace = 6
AND cl_to = "Images_from_Wiki_Loves_Monuments_2022_in_Poland"
GROUP BY img_actor
ORDE... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
Użytkownicy, którzy przesłali pliki w ramach WLZ 2022, >= 6Mpix | Wszystkie zdjęcia większe lub równe 6 Mpix | -- Rozdzielczość w pikselach (Mpix = milion pikseli)
SET @treshold := 6000000;
SELECT actor_name AS "Użytkownik", COUNT(*) AS "Wgrane multimedia" FROM page
JOIN categorylinks ON page_id = cl_from
JOIN image ON img_name = page_title
JOIN actor ON img_actor = actor_id
WHERE page_namespace = 6
AND cl_to = "... | {"connection_id": 36844555} | commonswiki_p |
(TOTAL) SDC edits by user and edit summary #WMSE-WLM-suriname | 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": ["rev_id", "rev_actor"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
Short file names | null | select img_name from image order by length(img_name) asc limit 1000; | {"resultsets": [{"headers": ["count(distinct page_title)"], "rowcount": 1}], "runningtime": "7.00"} | enwiki_p |
---- | null | -- select * from page where page_title like "Insulin" and page_namespace = 0
-- page_latest = 1114518855
-- select * from revision where rev_id = 1114518855 limit 10
-- SHOW TABLES FROM enwiki_p;
describe text | {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 20}], "runningtime": "0.08"} | enwiki |
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": ["id", "type", "language", "description"], "rowcount": 1000}], "runningtime": "159.96"} | eswiki |
[2022] Wikidata for authorities, SHM and Nationalmuseum users | null | SELECT actor.actor_name as Username,
COUNT(distinct page.page_id) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE actor.actor_name in (
'Azad Karimi',
'Elinor Rajka',
'Eva L Vedin',
'Karin Glasemann, Nationalmuseum',
'LinneaKarlberg',
'Elinme... | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 579}], "runningtime": "5.24"} | wikidatawiki_p |
[2021] Wikidata for authorities, SHM and Nationalmuseum users | null | SELECT actor.actor_name as Username,
COUNT(distinct page.page_id) AS cnt
FROM page
JOIN revision ON page.page_id=revision.rev_page
JOIN actor ON revision.rev_actor=actor.actor_id
WHERE actor.actor_name in (
'Azad Karimi',
'Elinor Rajka',
'Eva L Vedin',
'Karin Glasemann, Nationalmuseum',
'LinneaKarlberg',
'Elinme... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.06"} | wikidatawiki_p |
Top Undo users in the last month | null | SELECT actor_name, COUNT(*) FROM recentchanges
INNER JOIN actor ON rc_actor = actor_id
INNER JOIN comment ON rc_comment_id = comment_id
WHERE comment_text LIKE "Undid%"
GROUP BY actor_name
ORDER BY COUNT(*) DESC;
| {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 76}], "runningtime": "4.96"} | enwiki_p |
nlwiki Page stats | null | /*SELECT COUNT(*) FROM page;
SELECT COUNT(*) FROM page WHERE page_is_redirect=0;
SELECT COUNT(*) FROM page WHERE page_namespace=0;
SELECT COUNT(*) FROM page WHERE page_is_redirect=0 AND page_namespace=0;
SELECT COUNT(*) FROM page WHERE page_is_redirect=0 AND page_namespace=0 AND NOT EXISTS (
SELECT * FROM page_props ... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 10000}], "runningtime": "423.40"} | nlwiki |
zhwiki: revision 3 | null | SELECT rev_id, rev_page, rev_timestamp, rev_sha1, rev_actor
FROM revision AS rev1
WHERE rev1.rev_page IN
(SELECT rev_page FROM revision AS rev2 WHERE
rev2.rev_timestamp >= 20220601000000
AND rev2.rev_timestamp < 20220701000000
) | {"resultsets": [{"headers": ["rc_cur_id", "rc_title", "rc_patrolled"], "rowcount": 1211}], "runningtime": "1.47"} | zhwiki_p |
Wikidata items with � in labels | null | SELECT
wbit_item_id as id,
wbxl_language as language,
wbx_text as text
FROM wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id = wby_id
LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
LEFT JOIN wbt_text ON wbxl_text_id = wbx_id
WHERE wby_nam... | {"resultsets": [{"headers": ["cl_from", "cl_to_A", "cl_to_B", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 5}], "runningtime": "18.72"} | wikidatawiki_p |
wikidata: P4510 | null | SELECT
wbxl_language as term_language,
wby_name as term_type,
wbx_text as term_text
FROM wbt_property_terms
INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id
INNER JOIN wbt_type ON wbtl_type_id = wby_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
INNER JOIN wbt_text ON wbxl_text_id... | {"resultsets": [{"headers": ["page_title", "page_len", "page_touched"], "rowcount": 0}], "runningtime": "0.95"} | wikidatawiki_p |
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת | null | select user_name, count(page_title)
from user join revision_userindex join page join actor
on user_id = actor_user
and rev_page = page_id
and rev_actor = actor_id
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
and rev_deleted = 0
group by user_name
having count(page_title) >= 50
order by count(... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 60}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 8}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 16}], "runningtime": "0.28"} | hewiki_p |
Vandalismebestrijding nlwiki | 6262, 19 oktober 2022, 22:28 (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": ["CONCAT('# [[:{{ns:', page_namespace, '}}:', REPLACE(page_title, '_', ' '), ']]',\n IF(page_title LIKE '%\u200b%', ' ZW space', ''),\n IF(page_title LIKE '\u200c%', ' leading ZW non-joiner', ''),\n IF(page_title LIKE '\u200d%', '"], "rowcount": 52}], "... | nlwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 10205}, {"headers": ["rev_id", "rev_timestamp", "rev_len", "rev_parent_id"], "rowcount": 379}, ... | tewiki |
Wikidata items with %20 in labels | null | SELECT
CONCAT("Q",wbit_item_id) as id,
CONCAT("L",wbxl_language) as language,
wbx_text as text
FROM wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id = wby_id
LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
LEFT JOIN wbt_text ON wbxl_text_i... | {"resultsets": [{"headers": ["page_id", "page_title", "el_to"], "rowcount": 6541}], "runningtime": "143.43"} | wikidatawiki |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 48}], "runningtime": "0.15"} | tewiki |
understanding wiki page structure | null | #externallinks, category, categorylinks, content, interwiki, iwlinks, linktarget, page, pagelinks, sites,
#select * from sites where site_global_key like 'enwiki' limit 10;
#select * from sites where site_group not rlike 'wiki|wik' and site_type not rlike 'wik|wiki' limit 10;
select * from page limit 10; | {"resultsets": [{"headers": ["title", "namespace", "times deleted", "exists"], "rowcount": 1000}], "runningtime": "24.73"} | enwiki_p |
All extension pages at MW | null | SELECT page_title from page where page_namespace = 102 and page_title not like "%/%"; | {"resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 14}], "runningtime": "0.20"} | mediawikiwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["img_name", "img_size", "img_width", "img_height", "img_metadata", "img_bits", "img_media_type", "img_major_mime", "img_minor_mime", "img_description_id", "img_actor", "img_timestamp", "img_sha1"], "rowcount": 10}], "runningtime": "0.07"} | tewiki |
Top NPP reviewers (articles only) for 2022 | null | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Article Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp ... | {"resultsets": [{"headers": ["Tables_in_commonswiki_p"], "rowcount": 110}], "runningtime": "0.16"} | enwiki_p |
New Page Reviewers eligible for barnstars - 2022(redirects) | null | SELECT actor_name AS `Reviewer`,
COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirect Reviews`
FROM (
SELECT distinct log_actor, log_page, page_is_redirect
FROM logging_userindex
JOIN page ON page_title = log_title AND page_namespace = log_namespace
WHERE log_timestamp BET... | {"resultsets": [{"headers": ["il_from", "il_to", "il_from_namespace"], "rowcount": 10}], "runningtime": "0.07"} | enwiki_p |
triage tags by page count | For [[WP:RAQ#pagetriage_page_tags]] circa 21 October 2022. | SELECT COUNT(*), ptrt_tag_name, ptrt_tag_desc
FROM pagetriage_page_tags
JOIN pagetriage_tags ON ptrpt_tag_id = ptrt_tag_id
GROUP BY ptrpt_tag_id; | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 49}], "runningtime": "0.21"} | enwiki_p |
T321322 | This is the wrong approach for the question, but here's what's wrong with the query (JOIN...ON syntax; spelling of EXISTS; and t2.ptrpt_tag_name→t2.ptrt_tag_name) | SELECT *
FROM pagetriage_page_tags pt1
JOIN pagetriage_tags t1 ON pt1.ptrpt_tag_id = t1.ptrt_tag_id
WHERE t1.ptrt_tag_name = 'copyvio'
AND NOT EXISTS (
SELECT *
FROM pagetriage_page_tags pt2
JOIN pagetriage_tags t2 ON pt2.ptrpt_tag_id = t2.ptrt_tag_id
WHERE pt2.ptrpt_page_id = pt1.ptrpt_page_id
AND ... | {"resultsets": [{"headers": ["pp_propname"], "rowcount": 34}], "runningtime": "0.09"} | enwiki_p |
pages with exactly one triage tag | For [[WP:RAQ#pagetriage_page_tags]] circa 21 October 2022. | SELECT page_namespace, page_title, ptrpt_page_id, ptrp_created, ptrp_reviewed, ptrp_reviewed_updated, COUNT(*)
FROM pagetriage_page_tags
LEFT JOIN pagetriage_page ON ptrp_page_id = ptrpt_page_id
LEFT JOIN page ON page_id = ptrpt_page_id
GROUP BY ptrpt_page_id
HAVING COUNT(*) = 1; | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 49}], "runningtime": "0.55"} | enwiki_p |
pages with exactly one triage tag | For [[WP:RAQ#pagetriage_page_tags]] circa 21 October 2022. | SELECT pagetriage_page_tags.*, ptrt_tag_name, ptrt_tag_desc
FROM pagetriage_page_tags
JOIN pagetriage_tags ON ptrpt_tag_id = ptrt_tag_id
GROUP BY ptrpt_page_id
HAVING COUNT(*) = 1
ORDER BY ptrpt_tag_id ASC;
| {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 171}, {"headers": ["page_id", "page_title"], "rowcount": 33}], "runningtime": "4.88"} | enwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["el_id", "el_from", "el_to", "el_index", "el_index_60"], "rowcount": 7}], "runningtime": "0.07"} | tewiki |
pairs of source and destination of all links | Trying to make a wikipedia game bot | SELECT pl_from, pl_title FROM pagelinks | {"resultsets": [{"headers": ["edits", "ns", "title"], "rowcount": 61}, {"headers": ["edits", "ns"], "rowcount": 3}], "runningtime": "3.72"} | enwiki |
Wikidata items with special characters in labels | null | SELECT
CONCAT("Q",wbit_item_id) as id,
CONCAT("L",wbxl_language) as language,
wbx_text as text
FROM wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id = wby_id
LEFT JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
LEFT JOIN wbt_text ON wbxl_text_i... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 702}], "runningtime": "318.20"} | wikidatawiki_p |
Wikidata items with \w in labels | null | use wikidatawiki_p;
SELECT CURRENT_DATE;
DESCRIBE wbt_item_terms;
SELECT DISTINCT wby_name from wbt_type limit 10;
| {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 89}], "runningtime": "17.63"} | wikidatawiki_p |
wikidata schema exploration | null | use wikidatawiki_p;
-- SELECT * FROM wbt_item_terms LIMIT 10;
-- SELECT * FROM wbt_property_terms LIMIT 10;
-- SELECT * FROM wbt_term_in_lang LIMIT 10;
-- SELECT * FROM wbt_text LIMIT 10;
-- SELECT * FROM wbt_text_in_lang LIMIT 10;
-- SELECT * FROM wbt_type LIMIT 10;
-- SELECT * FROM wb_items_per_site LIMIT 10;
-- S... | {"resultsets": [{"headers": ["==Maddeler=="], "rowcount": 3016}], "runningtime": "3.98"} | wikidatawiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "4.24"} | tewiki |
tawiki possibly dead people with living category added | null | SELECT pg1.page_title FROM page AS pg1
JOIN categorylinks ON pg1.page_id = cl_from
WHERE cl_to = 'வாழும்_நபர்கள்'
AND EXISTS (SELECT 1 FROM page AS pg2
JOIN categorylinks ON pg2.page_id = cl_from
WHERE pg1.page_title = pg2.page_title
AND pg2.page_namespace = 0
AND ... | {"resultsets": [{"headers": ["rc_title", "tdif"], "rowcount": 2069}], "runningtime": "67.06"} | tawiki_p |
ruwiki: Pages with longest titles | null | select CHAR_LENGTH(page_title), page_is_redirect, page_namespace, replace(page_title, "_", " ")
from page
order by CHAR_LENGTH(page_title) desc
limit 100 | {"resultsets": [{"headers": ["tl_title", "tl_from_namespace"], "rowcount": 53}], "runningtime": "0.11"} | ruwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"connection_id": 74627855} | tewiki |
Zemplén hivatkozások | null | select * from pagelinks
where pl_title='Zemplén' and pl_from_namespace!=0;
| {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 1}], "runningtime": "0.07"} | huwiki_p |
comparison | null | SELECT
rc1.rc_user_text,
rc1.rc_title,
min(rc1.rc_timestamp) as 91_197_23_timestamp,
min(r1.rev_timestamp) as abc10_timestamp,
group_concat(rc1.rc_comment)
FROM
recentchanges_compat as rc1,
revision_compat as r1
WHERE
rc1.rc_user_text LIKE "91.197.23%"
AND rc1.rc_namespace=0
AND rc1.rc_source NOT IN ("mw.categorize"... | {"resultsets": [{"headers": ["page_title"], "rowcount": 343}], "runningtime": "0.80"} | fiwiki_p |
Ruwiki IWRM.js usage → wikitable | null | SELECT
CONCAT('[[User:', actor_name, '|]]') AS User,
COUNT(rev_id) AS Edits
FROM revision
JOIN actor ON rev_actor = actor_id
JOIN change_tag ON ct_rev_id = rev_id
JOIN change_tag_def ON ct_tag_id = ctd_id
WHERE ctd_name = 'iwrm'
GROUP BY rev_actor
ORDER BY edits DESC; | {"resultsets": [{"headers": ["ctd_id", "ctd_name", "ctd_user_defined", "ctd_count", "ct_id", "ct_rc_id", "ct_log_id", "ct_rev_id", "ct_params", "ct_tag_id", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 10}], "... | ruwiki_p |
المقالات المُراجعة آخر 7 أيام مع اسم المراجع | قائمة الصفحات المراجعة (قبول المراجعة) في آخر أسبوع، مع اسم المستخدم الذي أدّى الفعل، مُرتبة بالأحدث في البداية. | use arwiki_p;
select CONCAT('[[',page_title,']]') as "المقالة", actor_name as "المراجع"
from logging
INNER JOIN actor ON logging.log_actor = actor.actor_id
LEFT JOIN page ON logging.log_page = page.page_id
where log_action = "approve-i"
and log_timestamp > DATE_SUB(NOW(), INTERVAL 1 WEEK)
and log_namespace = 0
and page... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.07"} | arwiki_p |
WPWPTE upto-the-minute stats | null | /* select count(rev_page) as total from revision,comment
where comment_id=rev_comment_id
and comment_text like "%WPWPTE%"
and rev_timestamp>="2021070100000";
-- ---
*/select actor_name,count(rev_actor) as countt from revision,comment,actor,page
where comment_id=rev_comment_id
and rev_actor=actor_i... | {"resultsets": [{"headers": ["page_title"], "rowcount": 50}], "runningtime": "0.90"} | tewiki |
ۀ | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%ۀ%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["actor_name", "countt"], "rowcount": 16}], "runningtime": "0.53"} | fawiki_p |
Whole route from [[Category:Auto racing]] to [[Category:Formula One]] | Depth and route to [[Category:Formula One]] in the [[Category:Auto racing]] tree.
For [[WP:VPT#Petscan depth]] circa 23 October 2022. | SET @basecat = 'Auto_racing';
SET max_recursive_iterations = 7;
WITH RECURSIVE deepcat (subcat, route, depth) AS
(
SELECT @basecat,
@basecat,
0
UNION
SELECT page_title,
CONCAT(route, ' > ', page_title),
depth + 1
FROM categorylinks
JOIN page ON page_id = cl_from AND page... | {"resultsets": [{"headers": ["page_title", "rev_timestamp", "Wikidata"], "rowcount": 16}], "runningtime": "28.48"} | enwiki_p |
Egyesült Államok | null | Select * from pagelinks where pl_title='Egyesült_Államok' and pl_from_namespace=0; | {"resultsets": [{"headers": ["Actor", "Edits", "Uploaded images", "Images KiB", "Images MiB", "Images GiB", "Images TiB"], "rowcount": 3}], "runningtime": "15.52"} | huwiki_p |
نرمکامی | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%نرمکامی%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["page_id", "page_title", "el_to"], "rowcount": 14}], "runningtime": "211.83"} | fawiki_p |
واکدار | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%واکدار%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["Zasugerowano edycj\u0119: dodanie link\u00f3w", "w tym wycofane"], "rowcount": 1}], "runningtime": "0.12"} | fawiki_p |
بیواک | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%بیواک%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "2.31"} | fawiki_p |
nlwiki Articles by GrashoofdBot | null | SELECT page.*
FROM actor, revision, page
WHERE actor_name='GrashoofdBot' AND actor_id=rev_actor AND rev_parent_id=0 AND rev_page=page_id AND page_namespace=0 AND
page_is_redirect=0
LIMIT 10 | {"resultsets": [{"headers": ["rc_cur_id", "rc_title", "rc_patrolled"], "rowcount": 1473}], "runningtime": "1.88"} | nlwiki |
New articles and drafts | All undeleted pages in the article or draft namespace created between a give start and end timestamp. | SET @start_time = '20211001';
SET @end_time = '20220331';
SELECT
page_id,
page_namespace,
page_title,
rev_timestamp AS 'created_at'
FROM
revision
JOIN page ON rev_page = page_id
WHERE
page_namespace IN (0, 118) AND
rev_parent_id = 0 AND
rev_timestamp BETWEEN @start_time AND @end_time | {"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 47}], "runningtime": "0.22"} | enwiki |
Unique participants to @ISA on Commons | null | SELECT DISTINCT actor_name, rev_actor
FROM
revision
JOIN comment_revision ON rev_comment_id=comment_id
JOIN page ON rev_page=page_id
JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_timestamp BETWEEN 20220101000000 AND 20221231999999
AND comment_text RLIKE '.*@ISA*'
ORDER BY
rev_timestamp DESC; | {"resultsets": [{"headers": ["Page", "Deleting admin", "Edit summary", "Timestamp"], "rowcount": 6404}], "runningtime": "27.64"} | commonswiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["Reviewer", "Redirects", "Articles", "Total"], "rowcount": 10}], "runningtime": "27.17"} | eswiki |
Category graph | null | WITH edges AS (
SELECT cl_from AS ref_child_id, page_id AS ref_parent_id FROM
categorylinks
INNER JOIN page ON cl_to=page_title AND page_namespace=14
)
(
SELECT ref_child_id, ref_parent_id FROM edges
WHERE ref_parent_id = 692318
)
UNION
(
SELECT e1.ref_child_id AS ref_child_id, e2.ref_parent_id AS ref_parent_i... | {"connection_id": 55555322} | enwiki_p |
Category finite transitive closure | null | WITH
edges AS (
SELECT cl_from AS ref_child_id, page_id AS ref_parent_id FROM
categorylinks
INNER JOIN page ON cl_to=page_title AND page_namespace=14
),
edges_2 AS (
SELECT edges.ref_child_id AS ref_child_id, e2.ref_parent_id AS ref_parent_id
FROM edges, edges e2
WHERE edges.ref_parent_id = e2.ref_child_id
),... | {"connection_id": 55586194} | enwiki_p |
همخوان | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%همخوان%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "log_id", "log_type", "log_action", "l... | fawiki_p |
Template count in arwiki | null | select
count(page_id)
from
page
where
page_namespace = 10 and -- Template
page_is_redirect <> 1; -- Don't count redirects | {"resultsets": [{"headers": ["img_name"], "rowcount": 1}], "runningtime": "0.07"} | arwiki_p |
Template count in eswiki | null | select
count(page_id)
from
page
where
page_namespace = 10 and -- Template
page_is_redirect <> 1; -- Don't count redirects | {"resultsets": [{"headers": ["img_name", "img_metadata"], "rowcount": 1}], "runningtime": "0.06"} | eswiki_p |
Template count in jawiki | null | select
count(page_id)
from
page
where
page_namespace = 10 and -- Template
page_is_redirect <> 1; -- Don't count redirects | {"resultsets": [{"headers": ["cl_to"], "rowcount": 9002}], "runningtime": "189.96"} | jawiki_p |
Sandboxes in use | null | select * from templatelinks join page on page_id=tl_from
join linktarget on lt_id=tl_target_id
where lt_namespace in (10)
and tl_from_namespace=0 and lt_title like "%/sandbox"
limit 750; | {"resultsets": [{"headers": ["img_name", "img_metadata"], "rowcount": 0}], "runningtime": "0.06"} | frwiki_p |
Unreviewed new redirects by user | Count of articles in the enwiki new pages patrol queue grouped by user that created them. | SELECT actor_name, page_title, COUNT(*)
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
JOIN revision ON rev_page = page_id
JOIN actor ON actor_id = rev_actor
WHERE ptrp_reviewed = 0
AND page_namespace = 0
AND page_is_redirect = 1
AND rev_parent_id = 0
GROUP BY actor_name
ORDER BY ... | {"resultsets": [{"headers": ["img_name", "img_metadata"], "rowcount": 1}], "runningtime": "0.08"} | enwiki |
Abkürzungs-Lemma | https://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:Wurgl&oldid=227314760#Bitte_um_Hilfe:_Nächstes_Kapitel_Abkürzungen | WITH BklAbkz AS (
/* Alle Seiten in der Kategorie "Abkürzung" rausfischen */
SELECT page_id AS bkl_page, UPPER(CONVERT(page_title USING utf8)) AS bkl_title
FROM page, categorylinks
WHERE page_namespace = 0
AND page_id = cl_from
AND cl_to = 'Abkürzung'
)
SELECT CONCAT('[[', page_... | {"resultsets": [{"headers": ["COUNT(DISTINCT w1.ips_item_id)"], "rowcount": 1}], "runningtime": "15.94"} | dewiki_p |
number of content translated pages in fiwiki | null | SELECT
COUNT(DISTINCT(page_id)) AS c,
page_namespace
FROM
change_tag_def,
change_tag,
revision,
page
WHERE
page_id=rev_page
AND ctd_name LIKE "%transl%"
AND ct_tag_id=ctd_id
AND rev_id=ct_rev_id
GROUP BY page_namespace | {"resultsets": [{"headers": ["time", "rc_title", "actor_name", "comment_text"], "rowcount": 77}], "runningtime": "0.54"} | fiwiki_p |
Content translation reference errors (#1) | null | select
page_title,
page_namespace,
r.rev_timestamp,
group_concat(ctd_name) AS tags
FROM
(
SELECT
MIN(rev_timestamp) AS min_rev_timestamp,
rev_page
FROM
categorylinks,
revision
WHERE
cl_from=rev_page
AND cl_to = "Sivut,_joissa_on_viittausvirheitä"
... | {"resultsets": [{"headers": ["wbit_id", "wbit_item_id", "wbit_term_in_lang_id"], "rowcount": 100}], "runningtime": "0.17"} | fiwiki_p |
Dewiki users authorized for TWL | null | USE dewiki_p;
SELECT
user_registration,
user_editcount,
user_name,
edits_month
FROM user
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_month
FROM revision_compat
WHERE rev_timestamp < "20221026000000"
AND rev_timestamp > "2022... | {"resultsets": [{"headers": ["user", "edit_count"], "rowcount": 36}], "runningtime": "1.74"} | dewiki_p |
Cat_def ID | null | SELECT * FROM change_tag_def; | {"resultsets": [{"headers": ["page_id", "page_title", "page_namespace"], "rowcount": 2}], "runningtime": "0.21"} | 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": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 205}], "runningtime": "30.42"} | wikidatawiki_p |
nlwiki Users with the most edits | null | SELECT actor_name, COUNT(*) AS `count`
FROM revision, actor
WHERE rev_actor=actor_id
GROUP BY actor_id
ORDER BY `count` DESC
LIMIT 25 | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits", "Blocked"], "rowcount": 286}], "runningtime": "17.28"} | nlwiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.