title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
WikiDaheim correctors 2019 (after first revision)
Count the number of edits on WikiDaheim images after upload done by users other than the uploader.
USE commonswiki_p; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(revision.rev_parent_id) as edit_count FROM actor, /*user_groups,*/ revision, revision as revision0, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image....
{"runningtime": "5.27", "resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 806}]}
null
مقالات مختارة بحاجة لنجمة في ويكي بيانات
null
use arwiki_p; select page_title from categorylinks inner join page on page_id = cl_from where cl_to = "مقالات_جيدة" and page_namespace = 0 and page_is_redirect = 0 and cl_from not in (select pp_page from page_props where pp_propname like "wikibase-badge%" and pp_page = cl_from);
{"resultsets": [{"rowcount": 1, "headers": ["timestamp"]}, {"rowcount": 0, "headers": ["wikipage"]}], "runningtime": "19.97"}
null
unreviewed articles
null
# unreviewed articles SELECT page_title FROM page, pagetriage_page WHERE page_namespace = 0 AND page_id = ptrp_page_id AND ptrp_reviewed = 0 AND page_is_redirect=0
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 12}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "9.07"}
null
Most active non-admins at AN
null
SELECT actor_name, COUNT(actor_name) AS edits FROM revision JOIN actor ON rev_actor = actor_id JOIN user_groups ON actor_user = ug_user WHERE rev_page = 5149102 AND rev_timestamp > (NOW() - INTERVAL 1 year) AND ug_user NOT IN (SELECT DISTINCT user_groups.ug_user FROM user_groups WHERE ug_group = 'sysop'...
{"resultsets": [{"headers": ["itwiki_title", "enwiki_title"], "rowcount": 3749}], "runningtime": "480.74"}
null
Commons categories with no Wikidata sitelink but with de-interwiki with sitelink
Commons categories with no Wikidata sitelink but with en-interwiki with sitelink. Thanks to Matěj Suchánek at wikidata Project Chat, https://www.wikidata.org/w/index.php?title=Wikidata%3AProject_chat&type=revision&diff=708005197&oldid=707998591
USE commonswiki_p; SELECT p.page_title AS cat_name, ll.ll_title AS de_interwiki, pp1.pp_value AS item, wbt.term_text AS en_label, p2.page_namespace AS ns, p2.page_title AS page #SELECT p.page_title AS cat_name, ll.ll_title AS de_interwiki, pp1.pp_value AS item, p2.page_namespace AS ns, p2.page_title AS page FROM page A...
{"resultsets": [{"headers": ["Tables_in_tawikisource_p"], "rowcount": 91}], "runningtime": "0.36"}
null
arwiki pages with local interwiki
null
select page_id, page_title, page_namespace from arwiki_p.page inner join arwiki_p.langlinks on ll_from = page_id where page_namespace = 0 and replace(page_title, "_", " ") not in ( select ips_site_page from wikidatawiki_p.wb_items_per_site where ips_site_id = "arwiki" ) group by page_title limit 5000
{"resultsets": [{"headers": ["rev_actor"], "rowcount": 11}], "runningtime": "0.32"}
null
Sharma
null
SELECT page.page_title FROM page INNER JOIN categorylinks ON categorylinks.cl_from = page.page_id WHERE categorylinks.cl_to = "Unassessed_biography_articles" AND page.page_title LIKE "%Anthony%"
{"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 111}], "runningtime": "0.39"}
null
active editors who don't use the patroller right
null
# patrollers who don't use page curation SELECT rc_user_text, COUNT(recentchanges.rc_timestamp) AS contributions, MIN(rc_timestamp) as earliest, MAX(rc_timestamp) as latest #SELECT patrollers.user_name FROM ( SELECT user_name FROM user_groups JOIN user ON user_id = ug_user WHERE ug_group = 'patroller' ) patro...
{"resultsets": [{"headers": ["user_name", "length(user_name)", "user_editcount"], "rowcount": 19}], "runningtime": "2.20"}
null
Stránky bez kategorií
null
use cswiki_p; SELECT page_title FROM page WHERE page_id NOT IN(SELECT cl_from FROM categorylinks WHERE cl_to NOT LIKE "Údržba:%" AND cl_to NOT LIKE "Monitoring:%") AND page_is_redirect=0 AND page_namespace=0
{"resultsets": [{"rowcount": 1, "headers": ["@deleted", "@restored", "percentage"]}], "runningtime": "6.01"}
null
Changes marked as DOX, PRIVACY, or OUTING related.
Identifies revisions that were done citing violations of doxing policies to get some idea of their prevalence.
Use enwiki_p; SELECT page_title, rev_id, comment_text FROM page JOIN revision ON rev_page = page_id JOIN `comment` ON rev_comment_id = comment_id WHERE rev_comment_id IN (SELECT comment_id FROM `comment` AS c1 WHERE c1.comment_text RLIKE '\bN?POV\b') LIMIT 10;
{"resultsets": [{"headers": ["concat('* [[:\u0631\u062f\u0647:',REPLACE(frst.page_title,'_',' '),']] > [[:\u0631\u062f\u0647:',REPLACE(REPLACE(frst.page_title,'_',' '),'\u0633\u0648\u0627\u0646\u062d \u0648 \u062d\u0648\u0627\u062f\u062b \u0647\u0648\u0627\u06cc\u06cc','\u062d\u0648\u0627\u062f\u062b \u0648 \u0633\u064...
null
Voci orfane senza interwiki di piccole dimensioni (<1KB)
null
USE itwiki_p; SELECT DISTINCT CONCAT("# [[", page_title, "]]") FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_len < 1000 AND page_id IN (SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_title IN ('O')) AND page_id NOT IN (SELECT ll_from FROM langlinks);
{"connection_id": 8223026}
null
2019أكثر المستخدمين تعديلًا ضمن مقالات مشروع ويكي طب - محدث
null
USE arwiki_p; SELECT concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", COUNT(*) AS "عدد التعديلات" FROM revision r INNER JOIN actor ON r.rev_actor = actor.actor_id INNER JOIN page p on r.rev_page = p.page_id WHERE rev_timestamp between 20190101000000 and 20191231000000 and rev_page in (select cl_from fr...
{"resultsets": [{"rowcount": 10, "headers": ["page_title", "page_namespace", "rd_title", "rd_namespace"]}], "runningtime": "10.40"}
null
Modules with different protection level than templates of the same name
null
select module.page_title, template.page_title from page_restrictions source join page template on pr_page=page_id join page module on module.page_namespace = 10 and module.page_title = template.page_title join page_restrictions dest on dest.pr_page = module.page_id where source.pr_type="edit" and dest.pr_type = "edit"...
{"runningtime": "2.72", "resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 1}, {"headers": ["page_id", "page_title", "page_len", "totale", "linter_params", "ptotale"], "rowcount": 0}]}
null
Wikidata items without Telugu label
null
use wikidatawiki_p; select CONCAT("Q",ips_item_id), CONCAT("Lte"), CONCAT('"',ips_site_page,'"') from wb_items_per_site i where i.ips_site_id='tewiki' and not exists (select term_entity_id from wb_terms where i.ips_item_id = term_entity_id and term_type = "label" and term_language='te') group by ips_item_id order by i...
{"runningtime": "0.35", "resultsets": [{"headers": ["page_title"], "rowcount": 23}]}
null
Assenza di Treccani e Controllo di autorità
null
USE itwiki_p; SELECT DISTINCT CONCAT( '# [[', page_title, ']]') FROM page JOIN revision ON page_id = rev_page WHERE page_is_redirect = 0 AND page_namespace = 0 AND page_id IN ( # has {{Bio}} SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_title = 'Bio' ) AND page_id NOT I...
{"resultsets": [{"rowcount": 0, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type...
null
Danna-patrol check2
null
set @date = "20200401"; use hewiki_p; select count(*) from logging_userindex join actor on log_actor = actor_id where actor_user = 60104 and log_type = "patrol" and not log_action = "autopatrol" and log_timestamp like concat(@date, "%")
{"runningtime": "476.68", "resultsets": [{"headers": ["Menesis", "Raksti"], "rowcount": 10}]}
null
Possible violations of global rights policy (March 2020+, simplewiki)
null
/* Moves by non-autoconfirmed (Not worth querying, debatable whether it is actually a violation) use enwiki_p; select log_id, log_type, log_action, user_name, user_editcount, user_registration from logging join actor on actor_id = log_actor join user on user_id=actor_user where log_type="move" and (user_editcount < 10...
{"resultsets": [{"rowcount": 10, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}], "runningtime": "0.11"}
null
Modules without talk pages
null
select * from page where page_namespace=828 and not exists (select * from page page2 where page2.page_namespace=829 and page2.page_title=page.page_title);
{"runningtime": "4.91", "resultsets": [{"headers": ["Database"], "rowcount": 911}]}
null
zhwp: Cascade-protected templates lacking full protection
null
USE zhwiki_p; select distinct CONCAT("Template:", tl_title) from page_restrictions sres join templatelinks on tl_from = sres.pr_page join page spage on pr_page = spage.page_id join page dpage on dpage.page_namespace = tl_namespace and dpage.page_title = tl_title where pr_cascade = 1 and not exists ( ...
{"resultsets": [{"rowcount": 521, "headers": ["cnt"]}], "runningtime": "44.98"}
null
zhwp: most transclusions
null
USE zhwiki_p; SELECT tl_namespace, tl_title, COUNT(*) AS `cnt` FROM templatelinks WHERE tl_namespace IN (10, 828) GROUP BY tl_title HAVING `cnt` >= 500 ORDER BY COUNT(*) DESC
{"resultsets": [{"headers": ["c", "fp_page_id"], "rowcount": 10}], "runningtime": "12.55"}
null
TEST 7
null
null
{"resultsets": [{"headers": ["gil_wiki", "gil_page", "gil_page_namespace_id", "gil_page_namespace", "gil_page_title", "gil_to"], "rowcount": 10}], "runningtime": "0.11"}
null
Possible violations of global rights policy (2019+, Wikinews)
Wikinews's policy is even stricter than Wikipedia's here.
/* Moves by non-autoconfirmed (Not worth querying, debatable whether it is actually a violation) use enwiki_p; select log_id, log_type, log_action, user_name, user_editcount, user_registration from logging join actor on actor_id = log_actor join user on user_id=actor_user where log_type="move" and (user_editcount < 10...
{"resultsets": [{"headers": ["CONCAT(\"[[:File:\", page_title, \"]]\")"], "rowcount": 767}], "runningtime": "6.27"}
null
Subpages possibly in need protection (TE)
null
select subpage.page_namespace, subpage.page_title from page_restrictions source join page basepage on pr_page=page_id join page subpage on subpage.page_title like concat(basepage.page_title,"/%") and subpage.page_namespace = basepage.page_namespace join page_restrictions subrestrictions on subpage.page_id = subrestrict...
{"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 240}], "runningtime": "5.08"}
null
zhwiki: Twinkle usage
null
USE zhwiki_p; SELECT ct_rev_id, user_name, ug_group, comment_text, page_namespace, page_title FROM ( SELECT * FROM change_tag WHERE ct_tag_id = 1 ORDER BY ct_id DESC LIMIT 5000 ) change_tag LEFT JOIN revision ON ct_rev_id = rev_id LEFT JOIN actor ON rev_actor = actor_id LEFT JOIN user ON actor_user = u...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 4}, {"headers": ["cl_to"], "rowcount": 16}, {"headers": ["cl_to"], "rowcount": 38}], "runningtime": "0.83"}
null
Uncommon user rights
null
SELECT user.user_name, user.user_id, user.user_registration, user_groups.* FROM user LEFT JOIN user_groups ON user_id = ug_user WHERE ug_group IN ('accountcreator', 'eventcoordinator', 'massmessage-sender', 'templateeditor', 'abusefilter', 'abusefilter-helper') AND ug_user NOT IN (SELECT ug_user FROM user_groups WHERE ...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 12}, {"headers": ["cl_to"], "rowcount": 32}], "runningtime": "0.45"}
null
Orphaned timed text
null
#USE commonswiki_p; SELECT CONCAT('[[TimedText:', page_title, ']]') AS TimedText, CONCAT('[[:File:', SUBSTR(page_title, 1, LENGTH(page_title) - 7), ']]') AS File FROM page WHERE page_namespace = 102 AND page_title LIKE '%.___.__.srt' AND page_is_redirect = 0 AND SUBSTR(page_title, 1, LENGTH(page_title) - ...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 11}, {"headers": ["cl_to"], "rowcount": 30}], "runningtime": "0.44"}
null
Properties created by user
null
use wikidatawiki_p; SELECT actor_name AS 'User', COUNT(*) AS 'Properties created', CASE WHEN EXISTS ( SELECT 1 FROM user_groups WHERE ug_user = actor_user AND ug_group = 'sysop' ) THEN 'Current administrator' WHEN EXISTS ( SELECT 1 FROM user_groups WHERE ug_user...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 11}, {"headers": ["cl_to"], "rowcount": 28}], "runningtime": "0.38"}
null
User's edits by tag
null
#USE wikidatawiki_p; SELECT #actor.actor_name AS 'User', #If you only know the user's actor id, but you want the user's name too change_tag_def.ctd_id AS 'Tag id', change_tag_def.ctd_name AS 'Tag', actor.actor_id, #If you only know the user's name, but want the actor id too COUNT(revision_userindex.rev_id) AS...
{"resultsets": [{"headers": ["cl_to"], "rowcount": 3}, {"headers": ["cl_to"], "rowcount": 11}, {"headers": ["cl_to"], "rowcount": 27}], "runningtime": "0.61"}
null
Interwiki nélküli sablonok
null
USE huwiki_p; SELECT page_title FROM page LEFT JOIN templatelinks ON tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Kat-redir' LEFT JOIN langlinks ON ll_from = page_id WHERE page_namespace = 10 AND NOT page_title LIKE 'Csonk%' AND NOT page_title LIKE 'Évfordulók%' AND NOT page_title LIKE 'Hasonló_nev...
{"runningtime": "0.76", "resultsets": [{"rowcount": 84, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]}
null
تصنيفات مطلوبة من المقابل الإنجليزي
null
select page_title, count(cl_from) from page inner join categorylinks on cl_to = page_title where page_id not in (select cl_from from categorylinks where cl_to = "Hidden_categories") and cl_from in (select ll_from from langlinks where ll_from = cl_from and ll_lang = "ar") and page_id not in (select ll_from from langlink...
{"runningtime": "0.34", "resultsets": [{"rowcount": 23, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]}
null
zhwiki include Vfd but not in afd
null
USE zhwiki_p; SELECT page_title FROM ( SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_from_namespace = 0 AND tl_title = 'Vfd') t1 LEFT JOIN page ON tl_from = page_id LEFT JOIN ( SELECT pl_title, pl_namespace FROM pagelinks WHERE pl_from = 820706 OR pl_from = 3438138 ) t2 ON pl_title =...
{"runningtime": "0.12", "resultsets": [{"rowcount": 4, "headers": ["il_from", "il_to", "il_from_namespace", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"...
null
Бессрочники с большим (положительным?) вкладом
null
use ruwiki_p; SELECT user_name, user_editcount, ipb_timestamp, comment_text FROM (SELECT user_name, user_editcount, ipb_timestamp, ipb_reason_id FROM user INNER JOIN ipblocks ON (user_id = ipb_user) and (ipb_expiry = "infinity") and (user_editcount > 10000)) AS A INNER JOIN comment ON (ipb_reason_id = comment_id)
{"runningtime": "0.12", "resultsets": [{"rowcount": 0, "headers": ["category_name", "fawiki_counterparts"]}]}
null
Legtöbbet hivatkozott lapok
A legtöbb link ezekre a megíratlan szócikkekre mutat
USE huwiki_p; SELECT pl_title AS title, COUNT(pl_from) AS requests FROM page p JOIN pagelinks ON p.page_id = pl_from LEFT JOIN page x ON pl_title = x.page_title AND x.page_namespace=10 WHERE p.page_namespace = 0 AND pl_namespace = 0 AND x.page_title IS NULL GROUP BY title ORDER BY requests DESC LIMIT 5000;
{"runningtime": "1.69", "resultsets": [{"rowcount": 18, "headers": ["page_title", "rev_timestamp"]}]}
null
أكثر المسترجعين في ويكيبيديا العربية
null
use arwiki_p; select rev_user_text , count(*) from change_tag inner join revision on rev_id = ct_rev_id inner join change_tag_def on ctd_id = ct_tag_id where ctd_name like "mw-rollback" and rev_user not in (select ug_user from user_groups where ug_user = rev_user and ug_group = "sysop") group by rev_user_text order by...
{"runningtime": "0.55", "resultsets": [{"rowcount": 6, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 3, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]}
null
Page curation logs
null
SET @username = 'Lapablo'; SET @actorId = 35134458; /* SELECT * FROM actor WHERE actor_name = @userName LIMIT 1; /**/ -- NPP rights reverting SELECT 'Review' AS 'User action', CASE WHEN pt.ptrp_reviewed IS NULL THEN 'enqueue' ELSE 'unreview' END AS 'Action to take', l.log_page FROM logging_user...
{"runningtime": "0.13", "resultsets": [{"rowcount": 15, "headers": ["page_title"]}]}
null
List of requests for comment on jawp
ウィキペディア日本語版におけるコメント依頼の一覧。表に無かったので作ってみたけどどこかにあるのかな?
USE jawiki_p; SELECT concat("Wikipedia:", page_title) AS ページ名, DATE(MIN(rev_timestamp)) AS 提出日 FROM page INNER JOIN revision_userindex AS rev ON page_id = rev_page WHERE page_title LIKE "コメント依頼/%" AND page_namespace = 4 GROUP BY page_id, page_title, page_len ORDER BY rev_timestamp ASC
{"connection_id": 464800396}
null
Voci di it.wiki con immagini richieste e un interwiki a Commons
null
USE itwiki_p; SELECT DISTINCT CONCAT('# [[', page_title, ']]') FROM page WHERE page_namespace = 1 AND page_id IN ( SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND ( tl_title = 'Richiesta_immagini' OR tl_title = 'Richiesta_foto' ) ) AND page_title IN ( SELECT REPLACE(WIKI.ips_site...
{"runningtime": "0.41", "resultsets": [{"rowcount": 100, "headers": ["page_title", "page_len", "rev_actor"]}]}
null
Get mainspace revisions to arwiki
null
use arwiki_p; SELECT rc_timestamp, rc_actor, rc_title, rc_this_oldid, rc_old_len, rc_new_len, actor_name FROM recentchanges LEFT JOIN actor ON rc_actor = actor_id WHERE rc_type = 0 AND rc_namespace = 0 #AND actor_user IS null LIMIT 100;
{"runningtime": "0.78", "resultsets": [{"rowcount": 86, "headers": ["actor_name", "total"]}]}
null
Patrollers & rollbackers in cswiki
null
USE cswiki_p; SELECT COUNT(*) AS total, SUM(IF(ug_user IS NULL, 0, 1)) AS rollbackers FROM change_tag JOIN recentchanges ON rc_id = ct_rc_id JOIN actor_recentchanges ON actor_id = rc_actor LEFT JOIN user_groups ON ug_user = actor_user AND ug_group = 'rollbacker' AND ug_user NOT IN (SELECT ug_user FROM user_groups WHER...
{"resultsets": [{"rowcount": 1288, "headers": ["page_title", "rev_timestamp"]}], "runningtime": "14.73"}
null
Testing
null
USE testwiki_p; SELECT ug.*, u.user_name, gu.gu_locked FROM user_groups ug JOIN user u ON ug.ug_user = u.user_id JOIN centralauth_p.globaluser gu ON gu.gu_name = u.user_name WHERE gu_locked = 1 LIMIT 10; /* SET @whitelistPage = 62534307; SET @botActorId = 192619287; SET @userNamespace = 2; SET @listedUsers = ( SELEC...
{"resultsets": [{"rowcount": 0, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}], "runningtime": "0.07"}
null
Edits by users from date
Edits by Non-IP users from date
use tewiki_p; SELECT CONCAT("User:",user_name,"|",user_name,"]]") as Username, COUNT(*) as Edits_since_20200101 FROM revision JOIN revision_actor_temp ON revactor_rev=rev_id JOIN actor ON revactor_actor=actor_id JOIN user ON user_id =actor_user WHERE LEFT(rev_timestamp,8) > "20191231" AND user_name...
{"resultsets": [{"rowcount": 1, "headers": ["count(*)", "avg(age)"]}], "runningtime": "12.83"}
null
Kategori yang berisi 1 kategori
null
use idwiki_p; SELECT page_title, cat_pages FROM category LEFT JOIN page ON page_title = cat_title WHERE (page_namespace = 2 || page_namespace = 14) AND cat_pages = 1 AND cat_subcats = 1 ORDER BY cat_pages, page_title ASC;
{"resultsets": [{"rowcount": 965, "headers": ["actor_name", "actor_user"]}], "runningtime": "2.93"}
null
Page containing 0 page links - Halaman buntu
From Help:MySQL_queries
use idwiki_p; SELECT page_namespace, page_title FROM page LEFT JOIN pagelinks ON pl_from = page_id WHERE pl_namespace IS NULL LIMIT 2000;
{"resultsets": [{"rowcount": 932, "headers": ["Database"]}], "runningtime": "4.31"}
null
zhwiki: user_groups with last edit/log/right
null
USE zhwiki_p; SELECT ug_user, user_name, groups , (SELECT MAX(rev_timestamp) FROM revision WHERE rev_actor = actor_id ORDER BY rev_id DESC LIMIT 1) AS `lastedit` , (SELECT MAX(log_timestamp) FROM logging WHERE log_actor = actor_id ORDER BY log_id DESC LIMIT 1) AS `lastlog` , (SELECT MAX(log_timestamp) FROM logging W...
{"runningtime": "0.75", "resultsets": [{"headers": ["substr(ar_timestamp,1,8)", "All_NS_deletions"], "rowcount": 124}]}
null
dewiki: number of ns0 edits per user during past year
null
SELECT actor_name, COUNT(rev_id) AS edits FROM revision_userindex JOIN page ON rev_page=page_id JOIN actor_revision ON rev_actor=actor_id WHERE rev_timestamp>=20180526000000 AND actor_user!=0 AND page_namespace=0 GROUP BY actor_name;
{"resultsets": [{"rowcount": 3603, "headers": ["page_id", "page_len", "page_title", "img_timestamp"]}], "runningtime": "35.99"}
dewiki_p
wikidata: tokipona terms (for WD:RAQ; old schema)
null
-- for https://www.wikidata.org/w/index.php?title=Wikidata:Request_a_query&oldid=935443223#All_items_with_label_in_small_language SELECT * FROM wb_terms WHERE term_language='tokipona';
{"resultsets": [{"rowcount": 1, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}], "runningtime": "11.50"}
wikidatawiki_p
wikidata: deleted items that could potentially be undeleted and merged
null
SELECT log_timestamp, log_title, actor_name, comment_text FROM logging JOIN comment ON log_comment_id=comment_id JOIN actor_logging ON log_actor=actor_id WHERE log_namespace=0 AND log_type='delete' AND log_action='delete' AND log_timestamp<20150000000000 AND log_title NOT IN (SELEC...
{"connection_id": 953521278}
wikidatawiki_p
Autoconfirmed users who are confirmed in srwiki
null
use srwiki_p; SELECT user_name FROM user JOIN user_groups ON ug_user=user_id WHERE ug_group = 'autoconfirmed' AND ug_group = 'confirmed' ORDER BY user_editcount DESC;
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 1854}], "runningtime": "10.56"}
srwiki_p
Redirects to deleted pages on srwiki
null
USE srwiki_p; SELECT page_title, redirect.rd_namespace, redirect.rd_title FROM page JOIN redirect ON rd_from = page.page_id WHERE rd_namespace <> 0 AND page_namespace = 0 AND page_title NOT LIKE '%:%' LIMIT 100
{"resultsets": [{"headers": ["count(ug_user)", "ug_group"], "rowcount": 0}], "runningtime": "0.07"}
srwiki_p
List all pages which contains double extension name (png) on srwiki
null
use srwiki_p; SELECT concat("# [[:File:",page_title,"]]") FROM page WHERE page_title LIKE '%png.png' AND page_namespace=6 AND page_is_redirect=0;
{"resultsets": [{"headers": ["count(user_id)", "user_editcount"], "rowcount": 1}], "runningtime": "147.61"}
srwiki_p
Transclusions of deleted templates
Query used by database report, using the SQL query found in https://github.com/mzmcbride/database-reports/blob/master/reports/general/deletedtrans.py
SELECT CONVERT(tl_title USING utf8), COUNT(DISTINCT tl_from) FROM templatelinks LEFT JOIN page AS p1 ON p1.page_namespace = tl_namespace AND p1.page_title = tl_title JOIN logging ON tl_namespace = log_namespace AND tl_title = log_title AND log_type = 'delete' JOIN page AS p2 ON tl_from = p2.page_id WHERE p1.page_id...
{"resultsets": [{"rowcount": 3, "headers": ["Count", "Size_GB", "Type"]}], "runningtime": "125.54"}
enwiki_p
Transclusions of deleted templates
Query used by database report, using the SQL query found in https://github.com/mzmcbride/database-reports/blob/master/reports/general/deletedtrans.py
SELECT CONVERT(tl_title USING utf8), COUNT(DISTINCT tl_from) FROM templatelinks LEFT JOIN page AS p1 ON p1.page_namespace = tl_namespace AND p1.page_title = tl_title JOIN logging ON tl_namespace = log_namespace AND tl_title = log_title AND log_type = 'delete' JOIN page AS p2 ON tl_from = p2.page_id WHERE p1.page_id...
{"runningtime": "0.09", "resultsets": [{"rowcount": 0, "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", "user_id", "user_name", "user_real_name", "user_password", "user_newpa...
enwiki_p
Lexemes created by a user
null
SELECT page.page_title FROM page JOIN revision ON page.page_id=revision.rev_page JOIN actor ON revision.rev_actor=actor.actor_id WHERE page.page_namespace=146 AND revision.rev_parent_id=0 # No parent rev = page creation AND actor.actor_name = "Eric Luth (WMSE)"
{"runningtime": "3.41", "resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 10}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 9}, {"headers"...
wikidatawiki_p
Templates transcluded on the most pages
null
SELECT tl_title, COUNT(*) FROM templatelinks WHERE tl_namespace = 10 GROUP BY tl_title HAVING COUNT(*) > 2000 LIMIT 10000;
{"runningtime": "0.62", "resultsets": [{"rowcount": 1, "headers": ["COUNT(*)"]}]}
enwiki_p
Bilderwünsche nach Artikel
null
#use dewiki_p; #describe externallinks; #select page_title, page_id, page_namespace from page where page_title="Ernst_Epstein"; select pl_title, pl_from_namespace from pagelinks where pagelinks.pl_title like "%Bilderwunsch/code%" and pagelinks.pl_from in (select page_id from page where page_namespace=0 and page_title=...
{"runningtime": "0.75", "resultsets": [{"rowcount": 18, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}]}
dewiki_p
zhwp: article title ends with "數"
null
SELECT page_id, page_title FROM page WHERE page_title REGEXP "(数|數)$" AND page_namespace = 0 AND page_is_redirect = 0 ORDER BY page_title ASC
{"runningtime": "0.12", "resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 0}]}
zhwiki_p
Portals
null
SELECT page_title FROM page WHERE page_namespace = 100 -- portal namespace AND page_title NOT LIKE '%/%' -- remove subpages AND page_is_redirect = 0 -- remove redirects
{"runningtime": "0.22", "resultsets": [{"headers": ["pl_title", "COUNT(pl_title)"], "rowcount": 55}]}
enwiki
مؤید
null
select concat ('*[[',page_title,']]') from page where page_namespace = 0 and page_title like '%موید%' AND page_is_redirect = 0;
{"resultsets": [{"headers": ["fr_rev_id", "fr_rev_timestamp", "Time diff", "fr_timestamp", "page_title"], "rowcount": 114}], "runningtime": "0.26"}
fawiki_p
Pdd d'articles en redirection alors que l'article existe sur WP:FR
Testé et validé le 5/10/2019.
SELECT CONCAT("\[\[", REPLACE(page_article.page_title, '_', ' '), "\]\]") AS article, CONCAT("{{a-redir-simple|Discussion:", REPLACE(page_pdd.page_title, '_', ' '), "}}") AS pdd FROM (SELECT page_title FROM page WHERE page_namespace = 1 and page_is_redirect = 1) AS page_pdd INNER JOIN (SELECT pa...
{"resultsets": [{"headers": ["user", "cnt"], "rowcount": 181}], "runningtime": "11.27"}
frwiki
Toutes les redirections de l'espace Discussion sur WP:FR
null
SELECT CONCAT("{{a-redir-simple|Discussion:", page_title, "}}") AS sortie FROM page WHERE page_namespace = 1 AND page_is_redirect = 1
{"resultsets": [{"headers": ["page_title", "count(categorylinks.cl_to)"], "rowcount": 10}], "runningtime": "0.06"}
frwiki
Redirections de pages de discussion de l'espace principal sur WP:FR (hors sous-pages)
Testé et validé le 23/07/2019.
SELECT CONCAT("{{a-redir-simple|Discussion:", REPLACE(page_title, '_', ' '), "}}") AS sortie FROM page WHERE page_namespace = 1 AND page_is_redirect = 1 AND page_title NOT LIKE "%/%" AND page_title NOT LIKE "(%)%" /* Retirer les redirections d'astéroïdes */ ORDER BY page_title
{"resultsets": [{"headers": ["page_title", "count(categorylinks.cl_to)"], "rowcount": 100}], "runningtime": "0.17"}
frwiki
Pages utilisateur d'IP en redirection sur WP:FR
Liste les pages utilisateurs d'IP en redirection. Quelques faux positifs d'utilisateurs inexistants dont le nom matche le pattern. Testé et validé le 5/10/2019
SELECT CONCAT("{{a-redir-simple|Utilisateur:", page_title, "}}") AS pu, CONCAT("{{a-redir-simple|Discussion utilisateur:", page_title, "}}") AS pdd FROM page LEFT JOIN `user` /* Get page name, extract substring till char '/' and replace '_' by ' '. This is user name, use it to LEFT JOIN with 'user' table. */ ON REP...
{"connection_id": 24136127}
frwiki
Sous-pages utilisateur non liées à un utilisateur sur WP:FR
Lister les sous-pages utilisateur (Utilisateur:***/*** et Discussion utilisateur:***/***) (hors IP) ne correspondant pas à un utilisateur enregistré. Testé et validé le 22/07/2019.
SELECT CONCAT("{{u'|", REPLACE(page_title, '_', ' '), "}}") AS sortie FROM page LEFT JOIN `user` ON REPLACE(SUBSTRING_INDEX(page.page_title, '/', 1), '_', ' ') = user.user_name /* Get page name, extract substring till char '/' and replace '_' by ' '. This is user name, use it to LEFT JOIN with 'user' table. */ WHERE ...
{"connection_id": 24136889}
frwiki
Redirect autopatrol monitoring
null
/* SELECT * FROM actor WHERE actor_name = 'DannyS712 bot III'; Result: 192619287 */ SET @whitelistPage = 62534307; SET @botActorId = 192619287; SET @userNamespace = 2; /* Pages created by whitelisted users and patrolled recently by bot that don't currently exist */ /* SELECT patrol.rc_timestamp, patrol.rc_tit...
{"resultsets": [{"headers": ["page_title", "last_touched", "link"], "rowcount": 5}], "runningtime": "0.06"}
enwiki_p
zhwiki: change_tag_def
null
SELECT * FROM change_tag_def
{"resultsets": [{"headers": ["filename", "tl_title"], "rowcount": 2}], "runningtime": "0.06"}
zhwiki_p
Capture QuickStatement external links of {{Book}} templates
null
use commonswiki_p; SELECT REPLACE(REPLACE(REPLACE(el_to, 'https://quickstatements.toolforge.org/#/v1=',''), '%7C','|'),'||','#') FROM externallinks JOIN page ON page_id = el_from JOIN categorylinks ON cl_from = page_id WHERE page_namespace in (6,14) and #14 cl_to='Books_with_Wikidata_item:_quick_statements' AND ...
{"resultsets": [{"headers": ["log_title"], "rowcount": 10}], "runningtime": "0.07"}
commonswiki_p
recentchanges patrol status
null
select count(*) as count0 from recentchanges where -- unpatrolled rc_timestamp > 20220530000000 and rc_timestamp < 20220606000000 and rc_patrolled = 0 and rc_new = 0; select count(*) as count1 from recentchanges where -- manually rc_timestamp > 20220530000000 and rc_timestamp < 20220606000000 and rc_patrolled = 1 and...
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "actor_id", "actor_user", "actor_name", "user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "us...
zhwiki_p
zhwiki: user_properties
null
USE zhwiki_p; SELECT DISTINCT up_property FROM user_properties; /*SELECT * FROM user_properties WHERE up_property = 'fancysig' LIMIT 10;*/ SELECT * FROM user_properties WHERE up_user = 2328371; #SELECT * #FROM user_properties #WHERE up_property = 'nickname' #LIMIT 10;
{"resultsets": [{"headers": ["ctd_name", "year", "month", "rev_count", "quality_0"], "rowcount": 25}], "runningtime": "0.31"}
zhwiki_p
Top 10.000 linked disambiguation pages on dewiki
null
USE dewiki_p; SELECT CONCAT('# [[', pl.pl_title, ']] <small>(', COUNT(pl.pl_from), ' Links)</small>') FROM pagelinks pl INNER JOIN page p ON (p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace) INNER JOIN page_props pp ON (pp.pp_page = p.page_id AND pp.pp_propname = 'disambiguation') WHERE pl.pl_namespac...
{"connection_id": 9897097}
dewiki_p
wikidata: undeleted items that were previously deleted, by admin
null
SELECT actor_name, COUNT(DISTINCT log_title) AS undel FROM logging JOIN actor_logging ON log_actor=actor_id WHERE log_namespace=0 AND log_type='delete' AND log_action='delete' AND log_title IN (SELECT page_title FROM page WHERE page_namespace=0 AND page_is_redirect=0) GROUP BY act...
{"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 50}], "runningtime": "0.08"}
wikidatawiki_p
de_wiki: red links count gt 120
output for https://de.wikipedia.org/wiki/Wikipedia:Fehlende_Artikel
use dewiki_p; SET sql_mode='PIPES_AS_CONCAT'; select '- [['||REPLACE(pl_title, '_', ' ')||']] <!-- '|| c ||' Links -->' as output from (select pl_title , count(*) as c , pl_namespace from pagelinks where pl_from_namespace=0 and pl_namespace=0 group by pl_title, pl_namespace having count(*)>98) ...
{"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", "ct_id", "ct_rc_id", "ct_log_id", "ct_rev_id", "ct_params", "ct_tag_id", "ctd_id", "ctd_name", "ctd_user_defined", "ctd_count", "actor_id", "actor_u...
dewiki_p
Number of all edits in ns0 in certain wiki per year
null
select actor_name, count(*) c from revision join page on rev_page=page_id join actor on rev_actor=actor_id where page_namespace = 0 and rev_timestamp >= "20210101000000" and rev_timestamp < "20220101000000";
{"resultsets": [{"headers": ["rc_timestamp"], "rowcount": 1}, {"headers": ["rev_timestamp"], "rowcount": 1}], "runningtime": "0.09"}
ruwikibooks_p
Most active Lexeme editors
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 actor ON revision.rev_actor=actor.actor_id WHERE page.page_namespace=146 GROUP BY actor.actor_name ORDER BY cnt DESC #LIMIT 20;
{"resultsets": [{"headers": ["page_title", "ips_site_id", "ips_site_page"], "rowcount": 1000}], "runningtime": "89.40"}
wikidatawiki_p
Most prolific Lexeme creators
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 actor ON revision.rev_actor=actor.actor_id WHERE page.page_namespace=146 AND revision.rev_parent_id=0 # No parent rev = page creation GROUP BY actor.actor_name ORDER BY cnt DESC #LI...
{"resultsets": [{"headers": ["page_title", "ips_site_id", "ips_site_page"], "rowcount": 1138}], "runningtime": "56.06"}
wikidatawiki_p
testing Ores
null
USE enwiki_p; (SELECT page_props.pp_value, article.page_title, revision.rev_timestamp, MIN(revision.rev_id), MAX(revision.rev_id), COUNT(*) AS edits, article.page_len FROM revision INNER JOIN page article ON article.page_id = rev_page AND article.page_namespace = 0 INNER JOIN page talk ON talk.page_title =...
{"resultsets": [{"headers": ["page_title", "tl_title", "tl_namespace", "tl_target_id", "lt_title", "lt_namespace"], "rowcount": 122}], "runningtime": "1.94"}
enwiki_p
Довгі сторінки
null
USE ukwiki_p; SELECT concat('[[', CASE WHEN page_namespace = -2 THEN "Медіа:" WHEN page_namespace = -1 THEN "Спеціальна:" WHEN page_namespace = 0 THEN "" WHEN page_namespace = 1 THEN "Обговорення:" WHEN page_namespace = 2 THEN "Користувач:" WHEN page_namespace = 3 THEN "Обговорення користувача:" WHEN page_namespace = ...
{"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", "ct_id", "ct_rc_id", "ct_log_id", "ct_rev_id", "ct_params", "ct_tag_id", "actor_id", "actor_user", "actor_name"], "rowcount": 50}], "runningtime": "...
ukwiki_p
(commons) instructional cat updates
null
select page_title, img_timestamp from page join categorylinks on cl_from = page_id and cl_to = "Instructional_videos_on_using_Wikipedia" join image on page_title = img_name limit 130
{"resultsets": [{"headers": ["@from", "@to"], "rowcount": 1}, {"headers": ["count(DISTINCT rev_id)"], "rowcount": 1}, {"headers": ["count(rev_id)"], "rowcount": 1}], "runningtime": "0.40"}
commonswiki_p
Most used pieces of data on cswiki
null
SELECT eu_entity_id, eu_aspect, COUNT(*) FROM wbc_entity_usage WHERE eu_aspect <> 'S' GROUP BY eu_entity_id, eu_aspect HAVING COUNT(*) >= 50 ORDER BY COUNT(*) DESC, eu_entity_id, eu_aspect;
{"resultsets": [{"headers": ["CONCAT(\"https://en.wikisource.org/wiki/Index:\", basename)"], "rowcount": 209}], "runningtime": "1.84"}
cswiki_p
مستخدمون يحملون صلاحيات متضادة
null
select user_name from user where user_id in (select ug_user from user_groups where ug_group = "rollbacker") and user_id in (select ug_user from user_groups where ug_group = "autoreview") limit 10;
{"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", "pl_from"], "rowcount": 0}], "runningtime": "0.15"}
arwiki_p
Pre-2009 enwiki indef non-range IP blocks
In preparation for a bot run to unblock them all.
SELECT ipb_id, ipb_address, ipb_timestamp, comment_text FROM ipblocks_ipindex LEFT JOIN `comment` ON(ipb_reason_id = comment_id) WHERE ipb_user = 0 AND ipb_timestamp < '20090101000000' AND ipb_expiry = 'infinity' AND ipb_range_start = ipb_range_end AND (IS_IPV4(ipb_address) OR IS_IPV6(ipb_address)) ORDER BY ipb_id...
{"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 73}], "runningtime": "0.46"}
arwiki_p
Misspelled articles titles (arwiki)
الأخطاء الإملائية ممثلة في: 1. المسافة بعد حرف الجر "و". 2. الألف المقصورة في حرف الجر "في". 3. همزة الوصل في حرف الجر "إلى". 4. الياء في حرف الجر "إلى". 5. عدم وجود مسافة في أسماء العبودية.
SELECT CONCAT('# [[', page_title, ']]') AS page_title FROM page WHERE page_namespace = 0 and page_is_redirect = 0 AND page_title REGEXP '(_و_|_فى_|_الى_|_إلي_|ـ)' AND page_title NOT LIKE '%هـ%' #OR page_title REGEXP 'عبد(الله|الرحمن|الرحيم|الملك|القدوس|السلام|المؤمن|المهيمن|العزيز|الجبار|المتكبر|الخالق|البارئ|المصور|...
{"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_user", "log_actor", "log_namespace", "log_title", "log_comment", "log_comment_id", "log_params", "log_deleted", "log_user_text", "log_page"], "rowcount": 20}], "runningtime": "0.08"}
arwiki_p
zhwiki: revision
null
SELECT rev_id, rev_timestamp FROM revision WHERE rev_timestamp < 20220827000000 ORDER BY rev_timestamp DESC LIMIT 1
{"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 37}], "runningtime": "5.07"}
zhwiki_p
Users by number of article creations
null
SELECT actor_name, COUNT(*) as articles_created FROM revision r INNER JOIN actor ON r.rev_actor = actor.actor_id INNER JOIN page p on r.rev_page = p.page_id WHERE p.page_namespace = 0 and p.page_is_redirect = 0 and r.rev_parent_id = 0 and ucase(actor_name) not like ucase("%BOT") and actor_name...
{"resultsets": [{"headers": ["C\u00edm", "Ellen\u0151riz"], "rowcount": 328}], "runningtime": "1.31"}
arwiktionary_p
Empty Categories on Arabic wiki
Empty Categories in Arabic wiki
select cat_pages as "عدد الصفحات", CONCAT ("تصنيف:",cat_title) AS "العنوان" from category inner join page on page.page_title = category.cat_title where page.page_namespace=14 and category.cat_pages = 0 and category.cat_subcats = 0 and category.cat_files = 0 and page.page_is_redirect = 0 And Not page.page_id in (select...
{"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 1}], "runningtime": "93.00"}
arwiki_p
Indef'ed IP's before 2009
null
SELECT ipb_address AS ip, ipb_by_text AS admin, ipb_timestamp AS timestamp, ipb_expiry, ipb_enable_autoblock, ipb_anon_only, ipb_create_account, ipb_allow_usertalk, comment_text AS reason FROM ipblocks JOIN comment ON ipb_reason_id ...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 13518}], "runningtime": "6993.37"}
arwiki_p
Wikiproject Cleanup Contributions (Copy)
null
SET @rank=0; SELECT CONCAT('{{إحصاءات مساهم في مشروع ويكي الصيانة|',@rank:=@rank+1,'|') AS rank, s.* FROM ( SELECT rev_user_text, CONCAT('|',COUNT(*),'}}') FROM revision_userindex WHERE rev_comment like "%وب:م و ص%" GROUP BY rev_user_text ORDER BY COUNT(*) DESC) s;
{"resultsets": [{"headers": ["#", "Usuario/a", "Total"], "rowcount": 100}], "runningtime": "2.39"}
arwiki_p
Talk pages for deleted pages on arwiki
null
select DISTINCT concat ("نقاش:",page_title) from page where page.page_namespace = 1 and page.page_title NOT LIKE '%/%' and not page.page_title in (select page_title from page where page_namespace=0) limit 50;
{"resultsets": [{"headers": ["user_talk"], "rowcount": 5173}], "runningtime": "1615.60"}
arzwiki_p
meta_p: list of wikis
null
USE meta_p; #SHOW TABLES FROM meta_p; #DESCRIBE wiki; SELECT url, dbname, is_closed FROM wiki ORDER BY url;
{"resultsets": [{"headers": ["ptrp_page_id", "ptrp_reviewed", "ptrp_deleted", "ptrp_created", "ptrp_tags_updated", "ptrp_reviewed_updated", "ptrp_last_reviewed_by", "page_id", "page_namespace", "page_title", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len...
meta_p
Admins without RfAs
null
select user_name from user join user_groups on ug_user = user_id and ug_group = "sysop" where not exists (select * from page where page_namespace=4 and page_title=concat("Requests_for_adminship/",replace(user_name," ","_"))) and not exists (select * from user_groups ug2 where ug2.ug_user = user_id and ug2.ug_group = "b...
{"resultsets": [{"headers": ["page_title", "lt_title"], "rowcount": 34}], "runningtime": "0.09"}
enwiki
Deletes by stewards
null
select log_id, actor_name, log_namespace, log_title, log_timestamp, -- (select comment_text from comment where comment_id=log_comment_id) as "comment", (select count(*) from archive where ar_namespace=log_namespace and ar_title=log_title) as "deleted revision count" from actor -- local join logging_...
{"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", "tl_from", "tl_from_namespace", "tl_target_id"], "rowcount": 0}], "runningtime": "0.20"}
enwiki
Users eligible to vote on skwiki
null
USE skwiki_p; -- Policy: https://sk.wikipedia.org/wiki/Wikip%C3%A9dia:Pravidl%C3%A1/Hlasovanie -- Date and time (UTC) to list eligible voters to, e.g. start of a voting: -- SELECT @t := now(); SELECT @t := '2023-06-07 20:49:00'; -- SELECT @t := '2015-11-09 11:08:00'; SELECT user_name, user_registration, user_edi...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.05"}
skwiki
Suspicious user talk page moves
null
select log_id,log_timestamp,concat("User talk:",log_title),log_params from logging_logindex where log_type="move" and log_namespace=3 and log_params not like "%User talk:%" and log_title not like "%/%" and log_timestamp like "2023%" order by log_timestamp desc limit 100;
{"resultsets": [{"headers": ["page_title", "page_id", "talk_id"], "rowcount": 0}], "runningtime": "14.18"}
enwiki
fr.wiki's long talk pages
null
SELECT CONCAT('#[[', page_title, ']] - ', page_len) FROM page WHERE page_is_redirect = 0 AND page_namespace = 1 ORDER BY page_len DESC LIMIT 500
{"resultsets": [{"headers": ["page_title", "rev_timestamp", "page_latest", "count", "pa_class"], "rowcount": 1000}], "runningtime": "83.13"}
frwiki_p
Mapping between Wikidata items and Italian Wikipedia articles
null
SELECT page_title, pp_value as item_id FROM page JOIN page_props ON page_id=pp_page WHERE pp_propname='wikibase_item';
{"resultsets": [{"headers": ["page_title"], "rowcount": 136}], "runningtime": "0.53"}
itwiki_p
File pages on Commons without files
null
USE commonswiki_p; SELECT CONCAT('# [[:File:', REPLACE (page_title,'_',' '), ']]', IF (EXISTS (SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = page_id AND lt_namespace = 10 AND lt_title IN ('Delete', 'SD', 'Speedydelete')), ' (DR pending)', '')) AS p FROM pa...
{"resultsets": [{"headers": ["rev_timestamp", "actor_name", "page_title", "comment_text", "page_id"], "rowcount": 0}], "runningtime": "0.05"}
commonswiki_p
980501 mp1 # of direct links to DAB pages (pages)
null
USE fawiki_p; SELECT COUNT(page_id) FROM pagelinks JOIN page WHERE page_is_redirect=0 AND page_namespace=0 AND page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation' ) AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redirect=0 ) AND pl_title=page_title AND pl_namespace ...
{"connection_id": 61850189}
null
980501 mp1 # of DAB pages with direct link (pages)
null
USE fawiki_p; SELECT COUNT(DISTINCT(page_title)) FROM pagelinks JOIN page WHERE page_is_redirect=0 AND page_namespace=0 AND page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation') AND pl_from IN ( SELECT page_id FROM page WHERE page_is_redirect=0) AND pl_title=page_title AND pl_nam...
{"runningtime": "13.50", "resultsets": [{"rowcount": 1, "headers": ["ss_total_edits"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}, {"rowcount": 792, "headers": ["userid", "name", "editcount", "admin", "bot"]}]}
null
980501 owp1 All orphan articles
null
USE fawiki_p; SELECT concat('# [[',p1.page_title,']]') FROM page AS p1 WHERE p1.page_is_redirect = 0 AND p1.page_namespace = 0 # not a DAB page AND p1.page_id NOT IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'disambiguation' ) # not receiving direct link AND NOT ( p1.page_title IN ( SELECT pl1....
{"runningtime": "142.68", "resultsets": [{"rowcount": 613, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_page_id"]}]}
null
Wikimedia Commons media with Czech description needing categories
null
SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page...
{"connection_id": 62779531}
null
মোট সম্পাদনার সংখ্যা
০২-০৯-২০১৮
USE bnwiki_p; SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",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...
{"runningtime": "0.29", "resultsets": [{"rowcount": 27, "headers": ["tl_title"]}]}
null