title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
aWa recent changes
null
-- Generated from siteinfo-namespaces in the dump; -- namespaces.name is the local name, not the canonical name. with namespaces(id, name) as ( values (-2, 'Media'), (-1, 'Special'), (0, ''), (1, 'Talk'), (2, 'User'), (3, 'User talk'), (4, 'Wiktionary'), (5, 'Wiktionary talk'), (6, '...
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 37}], "runningtime": "4.16"}
enwiktionary
Active users on huwiki without right to vote
A quick (under)estimation about the fraction of users who recently edited in huwiki but don’t have the right to vote. Compared to the actual policy (https://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Szavaz%C3%A1s_(ir%C3%A1nyelv)#Szavaz%C3%A1sra_jogosultak), it underestimates the number of users without the right to vote by:...
SELECT (user_editcount > 200) AS many, COUNT(DISTINCT user_id) AS users FROM recentchanges JOIN actor ON rc_actor = actor_id JOIN user ON user_id = actor_user WHERE rc_type IN (0, 1) GROUP BY many;
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 528}], "runningtime": "5.12"}
huwiki_p
Ellenőrzésre váró átirányító lapok
null
SELECT rev_id as "# pending revisions", page_title FROM revision INNER JOIN page ON rev_page = page_id INNER JOIN flaggedpage_pending ON page_id = fpp_page_id WHERE rev_id > fpp_rev_id and page_is_redirect=1;
{"resultsets": [{"headers": ["File", "Re-created at"], "rowcount": 40}], "runningtime": "117.75"}
huwiki_p
Vemos los links de los ID's
WHERE pagelinks.pl_title = 'Estallido_Social'; WHERE pagelinks.pl_from = 9137022;
SELECT * FROM pagelinks WHERE pagelinks.pl_title = 'Estallido_social';
{"resultsets": [{"headers": ["pl_from", "page_title"], "rowcount": 367}], "runningtime": "1.82"}
eswiki_p
Query test 9
null
SELECT DISTINCT CONCAT("# [[",page_title,"]]") AS page_title, COUNT(*) AS counting FROM page JOIN pagelinks ON page_title = pl_title WHERE page_namespace = 0 AND pl_namespace = 0 AND pl_from_namespace = 0 AND page_is_redirect = 1 LIMIT 1
{"resultsets": [{"headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"], "rowcount": 215}], "runningtime": "66.65"}
itwiki_p
ويكيبيديا:إحصاءات الشهر
null
# https://ar.wikipedia.org/w/index.php?title=%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D8%A5%D8%AD%D8%B5%D8%A7%D8%A1%D8%A7%D8%AA_%D8%A7%D9%84%D8%B4%D9%87%D8%B1&oldid=59981404 SET @start_date = '20230131000000'; SET @end_date = '20230231000000'; # عدد التعديلات يشمل عدد التعديلات المخفية من خلال الوصف ا...
{"resultsets": [{"headers": ["pr_page", "pr_type", "pr_level", "pr_cascade", "pr_expiry", "pr_id"], "rowcount": 2}], "runningtime": "0.07"}
arwiki_p
Short description length histogram
null
SELECT CHAR_LENGTH(pp.pp_value) AS 'Length', COUNT(pp.pp_value) AS 'Count' FROM page_props pp INNER JOIN page p ON pp.pp_page = p.page_id AND p.page_namespace = 0 WHERE pp_propname = 'wikibase-shortdesc' AND pp.pp_value NOT IN ('none', 'Topics referred to by the same term') GROUP BY CHAR_LENGTH(pp.pp_value) ORDER BY CH...
{"resultsets": [{"headers": ["pr_page", "pr_type", "pr_level", "pr_cascade", "pr_expiry", "pr_id", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}], "runningt...
enwiki_p
Cantidad de usuarios en eswiki con genero definido como "female"e"
null
SELECT `user`.`user_name` AS `Nome`, `user_properties`.`up_value` AS `Sexo`, `user`.`user_registration` AS `Registro`, `user`.`user_editcount` AS `Nº edições`, `revs`.`last_edit` AS `Última ed.` FROM `user` LEFT JOIN `user_properties` ON `user`.`user_id` = `user_properties`.`up_user` LEFT JOI...
{"resultsets": [{"headers": ["page_title", "rev_timestamp"], "rowcount": 0}], "runningtime": "54.03"}
eswiki_p
Unreviewed new redirects by a particular user
Count of redirect in the enwiki new pages patrol queue grouped by user that created them.
SELECT ptrp_created, page_title, concat ("https://en.wikipedia.org/wiki/", page_title, "?redirect=no") as url 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_red...
{"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 10}], "runningtime": "47.80"}
enwiki_p
Article reference count
null
WITH articles AS ( SELECT DISTINCT(Article.page_title), Article.page_id, rev_timestamp, rev_len as "InitialSize", Article.page_len as "CurrentSize" FROM revision_userindex JOIN page AS Article ON Article.page_id = rev_page AND Article.page_namespace = 0 JOIN page AS Talk ON Article.page_title = Talk.page_title AND T...
{"connection_id": 119571112}
enwiki_p
List {{Rail-interchange}} 2
null
SELECT COUNT(DISTINCT pl_from) AS cnt FROM pagelinks WHERE pl_namespace = 10 AND pl_title LIKE 'Rail-interchange/count/%'; SELECT pl_from, pl_title FROM pagelinks WHERE pl_namespace = 10 AND pl_title LIKE 'Rail-interchange/count/%' LIMIT 10; SELECT pl_title, COUNT(*) AS cnt FROM ( SELECT LOWER(CONVERT(pl_title USIN...
{"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 25}], "runningtime": "0.14"}
zhwiki_p
List {{Rail-interchange}}
null
SELECT cl_sortkey_prefix, COUNT(*) AS cnt FROM categorylinks WHERE cl_to = '使用Rail-interchange的頁面' GROUP BY cl_sortkey_prefix ORDER BY cnt DESC
{"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 40}], "runningtime": "0.18"}
zhwiki_p
Vandalismebestrijding - vandal fighting - nlwiki
Backlog 286 (achterstand), 17:18 (CET) 1 March 2023
# anonymous edits totals SELECT CASE rc_patrolled WHEN 0 THEN 'unpatrolled' WHEN 1 THEN 'manually patrolled' WHEN 2 THEN 'autopatrolled' END AS rc_patrolled, COUNT(*) AS 'count' FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL GROUP BY rc_patrolled UNION SELECT 'total...
{"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 109}], "runningtime": "12.07"}
nlwiki_p
Top Wikipedia Page by Bytecounts (This Month)
Verify each user's contribution here : https://quarry.wmflabs.org/query/54879
select * from (select rc_title, sum( cast(rc_new_len as int) - cast(rc_old_len as int)) tdif from recentchanges_userindex where rc_timestamp >= 20230201000000 and rc_timestamp <= 20230301000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') group by rc_title) a where tdif > 30000 order by tdif de...
{"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "78.19"}
trwiki_p
Top Wikipedia User by Bytecounts (This month)
Verify each user's contribution here : https://quarry.wmflabs.org/query/54879
select * /*sum(tdif)*/ from (select actor_name, sum( cast(rc_new_len as int) - cast(rc_old_len as int)) tdif from recentchanges_userindex left join actor on rc_actor = actor_id where rc_timestamp >= 20230201000000 and rc_timestamp <= 20230301000000 and rc_bot = 0 and (rc_source = 'mw.new' or rc_source='mw.edit') ...
{"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "103.98"}
trwiki_p
Average daily number of edits per year on plwiki
This query excludes edits made by accounts that are or were bots.
SELECT SUBSTRING(day, 1, 4) AS `Rok`, AVG(daily) AS `Średnia dzienna liczba edycji` FROM ( SELECT SUBSTRING(rev_timestamp, 1, 8) AS day, COUNT(*) as daily FROM revision JOIN actor ON rev_actor = actor_id LEFT JOIN user ON user_id = actor_user WHERE 'bot' NOT IN ( SELECT ug_group FROM user_groups W...
{"resultsets": [{"headers": ["Page", "Count"], "rowcount": 4}], "runningtime": "8.89"}
plwiki_p
Longest 1,000 pages (Wikipedia namespace) ranked
null
SELECT page_title AS "Page Title", page_len AS "Size (bytes)" FROM page WHERE page_namespace = "0" AND page_len > 400000 AND page_len < 402000 ORDER BY page_len DESC LIMIT 10
{"resultsets": [{"headers": ["actor_name", "files"], "rowcount": 59}], "runningtime": "0.14"}
enwiki_p
Unicode/charset articles without talk pages
null
SELECT page_title FROM page AS articles LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'disambiguation' WHERE page_namespace = 0 AND page_is_redirect = 0 AND pp_page IS NULL AND NOT EXISTS (SELECT 1 FROM page WHERE page_namespace = 1 AND page_title = articles.page_title) AND NOT EXISTS (SELECT 1 FROM templ...
{"resultsets": [{"headers": ["title", "count"], "rowcount": 5}], "runningtime": "0.06"}
enwiki_p
Mainspace pages with maintenance tags
Including section maintenance tags as well, not only article tags. Some maintenance templates will only be on an article's talk page. https://en.wikipedia.org/wiki/Category:Cleanup_templates https://en.wikipedia.org/wiki/Wikipedia:Template_index/Maintenance https://en.wikipedia.org/wiki/Category:Article_message_templ...
SELECT CONCAT('https://en.wikipedia.org/wiki/', p2.page_title) AS 'Article', GROUP_CONCAT(lt.lt_title SEPARATOR ', ') AS 'Tags' FROM categorylinks cl INNER JOIN page p ON cl.cl_from = p.page_id AND p.page_namespace = 10 INNER JOIN linktarget lt ON p.page_title = lt.lt_title AND p.page_namespace = lt.lt_namespace INNER ...
{"resultsets": [{"headers": ["ctd_id", "ctd_name", "ctd_user_defined", "ctd_count"], "rowcount": 10}], "runningtime": "0.05"}
enwiki_p
Shortest short descriptions
Top 1000 shortest short descriptions in the main space only.
SELECT CONCAT('https://en.wikipedia.org/wiki/', p.page_title) AS 'Page', pp.pp_value AS 'Short description', CHAR_LENGTH(pp.pp_value) AS 'Length' FROM page_props pp INNER JOIN page p ON pp.pp_page = p.page_id AND p.page_namespace = 0 WHERE pp_propname = 'wikibase-shortdesc' AND pp.pp_value != 'none' ORDER BY CHAR_LENGT...
{"resultsets": [{"headers": ["ctd_id", "ctd_name", "ctd_user_defined", "ctd_count"], "rowcount": 80}], "runningtime": "0.11"}
enwiki_p
Affiliate members harvest on Meta-Wiki
Harvest affiliate members for all affiliates in Wikimedia.
# avoid duplicate user names SELECT DISTINCT metawiki_p.pagelinks.pl_title AS "Affiliated Username", p.page_title AS "Affiliate Groups" FROM metawiki_p.page AS p JOIN metawiki_p.pagelinks ON metawiki_p.pagelinks.pl_from = p.page_id # harvest from the a list of affiliates WHERE p.page_title IN ( "Wiki_Project_Med", "...
{"connection_id": 153728478}
metawiki_p
Unreviewed articles by oldest ptrp_reviewed_updated (10)
null
select * from pagetriage_page join page on page_id=ptrp_page_id where ptrp_reviewed=0 and page_is_redirect=0 and page_namespace=0 order by ptrp_reviewed_updated limit 10;
{"resultsets": [{"headers": ["user_name", "user_registration", "live_edits", "hidden_deleted_edits", "edits_last_month"], "rowcount": 10}], "runningtime": "28.17"}
enwiki
1896-1904 Lugnuts Olympian Biographies
null
WITH articles AS ( SELECT DISTINCT(Article.page_title), Article.page_id, rev_timestamp, rev_len as "InitialSize", Article.page_len as "CurrentSize" FROM revision_userindex JOIN page AS Article ON Article.page_id = rev_page AND Article.page_namespace = 0 JOIN page AS Talk ON Article.page_title = Talk.page_title AND T...
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 93}], "runningtime": "0.53"}
enwiki_p
Bizarrely subnested userpages
null
SELECT page_namespace AS "ns", page_title AS "title", LENGTH(page_title) AS "title length", page_len AS "size", ROUND ( ( CHAR_LENGTH(page_title) - CHAR_LENGTH( REPLACE ( page_title, "/", "") ) ) / CHAR_LENGTH("/") ) AS "count" FROM page WHERE page_namespace IN (2, 3) AND ROUND ( ...
{"resultsets": [{"headers": ["rev_timestamp", "actor_name"], "rowcount": 1}], "runningtime": "0.06"}
enwiki
All edits made by participants International Mother Language Day 2023 Datathon
(Ripped from wdvd's code and modified a bit.) Thanks, Adam, for further modifications!
USE wikidatawiki_p; select now(); SELECT rev_id, rc_timestamp, actor_name, rc_title, comment_text FROM recentchanges LEFT JOIN comment ON comment.comment_id = recentchanges.rc_comment_id LEFT JOIN actor on actor.actor_id = recentchanges.rc_actor LEFT JOIN revision on revision.rev_id = recentchanges.rc_this_oldid WHER...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 147}], "runningtime": "107.11"}
wikidatawiki_p
orphaned talks
null
SELECT page_namespace, page_id, page_title, page_is_redirect, page_len ...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 8565}], "runningtime": "305.78"}
enwiki_p
wikidatawiki Entity redirects with text terms in DB
There seem to be no property redirects at all.
SELECT page_title AS 'item-id', page_links_updated AS 'links-updated', GROUP_CONCAT(DISTINCT wby_name) AS type, GROUP_CONCAT(DISTINCT wbxl_language) AS lang#, wbx_text AS text FROM page, wbt_item_terms, wbt_term_in_lang, wbt_type, wbt_text_in_lang#, wbt_text WHERE page_namespace=0 AND page_is_redirect=1 AN...
{"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": 45}], "runningtime": "0.09"}
wikidatawiki
Userspace pages of non-existent users (no talk, no subpages)
null
SELECT CONCAT('https://en.wikipedia.org/wiki/User:', p.page_title) AS URL FROM enwiki_p.page p LEFT JOIN enwiki_p.user u ON REPLACE(p.page_title, '_', ' ') = u.user_name WHERE p.page_namespace = 2 AND u.user_id IS NULL AND p.page_is_redirect = 0 AND NOT IS_IPV4(p.page_title) -- Exclude IPv4 AND NOT IS_IPV6(p.page_title...
{"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "66.58"}
enwiki_p
Get contributions by SeroBOT
null
SELECT r.rev_id,r.rev_page,r.rev_timestamp,page.page_title FROM revision_userindex r LEFT JOIN page ON r.rev_page = page.page_id WHERE rev_actor=(SELECT actor_id FROM actor_revision WHERE actor_name='SeroBOT') AND rev_timestamp BETWEEN 20191018000000 AND 20191115000000;
{"resultsets": [{"headers": ["user_name", "count(page_title)"], "rowcount": 1008}], "runningtime": "106.40"}
eswiki_p
delete/revision actions
Get a number of delete/revision actions on a certain page.
SELECT * FROM `logging_logindex` LEFT JOIN `actor_logging` ON `actor_id` = `log_actor` LEFT JOIN `comment_logging` ON `log_comment_id` = `comment_id` WHERE `log_type` = "delete" AND `log_action` = "revision" AND (`log_params` LIKE "%i:1103344157;%" OR `log_params` LIKE "%i:1076902948;%" OR `log_params` LIKE "%i:10410...
{"resultsets": [{"headers": ["Potential untagged #SheSaid articles", "Wikidata item", "Creator", "Date created", "Length", "Problem"], "rowcount": 7}], "runningtime": "27.98"}
enwiki_p
Pages with intentionally no short description that should maybe have one
WIP: LOTS of stuff to filter out
SELECT CONCAT('https://en.wikipedia.org/wiki/', p.page_title) AS 'Page' FROM page p LEFT JOIN page_props pp ON p.page_id = pp.pp_page AND pp.pp_propname = 'wikibase-shortdesc' WHERE p.page_namespace = 0 AND p.page_title NOT LIKE 'List_%' AND p.page_title NOT LIKE '%filmography%' AND p.page_title NOT LIKE '%\_on\_screen...
{"resultsets": [{"headers": ["rev_page"], "rowcount": 8464}], "runningtime": "7.48"}
enwiki_p
Highest edit count (**wiki, last 30 days)
null
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -30 DAY), "%Y%m%d%H%i%s")); SELECT COUNT(*) AS 'Edits', actor_name AS `User`, ug_group AS `Rights` FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id LEFT JOIN user_gr...
{"connection_id": 72338114}
wikidatawiki_p
Highest edit count (**wiki, last 30 days)
null
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -30 DAY), "%Y%m%d%H%i%s")); SELECT COUNT(*) AS 'Edits', actor_name AS `User`, ug_group AS `Rights` FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id LEFT JOIN user_gr...
{"resultsets": [{"headers": ["page_title", "comment_text", "actor_name", "rev_timestamp"], "rowcount": 0}], "runningtime": "28.86"}
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", "timestamp", "actor_name", "comment_text"], "rowcount": 24}], "runningtime": "5.70"}
bnwikiquote
Filtered single use templates
null
select ROW_NUMBER() OVER(order by lt_title) num, -- get row number CONCAT('[[Template:', replace(lt_title, '_', ' '), ']]') as 'Template title' -- Format as wikilink, replace _ with space from templatelinks join linktarget on tl_target_id = lt_id join page on page_namespace = lt_namespace and page_t...
{"resultsets": [{"headers": ["num", "Page title", "Is redirect?"], "rowcount": 0}], "runningtime": "3.90"}
enwiki_p
Temp stuff (d2)
see query 70503 this is a result of me being bad at SQL and just not getting string manipulation functions to work with me enough
select CONCAT("Talk:",page_title) as basepage_title from page where page_namespace = 1 and page_title rlike "/Archive_[1-9][0-9]$" and exists ( select 1 from page as basepage where basepage.page_namespace = 1 and basepage.page_is_redirect = 0 and basepage.page_title = SUBSTR(page.page_title,1,LENGTH(page.page...
{"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": 0}], "runningtime": "0.05"}
enwiki
Temp stuff (d3)
see query 70503 this is a result of me being bad at SQL and just not getting string manipulation functions to work with me enough
select CONCAT("Talk:",page_title) as basepage_title from page where page_namespace = 1 and page_title rlike "/Archive_[1-9][0-9]{2}$" and exists ( select 1 from page as basepage where basepage.page_namespace = 1 and basepage.page_is_redirect = 0 and basepage.page_title = SUBSTR(page.page_title,1,LENGTH(page.p...
{"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": 0}], "runningtime": "0.04"}
enwiki
most active users by edit on azwiki
null
SET @counter:=0; SELECT CONCAT("|",@counter:=@counter+1,"") AS rank, CONCAT("[[Kullanıcı:",user_name,"|",user_name,"]]") AS user_name, user_editcount FROM user WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)" ORDER BY user_editcount DESC LIMI...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 7339}], "runningtime": "3512.41"}
azwiki_p
Unprotected & transcluded templates ns 10-828
null
SELECT lt.lt_title as titre, COUNT(*) as nb_inclusion_directes, SUM(CASE WHEN p2.page_namespace = 10 THEN 1 ELSE 0 END) as nb_inclusion_indirectes FROM templatelinks t INNER JOIN linktarget lt ON lt.lt_id = t.tl_target_id LEFT JOIN page p ON p.page_namespace = lt.lt_namespace AND p.page_title = lt.lt_title INNER JOIN p...
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect"], "rowcount": 30}], "runningtime": "0.10"}
frwiki
wikidata: find by uk label (easy)
null
SELECT CONCAT('http://www.wikidata.org/entity/Q', wbt_item_terms.wbit_item_id) as p # SELECT CONCAT('Q', wbt_item_terms.wbit_item_id) as p FROM wbt_item_terms JOIN wbt_term_in_lang ON wbt_item_terms.wbit_term_in_lang_id = wbt_term_in_lang.wbtl_id AND wbtl_type_id = 1 # 1- label; 2- description; 3- ...
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect"], "rowcount": 87}], "runningtime": "0.15"}
wikidatawiki_p
wikidata: counts of all uk labels
~5500 sec, ~5430000 (all) rows;
SELECT CONCAT('https://www.wikidata.org/wiki/Q', MIN(wbt_item_terms.wbit_item_id)) as Q_id, wbt_text.wbx_text as label, count(*) as cnt FROM wbt_item_terms JOIN wbt_term_in_lang ON wbt_item_terms.wbit_term_in_lang_id = wbt_term_in_lang.wbtl_id AND wbt_term_in_lang.wbtl_type_id = 1 # 1- lab...
{"resultsets": [{"headers": ["Flags", "New articles in a period", "Wikidata item", "Creator", "Date created", "Length"], "rowcount": 181}], "runningtime": "1.55"}
wikidatawiki_p
Empty
null
null
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect"], "rowcount": 3}], "runningtime": "0.06"}
wikidatawiki_p
Get deleted revisions of user
Get the deleted revisions for a user. You can combine this with the delete/revision action to find the reason behind deletion.
SELECT *, (CAST(`main`.`rev_len` AS SIGNED) - CAST(`parent`.`rev_len` AS SIGNED)) AS "diff" FROM `revision_userindex` AS `main` LEFT JOIN `revision_userindex` AS `parent` ON `parent`.`rev_id` = `main`.`rev_parent_id` LEFT JOIN `comment_revision` ON `main`.`rev_comment_id` = `comment_id` RIGHT JOIN `page` ON `main`...
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect"], "rowcount": 1}], "runningtime": "0.06"}
enwiki_p
Most frequent domains (frwiki)
This query compiles a list of 1 000 external links (from the main namespace of the French Wikipedia) grouped by website.
USE frwiki_p; SELECT url, COUNT(*) FROM ( SELECT SUBSTRING_INDEX(SUBSTRING(el_to, LOCATE('://', el_to) + 3), '/', 1) url FROM externallinks WHERE el_from IN ( SELECT page_id FROM page WHERE page_namespace = 0 ) ) tmp_table #where url LIKE "quarry.wmflabs.org%" GROUP BY url HAVING COUNT(*) > 1000 ORD...
{"resultsets": [{"headers": ["day", "deletions"], "rowcount": 25}], "runningtime": "11.03"}
frwiki_p
dataset
null
/* SELECT user.user_name AS "name", "0" AS "spam" FROM user WHERE user.user_id NOT IN (SELECT ipb_user FROM ipblocks) ORDER BY RAND() limit 30000; */ /* SELECT user.user_name AS "name", "1" AS "spam" FROM ipblocks INNER JOIN user ON ipblocks.ipb_user = user.user_id INNER JOIN comment ON ipblocks.ipb_reason_...
{"resultsets": [{"headers": ["num", "Template title"], "rowcount": 60907}], "runningtime": "300.52"}
arwiki_p
azwiki kategorisiz maddeler
null
SELECT CONCAT(page_title) AS page_title_formatted FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT p.page_id FROM page p INNER JOIN categorylinks cl ON cl.cl_from = p.page_id INNER JOIN page p2 ON cl.cl_to = p2.page_title AND p2.page_namespace = 14 -- 14 = Category LEFT J...
{"resultsets": [{"headers": ["title", "rd"], "rowcount": 148}], "runningtime": "0.21"}
azwiki_p
Articles with talk pages but not assigned to WikiProjects
Detects articles with talk pages that are not assigned to any Wikiprojects; Note: deliberately ignores the special case of non-redirect pages with talk page redirects; these will be dealt with at the target talk page anyway March 2023 execution time: 1226 seconds, resultset 68670 rows
SELECT article.page_title, article.page_id, talk.page_id AS talk_id FROM page AS article LEFT JOIN page_props ON pp_page = article.page_id AND pp_propname = 'disambiguation' INNER JOIN page AS talk ON talk.page_title = article.page_title WHERE article.page_namespace = 0 AND talk.page_namespace = 1 A...
{"resultsets": [{"headers": ["lt_title"], "rowcount": 69}], "runningtime": "9.79"}
enwiki_p
Articles without talk pages
March 2023 execution time: 267 seconds, resultset 79538 rows
SELECT page_title FROM page AS articles LEFT JOIN page_props ON pp_page = articles.page_id AND pp_propname = 'disambiguation' WHERE articles.page_namespace = 0 AND articles.page_is_redirect = 0 AND pp_page IS NULL AND NOT EXISTS ( SELECT 1 FROM page AS talk WHERE talk.page_...
{"resultsets": [{"headers": ["page_title"], "rowcount": 37}], "runningtime": "34.15"}
enwiki_p
~
null
# vietnames spammers SELECT user_registration, user_name, img_name FROM .user INNER JOIN actor ON actor_user = user_id INNER JOIN image ON img_actor = actor_id WHERE user_registration > 20230313000000 AND user_editcount = 3 AND (SELECT COUNT(*) FROM image WHERE img_actor = actor_id) = 1 ORDER BY user_registration LIMIT...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 927}], "runningtime": "352.02"}
commonswiki_p
Actor id
null
SELECT * FROM actor WHERE actor_name IN ("Buidhe", "Chapmansh", "Ealdgyth", "François Robere", "GizzyCatBella", "Lembit Staan", "Levivich", "Mhorg", "My very best wishes", "Nihil novi", "Paul Siebert", "Piotrus", "Szmenderowiecki", "Volunteer Marek")
{"resultsets": [{"headers": ["rev_actor", "rev_page", "page_title", "count(r.rev_id)"], "rowcount": 3250}], "runningtime": "5.73"}
enwiki_p
Zöld sablonok kigyűjtése
A WP:átnevezés szerint átirányító sablonok ne legyenek. Ehhez először az átirányító sablonokra történő belső hivatkozásokat kékíteni kell, utána az adminisztrátorok törölhetik. A ">190" szűkítés azért van, mert a MÁV-vonalakra vonatkozó átirányító sablonokra szükség van.
SELECT page_title as Zöld_sablon, rd_title as Kék_sablon FROM page left join redirect on rd_from=page_id where page_namespace=10 and page_is_redirect=1 and page_title>"Csonk-á" order by page_title;
{"resultsets": [{"headers": ["description", "tmp1", "tmp2", "c"], "rowcount": 432348}], "runningtime": "636.51"}
huwiki_p
Bot Wars?! (arwiki)
null
SELECT article.page_title, article.page_namespace, count(distinct actor.actor_name) as "bot users", GROUP_CONCAT(DISTINCT actor.actor_name) as "bot users named", TIMESTAMP(max(rev_timestamp)) as "last edit on page", COUNT(*) AS edits FROM revision INNER JOIN page article ON article.page_id = rev_page #A...
{"resultsets": [{"headers": ["p", "p\u0422\u041c\u041f1", "p\u0422\u041c\u041f2", "new_text"], "rowcount": 15}], "runningtime": "0.06"}
arwiki_p
Unreviewed new redirects by a particular user
Count of redirect in the enwiki new pages patrol queue grouped by user that created them.
SELECT ptrp_created, page_title, concat ("https://en.wikipedia.org/wiki/", page_title, "?redirect=no") as url 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_red...
{"resultsets": [{"headers": ["rev_id", "comment_text"], "rowcount": 1}], "runningtime": "0.06"}
enwiki_p
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী
২৯ জানু ২০২২
SET @ct:=0; SELECT CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং, CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম, CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ FROM ( SELECT actor_name AS user, COUNT(rev_id) AS cnt FROM actor JOIN revision ON rev_actor = actor_id JOIN page ON page_id = rev_page WH...
{"resultsets": [{"headers": ["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": 50}], "runningtime": "0.11"}
bnwiki
ku wiki (articles)
null
USE ckbwiki_p; SELECT REPLACE (page_title,'_',' ') AS 'Page title' FROM page WHERE page_namespace = 0 #Returns articles only AND page_is_redirect = 0 #Do not return redirect pages ORDER BY page_title ASC;
{"resultsets": [{"headers": ["p", "p\u0422\u041c\u041f1", "p\u0422\u041c\u041f2", "new_text"], "rowcount": 10}], "runningtime": "0.05"}
ckbwiki_p
أفريقي
null
/* ويكيبيديا:نطاق */ /* select count(*),page_namespace from page where page_namespace in (0,6,10,14,100,4,12) and page_title like "%أوبلاست%" #or page_title like "%توغولي%" #or page_title like "%كونغولية%" #or page_title like "%كونغولي%" #or page_title like "%بيروفية%" #or page_title like "%بيروفي%" GROUP BY...
{"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 143}], "runningtime": "0.32"}
arwiki_p
search for 'PikiWiki'
null
SET @p1 = '%PikiWiki%'; SET @p2 = '%70340%'; (SELECT fa_name FROM filearchive WHERE fa_name LIKE @p1 AND fa_name LIKE @p2 ) UNION (SELECT ar_title FROM archive WHERE ar_namespace = 6 AND ar_title LIKE @p1 AND ar_title LIKE @p2 ) UNION (SELECT page_title FROM page WHERE page_namespace = 6 AND page_title LIKE @p1 AN...
{"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 137}], "runningtime": "0.25"}
commonswiki_p
البحث عن مقالات ملخص تعديل معين
null
SELECT page_id, comment_text,page_title,rev_timestamp,page_len,rev_id #select count(rev_id) as "count",comment_text #DATE(rev_timestamp) FROM revision_userindex INNER JOIN page ON rev_page = page_id INNER JOIN actor ON rev_actor = actor.actor_id INNER JOIN comment ON comment_id = rev_comment_id ...
{"resultsets": [{"headers": ["user_name", "page_len", "page_id"], "rowcount": 10}], "runningtime": "2879.68"}
arwiki_p
تقرير شهري
تقرير شهري لصفحة https://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D8%A5%D8%AD%D8%B5%D8%A7%D8%A1%D8%A7%D8%AA_%D8%A7%D9%84%D8%B4%D9%87%D8%B1
use arwiki_p; SET @start_date = '20230301000000'; SET @end_date = '20230331235959'; # عدد التعديلات يشمل عدد التعديلات المخفية من خلال الوصف او اسم المستخدم او التعليق select count(*) as "عدد التعديلات" from revision where rev_timestamp between @start_date and @end_date; select count(*) as "عدد المقالات الجديدة" from...
{"resultsets": [{"headers": ["lt_title"], "rowcount": 83}], "runningtime": "9.55"}
arwiki_p
ipblocks
null
SELECT user_name, ipb_address, ipb_range_start, ipb_range_end, ipb_range_end-ipb_range_start FROM ipblocks JOIN actor ON ipb_by_actor = actor_id JOIN user ON actor_user = user_id WHERE ipb_address LIKE '8.%'
{"resultsets": [{"headers": ["actor_name", "user_registration", "ipb_timestamp", "comment_text"], "rowcount": 1876}], "runningtime": "2294.56"}
zhwiki_p
Longest short descriptions
Top 1000 longest short descriptions in the main space only.
SELECT CONCAT('https://en.wikipedia.org/wiki/', p.page_title) AS 'Page', pp.pp_value AS 'Short description', CHAR_LENGTH(pp.pp_value) AS 'Length' FROM page_props pp INNER JOIN page p ON pp.pp_page = p.page_id AND p.page_namespace = 0 WHERE pp_propname = 'wikibase-shortdesc' ORDER BY CHAR_LENGTH(pp.pp_value) DESC LIMIT ...
{"resultsets": [{"headers": ["Talk page"], "rowcount": 1}], "runningtime": "3.72"}
enwiki_p
List of top priority math articles missing on idwiki
null
SELECT DISTINCT page_title, page_len #ll_title FROM page, langlinks WHERE page_title in ( SELECT page_title AS member FROM categorylinks LEFT JOIN page ON (cl_from = page_id) WHERE cl_to = "Top-priority_mathematics_articles" ) # Judul halaman ada di Kategori AND page...
{"resultsets": [{"headers": ["date", "reviews", "accepts", "declines", "rejects", "accept %", "decline %", "reject %"], "rowcount": 31}], "runningtime": "14.99"}
enwiki
math articles that exist in enwiki and idwiki
null
SELECT page_title title_en, ll_title title_id, page_len size_en FROM page, langlinks WHERE page_title in ( SELECT page_title AS member FROM categorylinks LEFT JOIN page ON (cl_from = page_id) WHERE cl_to = "Top-priority_mathematics_articles" ) # Judul halaman ada di Kate...
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 204}], "runningtime": "15.60"}
enwiki
revision_1_day
null
SELECT* FROM revision LEFT JOIN page on revision.rev_page = page.page_id WHERE rev_timestamp > '20230405000001' AND page_title="Paris"
{"resultsets": [{"headers": ["count", "page_title"], "rowcount": 1000}], "runningtime": "223.17"}
enwiki
ويكيبيديا:مصادر موثوقة/معاجم وقواميس وأطالس/إحصائيات
null
select count(page.page_id) as "count_of_cites",iwlinks.iwl_title as "q_iwl_title" from page inner join templatelinks on page.page_id = templatelinks.tl_from inner join linktarget on lt_id = tl_target_id inner join iwlinks on page.page_id = iwlinks.iwl_from where iwlinks.iwl_title in (select iwl_title from iwlinks w...
{"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len", "cat_pages", "cat_subcats"], "rowcount": 8382}], "runningtime": "16.40"}
arwiki_p
sablonra hivatkozó cikkek
null
SELECT page_title FROM page where page_namespace=0 and page_title>"15634" and page_title<"16173" and page_is_redirect=0 order by page_title;
{"resultsets": [{"headers": ["Page"], "rowcount": 0}], "runningtime": "41.28"}
huwiki_p
New drafts by new users
null
SELECT DISTINCT actor_name, rc_title, comment_text FROM recentchanges_userindex AS recentchanges INNER JOIN actor_recentchanges AS actor ON recentchanges.rc_actor = actor_id INNER JOIN user ON actor.actor_user = user.user_id INNER JOIN comment_recentchanges AS comment ON recentchanges.rc_comment_id = comment.comment_id...
{"resultsets": [{"headers": ["cat_title", "cat_subcats"], "rowcount": 10}], "runningtime": "0.09"}
enwiki
Kann weg
null
SELECT P.page_title, replace(pl_title, '_', ' ') FROM page AS P, pagelinks LEFT JOIN page AS R ON R.page_title = pl_title AND R.page_namespace = pl_namespace WHERE CONVERT(pl_title USING utf8mb4) RLIKE "[-–~+&;,:<>§%/]$" # "[-–:;,<>'\"&]$" AND p...
{"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "2.43"}
dewiki_p
vanishing user with rights
null
SELECT * FROM user_groups LEFT JOIN user ON ug_user = user_id AND ug_group NOT IN ('extendedconfirmed') WHERE user_name REGEXP '^(Former|Renamed|Vanished|Deleted) (user|account)'
{"resultsets": [{"headers": ["lt_title"], "rowcount": 3000}], "runningtime": "9.69"}
zhwiki_p
Blocked users with rights
null
SELECT ipb_address, GROUP_CONCAT(ug_group), ipb_expiry, ipb_sitewide, comment_text FROM user_groups JOIN ipblocks ON ug_user = ipb_user JOIN comment ON ipb_reason_id = comment_id WHERE ug_group NOT IN ('extendedconfirmed') GROUP BY ipb_id ORDER BY ipb_expiry DESC
{"resultsets": [{"headers": ["lt_title", "COUNT(*)"], "rowcount": 3000}], "runningtime": "9.23"}
zhwiki_p
New edits last 30 minutes on ptwiki per revision table
null
SELECT rev_timestamp, actor_name FROM revision, actor WHERE rev_id > 65320000 #block on 17-02-2023, to avoid search the entire table AND rev_timestamp >= 20230317120000 AND rev_timestamp <= 20230317175959 AND rev_actor = actor_id; SELECT ar_timestamp, actor_name FROM archive, actor WHERE ar_id > 9482000 #block on 17-0...
{"resultsets": [{"headers": ["rc_namespace", "rc_title", "addresses", "rv_addresses", "rv_addresses_pc", "ip_edits", "rv_ip_edits", "rv_ip_edits_pc"], "rowcount": 2}], "runningtime": "2.54"}
ptwiki_p
Trust
null
SELECT user_name, MAX(FLOOR(revision.rev_timestamp/100000000)) AS rev, COUNT(revision.rev_id) FROM actor INNER JOIN user ON user.user_id = actor.actor_user INNER JOIN user_groups ON user_groups.ug_user = user.user_id INNER JOIN revision ON actor.actor_id = revision.rev_actor WHERE user_groups.ug_group = 'trusted' AND u...
{"resultsets": [{"headers": ["page_title"], "rowcount": 11}], "runningtime": "0.08"}
huwiki
New articles in nowiki, 2022
null
select log_title, log_timestamp, #user_registration, page_id, actor_id from logging_userindex join actor_logging on log_actor = actor_id join user on actor_user = user_id left join page on log_page = page_id where log_action = "create" and log_type = "create" and log_namespac...
{"resultsets": [{"headers": ["Page", "Page length", "Re-created at"], "rowcount": 253}], "runningtime": "14.81"}
nowiki_p
The pages in the someone category
Prints a list of pages in a specific enwiki category that are not redirect page.
select page_title from page where page_namespace = 0 and page_is_redirect = 0 and page_title in ( select page_title from categorylinks JOIN (page) on (categorylinks.cl_from=page.page_id) where cl_to = "Économie" and page_namespace = 0 ) order by page_title
{"resultsets": [{"headers": ["Articles with talk page redirects"], "rowcount": 2556}], "runningtime": "68.98"}
frwiki_p
Article creators by volume 2023 by month
Most prolific article creators in 2023 Counts only non-redirect pages currently in the main namespace, with their first edit after December 2021. In particular, it doesn't count redirects or drafts created earlier that became mainspace articles since August 1, nor articles that have since been deleted, redirected, or ...
SELECT actor_name as "Creator", COUNT(*) AS "Year total", SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 01 THEN 1 ELSE 0 END) AS "Jan", SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 02 THEN 1 ELSE 0 END) AS "Feb", SUM(CASE WHEN SUBSTRING(rev_timestamp,5,2) = 03 THEN 1 ELSE 0 END) AS "Mar", SUM(CASE WHEN SUBSTR...
{"resultsets": [{"headers": ["up_user", "up_property", "up_value"], "rowcount": 79889}], "runningtime": "71.11"}
enwiki_p
Edits made with Deputy (userscript)
Edits made using the Deputy CCI user script. WARNING: This is a long-running query that may take up to 20 minutes to run!
SELECT `rev_id` as "ID", `page_namespace` as "Namespace", REPLACE(`page_title`, "_", " ") as "Title", DATE_FORMAT(`rev_timestamp`, "%Y-%m-%d %H:%i:%s") as "Date", `comment_text` as "Summary", `actor_name` as "Username" FROM `revision_userindex` JOIN `comment_revision` ON `rev_comment_id` = `comment...
{"resultsets": [{"headers": ["CONCAT('File:', REPLACE(page_title,'_',' '))"], "rowcount": 65}], "runningtime": "1.52"}
enwiki_p
GhostInTheMachine's deleted contributions
Deleted contributions to enwiki by [[User:GhostInTheMachine]]
SELECT archive_userindex.ar_timestamp, archive_userindex.ar_minor_edit, archive_userindex.ar_namespace, archive_userindex.ar_title FROM archive_userindex JOIN actor_archive ON actor_id = ar_actor WHERE actor_name = 'GhostInTheMachine' ORDER BY ar_timestamp DESC;
{"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 99}], "runningtime": "0.35"}
enwiki
old protected titles
null
SELECT pt_namespace, pt_title, pt_timestamp FROM protected_titles WHERE pt_timestamp < DATE_SUB(NOW(), INTERVAL 10 YEAR) ORDER BY 3 ASC
{"resultsets": [{"headers": ["lt_title", "number"], "rowcount": 64322}], "runningtime": "60.17"}
enwiki_p
Admin inactivity query
Shamelessly stolen from User:Cryptic. Note that these numbers don't include deleted contributions, which have to be accounted for manually.
SELECT user_name, COUNT(rev_id) FROM user JOIN user_groups ON ug_user = user_id JOIN actor_revision ON actor_user = user_id JOIN revision_userindex ON rev_actor = actor_id WHERE ug_group = 'sysop' AND rev_timestamp >= '201901010000' GROUP BY user_name HAVING COUNT(rev_id) < 100 ORDER BY COUNT(rev_id) ASC;
{"resultsets": [{"headers": ["ipb_address"], "rowcount": 0}], "runningtime": "0.08"}
enwiki_p
أكثر المستخدمين إنشاءً للمقالات ضمن مشروع ويكي طب
null
use arwiki_p; select rev_actor, count(rev_actor) FROM revision INNER JOIN page ON rev_page = page_id WHERE page_namespace = 0 AND rev_parent_id = 0 and rev_timestamp BETWEEN 20230101000000 AND 20231231235959 AND page.page_is_redirect = 0 AND page.page_id in (select cl_from from categorylinks where cl_from = page.page_i...
{"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 110}], "runningtime": "0.15"}
arwiki_p
أكثر المستخدمين تعديلًا ضمن مقالات مشروع ويكي طب
null
USE arwiki_p; # by actor_name in actor table # https://www.mediawiki.org/wiki/Manual:Actor_table select actor_name, count(actor_name) from revision join actor on actor_id = rev_actor where rev_timestamp between 20230101000000 AND 20231231235959 and rev_page in (select cl_from from categorylinks where cl_from = rev...
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}], "runningtime": "0.07"}
arwiki_p
Self redirects
null
SELECT CONCAT( CASE p.page_namespace WHEN 0 THEN '' WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User talk' WHEN 4 THEN 'Wikipedia' WHEN 5 THEN 'Wikipedia talk' WHEN 6 THEN 'File' WHEN 7 THEN 'File talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWi...
{"resultsets": [{"headers": ["wbit_id", "wbit_item_id", "wbit_term_in_lang_id"], "rowcount": 5}, {"headers": ["wbx_id", "wbx_text"], "rowcount": 5}, {"headers": ["wbxl_id", "wbxl_language", "wbxl_text_id"], "rowcount": 5}, {"headers": ["wby_id", "wby_name"], "rowcount": 3}, {"headers": ["actor_id", "actor_user", "actor...
enwiki_p
Unstandardised archives
Archives which are a slight bit off of the normal variation of "Archive [1-9][0-9]*", such as "archive 1" or "archive1"
select distinct CONCAT("{{User:Aidan9382//adle|1=Talk:",page_title,"}}") as basepage_title from page where page_namespace = 1 and page_is_redirect = 0 and page_title rlike "/(archive|ARCHIVE)_?/?[0-9]+$|/[Aa][Rr][Cc][Hh][Ii][Vv][Ee](/?[0-9]+|_?/?0[0-9]*)$|/[Aa][Rr][Cc][Hh][Ii][Vv][Ee][a-zA-Z0-9_]*/[Aa][Rr][Cc][Hh][Ii][...
{"connection_id": 162040644}
enwiki
wikidata: Den+ Duk-
typically ~1.7 sec per 1000 rows; sometimes ~450 seconds for 1000 rows
SELECT DISTINCT CONCAT('http://www.wikidata.org/entity/Q', wbt_item_terms.wbit_item_id) as Q_id #SELECT DISTINCT CONCAT('Q', wbt_item_terms.wbit_item_id) as Q_id FROM wbt_item_terms JOIN wbt_term_in_lang on wbt_item_terms.wbit_term_in_lang_id = wbt_term_in_lang.wbtl_id AND wbtl_type_id = 2 JOIN wbt...
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 22}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 27}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 23}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 18}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
wikidatawiki_p
wikidatawiki Dutch label case anomaly
just items for now, no properties
SELECT itnl.wbit_item_id AS 'item-id', xnl.wbx_text AS nl, xen.wbx_text AS en, xfr.wbx_text AS fr FROM wbt_item_terms itnl, wbt_item_terms iten, wbt_item_terms itfr, wbt_term_in_lang tnl, wbt_term_in_lang ten, wbt_term_in_lang tfr, wbt_text_in_lang xlnl, wbt_text_in_lang xlen, wbt_text_in_lang xlfr, wbt_t...
{"resultsets": [{"headers": ["count", "DATE(rev_timestamp)"], "rowcount": 13}], "runningtime": "0.27"}
wikidatawiki
it.wiki articles needing {{Interprogetto}}
null
SELECT REPLACE(WIKI.ips_site_page, ' ', '_') FROM wikidatawiki_p.wb_items_per_site WIKI, wikidatawiki_p.wb_items_per_site EXT WHERE WIKI.ips_item_id = EXT.ips_item_id AND WIKI.ips_site_id = 'itwiki' AND EXT.ips_site_id IN ('commonswiki', 'itwikiquote', 'itwikisource', 'itwikivoyage')
{"connection_id": 162756520}
wikidatawiki_p
Large hardblocks on simplewiki
null
SELECT ipblocks.ipb_address as "Range", `comment`.comment_text as "Reason", `actor`.actor_name as "Blocker" FROM ipblocks JOIN `comment` ON ipblocks.ipb_reason_id=`comment`.comment_id JOIN `actor` ON ipblocks.ipb_by_actor=`actor`.actor_id WHERE ipb_anon_only=0 AND ipb_user=0 AND ipb_address RLIKE "/[0-9]+$";
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 19}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 30}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 23}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 22}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
simplewiki_p
Pages with the most categories
null
select page.page_title, count(page.page_title) from page inner join categorylinks on page.page_id=categorylinks.cl_from where page.page_namespace=0 group by page.page_title order by count(page.page_title) desc limit 1;
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 23}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 30}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 21}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 20}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
enwiki_p
Thematic Weeks on UkWP [Template]
null
USE ukwiki_p; SET SESSION group_concat_max_len = 10000; SELECT @rownum := @rownum + 1 AS rank, IFNULL(actor_name, 'Всього'), created, total_len, articles FROM ( SELECT CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name, COUNT(1) AS created, SUM(article.page_len) as...
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 15}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 25}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 20}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 21}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
ukwiki_p
Query test 8
null
SELECT page_title FROM page WHERE page_id IN (SELECT cl_from FROM categorylinks WHERE cl_to = 'Pagine_orfane_-_novembre_2012') AND page_id NOT IN (SELECT DISTINCT tl_from FROM templatelinks WHERE tl_target_id IN (SELECT DISTINCT lt_id FROM linktarget WHERE lt_namespace = 10 AND lt_title IN ('Bio')...
{"resultsets": [{"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 22}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 16}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 15}, {"headers": ["page_id", "cl_to", "count(*)"], "rowcount": 35}, {"headers": ["page_id", "cl_to", "count(*)"], "rowco...
itwiki_p
Thanks for 2023 metawiki
Most thanked people in 2023 Blame Mz7, SQL, and stwalkerster for this
USE metawiki_p; SELECT log_title, COUNT(log_id) FROM logging_logindex WHERE log_type = "thanks" AND log_timestamp >= "20230000000000"# and log_timestamp < "20240000000000" GROUP BY log_title ORDER BY 2 DESC
{"resultsets": [{"headers": ["URL"], "rowcount": 0}], "runningtime": "32.96"}
metawiki
Redirects to taxon authorities with their own Wikidata items
null
SELECT redirpage.page_title, redirect.rd_title FROM categorylinks redircat JOIN page redirpage ON redirpage.page_id = redircat.cl_from JOIN redirect ON redirect.rd_from = redirpage.page_id JOIN page targetpage ON targetpage.page_title = redirect.rd_title JOIN categorylinks targetcat ON targetcat.cl_from = targetpage.pa...
{"resultsets": [{"headers": ["p"], "rowcount": 1}], "runningtime": "0.06"}
specieswiki_p
Olympic articles by source
Olympic articles that are sourced to sites other than Olympedia and Sports Reference
WITH articles AS ( SELECT DISTINCT(Article.page_title), Article.page_id, rev_timestamp, rev_len as "InitialSize", Article.page_len as "CurrentSize" FROM revision_userindex JOIN page AS Article ON Article.page_id = rev_page AND Article.page_namespace = 0 JOIN page AS Talk ON Article.page_title = Talk.page_title AND T...
{"resultsets": [{"headers": ["month", "Editions"], "rowcount": 67}], "runningtime": "0.10"}
enwiki_p
OT
null
SELECT CONCAT("# [[Talk:",p1.page_title,"]]") AS page_title FROM page AS p1 WHERE p1.page_title NOT LIKE '%/%' AND p1.page_namespace = 1 AND NOT EXISTS (SELECT 1 FROM page AS p2 WHERE p2.page_namespace = 0 AND p1.page_title = p2.page_title)
{"connection_id": 166135653}
bnwiki
MW Wanted categories
null
SELECT page_title, cl_to, cl_timestamp FROM page JOIN (SELECT DISTINCT cl_to , cl_from, cl_timestamp FROM categorylinks LEFT JOIN page ON cl_to = page_title AND page_namespace = 14 WHERE page_title IS NULL ) AS cattmp ON cattmp.cl_from = page_id and page_namespace != 2 where cl_to not like "%/%...
{"resultsets": [{"headers": ["irah_irahan", "gunggung"], "rowcount": 50}], "runningtime": "0.10"}
mediawikiwiki_p
Fiwiki Wikidata edits in last 30 days (summary)
wikidata edits by fiwiki users without quick statements
-- Historical values -- date,users_with_editcount100,distinct_pages,distinct_wikidataitems,distinct_properties -- Tue, 07 Feb 2023 17:35:58 UTC, 58, 597, 452, 36 -- Tue, 14 Feb 2023 08:47:59 UTC, 60, 643, 499, 36 -- Wed, 22 Feb 2023 10:08:37 UTC, 66, 630, 604, 38 -- Tue, 28 Feb 2023 08:23:44 UTC, 66, 1093, 1055, 40 -...
{"resultsets": [{"headers": ["gt_lat", "gt_lon", "gt_dim", "gt_type", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"], "rowcount": 0}], "runningtime": "0.05"}
fiwiki_p
ويكيبيديا:إحصاءات الشهر
null
# https://ar.wikipedia.org/w/index.php?title=%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D8%A5%D8%AD%D8%B5%D8%A7%D8%A1%D8%A7%D8%AA_%D8%A7%D9%84%D8%B4%D9%87%D8%B1&oldid=59981404 SET @start_date = '20230501000000'; SET @end_date = '20230531235959'; # عدد التعديلات يشمل عدد التعديلات المخفية من خلال الوصف او...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.35"}
arwiki_p
Mainspace pages without short descriptions
Excluding redirects and disambiguation pages. Warning: long run time and large result set (>1 million records)
SELECT page_title FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT cl_from FROM categorylinks WHERE cl_to IN ('All_disambiguation_pages', 'Articles_with_short_description', 'All_redirects_for_discussion') ) AND page_title != 'Main_Page'
{"resultsets": [{"headers": ["xEFBFBC"], "rowcount": 1}], "runningtime": "0.05"}
enwiki_p
Files used on OpenStreetMap that don't exist
null
select il_to, page_title from imagelinks join page on page_id = il_from where page_namespace=4 and page_title like 'Files_used_on_OpenStreetMap/%' and not exists (select 1 from page where page_namespace=6 and page_title=il_to);
{"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 184}], "runningtime": "0.32"}
commonswiki_p
Transclusions of missing templates
Code from https://github.com/fastily/fastilybot-toolforge/blob/master/scripts/report14.sql
SELECT lt.lt_title FROM templatelinks t INNER JOIN linktarget lt ON lt.lt_id = t.tl_target_id LEFT JOIN page p ON p.page_namespace = lt.lt_namespace AND p.page_title = lt.lt_title INNER JOIN page p2 ON t.tl_from = p2.page_id WHERE p.page_title IS NULL AND lt.lt_namespace = 10 GROUP BY 1 LIMIT 300;
{"connection_id": 174442027}
enwiki_p