title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Category:AfC G13 eligible soon submissions clone
null
SELECT DISTINCT page_namespace, page_title, rev_timestamp, page_latest FROM page JOIN revision ON rev_id = page_latest JOIN templatelinks ON tl_from = page_id WHERE page_namespace IN (2, 118) AND tl_title = "AfC_submission" AND tl_namespace = 10 AND page_is_redirect = 0 AND rev_timestamp < (DATE_FORMAT((NOW() - INTER...
{"runningtime": "0.29", "resultsets": [{"rowcount": 151, "headers": ["page_title"]}]}
enwiki
Commons files with Google Maps links but not coordinates
null
SELECT DISTINCT page.page_title, page.page_namespace, externallinks.el_to FROM page INNER JOIN externallinks ON externallinks.el_from = page.page_id INNER JOIN categorylinks ON categorylinks.cl_from = page.page_id WHERE (externallinks.el_to LIKE "http://maps.google.com%" OR externallinks.el_to LIKE "https://maps.google...
{"runningtime": "1.49", "resultsets": [{"rowcount": 625, "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"]}]}
commonswiki_p
قائمة المستخدمين الأكثر مراجعةً للتعديلات في يوم ويكيبيديا العربية السابع عشر
null
use arwiki_p; select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*) from logging INNER JOIN actor ON logging.log_actor = actor.actor_id LEFT JOIN page ON log_title = page_title where log_timestamp between 20210710000000 and 20210711000000 and log_action = "approve" and log_namespace = 0 and page_is_redire...
{"runningtime": "16.30", "resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 10000}]}
arwiki_p
Count of mainspace pages that have a given number of redirects from mainspace pages
English Wikipedia
select count(*) as pages, redirect_counts.count as `redirect count` from ( select count(rd_from) as count from redirect right join page on page_id = rd_from where rd_namespace = 0 and page_namespace = 0 group by rd_namespace, rd_title ) redirect_counts g...
{"runningtime": "1.22", "resultsets": [{"rowcount": 247, "headers": ["CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), ']]')", "actor_name"]}]}
enwiktionary_p
Redirects of Template:R from alternative language
null
select page_title from redirect join page on page_id = rd_from where rd_namespace = 10 and rd_title = "R_from_alternative_language";
{"runningtime": "0.07", "resultsets": [{"headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id"], "rowcount": 5}]}
enwiki_p
Redirect count leaderboard for English Wiktionary
Pages on English Wiktionary with a fair number of redirects.
-- 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, '...
{"runningtime": "0.29", "resultsets": [{"rowcount": 100, "headers": ["SUBSTRING(rev_timestamp, 0, 1)"]}]}
enwiktionary_p
Global locks in last year by user
null
select actor_name as blocker, count(*) as blockings from logging join actor on actor_id = log_actor where log_type = 'globalauth' and log_action = 'setstatus' and log_timestamp >= date_add(now(), interval -1 year) group by log_actor order by blockings desc;
{"runningtime": "0.29", "resultsets": [{"rowcount": 100, "headers": ["x"]}]}
metawiki_p
Mainspace redirect count leaderboard
Mainspace pages on English Wikipedia with a ridiculous number of redirects.
select replace(`redirect title`, '_', ' ') as `redirect target`, `count` as `redirect count` from ( select count(rd_from) as `count`, rd_title as `redirect title` from redirect where rd_namespace = 0 group by rd_title ) redirect_counts where `count` >= 200 order by ...
{"runningtime": "1.70", "resultsets": [{"rowcount": 1, "headers": ["SUBSTRING(rev_timestamp FROM 0 FOR 6)"]}]}
enwiki_p
30日以内に編集した巻き戻し者
null
-- 直近30日の編集 (アカウント・日付別) /* まあまあ時間がかかるのでコメントアウト SELECT U.user_name as `user`, LEFT(RC.rc_timestamp, 8) as `day`, count(*) as `contrib` FROM `recentchanges` as RC, `actor` as A, `user_groups` as UG, `user` as U WHERE TRUE and UG.ug_group = 'rollbacker' and ( -- RC.timestampをDATE型に変換しつつ、直近30日でフィルタ date_format(str_to_d...
{"runningtime": "41.86", "resultsets": [{"rowcount": 220, "headers": ["eu_row_id", "eu_entity_id", "eu_aspect", "eu_page_id", "page_id", "page_latest", "ar_namespace", "ar_title", "last_entry"]}]}
jawiki_p
jawp: Semi-Braceによる新規作成記事
null
use jawiki_p; SELECT * FROM actor as A WHERE A.actor_name = "Semi-Brace"; SELECT DISTINCT P.page_title from revision_userindex as R, actor as A, page as P, change_tag as CT, change_tag_def as CTD WHERE 1 = 1 and A.actor_name = "Semi-Brace" and R.rev_parent_id = 0 and P.page_namespace = 0 and P.page_is_redirect = 0 and...
{"connection_id": 18377530}
jawiki_p
Potentially missing categories
null
SELECT CONCAT('Category:', cat_title) FROM category WHERE cat_title LIKE 'Media_missing_permission_as_of_%' OR cat_title LIKE 'Media_without_a_license_as_of_%' OR cat_title LIKE 'Media_without_a_source_as_of_%'
{"runningtime": "0.23", "resultsets": [{"rowcount": 2, "headers": ["page_title"]}, {"rowcount": 50, "headers": ["page_title"]}]}
commonswiki_p
IA uploads by Fæ
This count based purely on filename and uploader, a handy guide to size of the total size uploads.
USE commonswiki_p; SELECT COUNT(img_name) AS Count, ROUND(SUM(img_size/(1<<30))) AS Size_GB, img_media_type AS Type FROM image JOIN actor_image ON actor_id = img_actor WHERE actor_name = "Fæ" AND img_name LIKE "%(IA%" AND img_timestamp > 20200501000000 GROUP BY Type;
{"runningtime": "0.08", "resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 10}]}
commonswiki_p
Wikidata - English descriptions starting with "a .."
null
USE ptwiki_p; SELECT SUBSTR(log_timestamp, 1, 8) DAY, SUM((log_type, log_action) = ('newusers', 'create')) ACCUNTS_CREATED, SUM((log_type, log_action) = ('block', 'block')) BLOCKS, SUM((log_type, log_action) = ('block', 'block') AND log_title NOT RLIKE '^(\\d+\\.\\d+\\.|[0-9a-fA-F]+:[0-9a-fA-F]+)') REGISTERED_USERS...
{"runningtime": "0.09", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]}
ptwiki_p
Wikidata - English descriptions starting with "a .."
null
USE ptwiki_p; SELECT SUBSTR(log_timestamp, 1, 8) DAY, SUM((log_type, log_action) = ('newusers', 'create')) ACCUNTS_CREATED, SUM((log_type, log_action) = ('block', 'block')) BLOCKS, SUM((log_type, log_action) = ('block', 'block') AND log_title NOT RLIKE '^(\\d+\\.\\d+\\.|[0-9a-fA-F]+:[0-9a-fA-F]+)') REGISTERED_USERS...
{"runningtime": "0.14", "resultsets": [{"headers": ["page_title"], "rowcount": 0}]}
ptwiki_p
%(%)%
null
USE dewiki_p; SELECT COUNT(*) as cnt, CONCAT('[[', REPLACE(pl_title, '_', ' '), ']]') as title FROM pagelinks LEFT JOIN page ON pl_title = page_title AND pl_namespace = page_namespace WHERE page_id IS NULL AND pl_namespace = 0 AND pl_from_namespace = 0 AND (pl_title LIKE "%(%)%") GROUP BY title ORDER BY c...
{"runningtime": "1.50", "resultsets": [{"rowcount": 1, "headers": ["count(distinct page_id)"]}]}
dewiki_p
nds_nlwiki Links to disambiguation pages
null
SELECT page_namespace, page_title, COUNT(pl_from) AS 'count' FROM (( # direct links from non-redirects to disambiguation pages SELECT dp.page_namespace, dp.page_title, pl_from FROM page fp, pagelinks, page dp, page_props WHERE fp.page_id=pl_from AND fp.page_is_redirect=0 AND pl_namespace=dp.p...
{"runningtime": "16.47", "resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "rev_timestamp"], "rowcount": 2}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_ti...
nds_nlwiki
Draft space article by number of editors/revisions
draft space by number of editors
SELECT page_title, rev_page AS page_id, count(*) AS revisions, count(distinct rev_actor) AS editors, sum(rev_len) AS size FROM revision INNER JOIN page ON page_id = rev_page INNER JOIN actor ON actor_id = rev_actor WHERE rev_page IN ( SELECT rev_page FR...
{"runningtime": "0.12", "resultsets": [{"rowcount": 16, "headers": ["page_title", "linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]}
enwiki
List of articles in Telugu Wikipedia with Less than 5048 and more than Atub 2028
null
use tewiki_p; select page_title, page_len from page where page_len > '0' and page_len < '500' and page_namespace = 0 and page_is_redirect = 0;
{"runningtime": "0.10", "resultsets": [{"rowcount": 4, "headers": ["actor_name", "countt"]}]}
tewiki_p
zhwp: deleted revisions
null
SELECT * FROM revision WHERE rev_deleted != 0 ORDER BY rev_timestamp DESC LIMIT 100
{"runningtime": "105.73", "resultsets": [{"rowcount": 366, "headers": ["actor_name", "countt"]}]}
zhwiki_p
Pdd existantes de modèles inexistants
Fonctionnel au 5/8/2020 (sauf exclusion de '%/À faire%' non reconnue)
SELECT CONCAT("\[\[Modèle:", REPLACE(page_pdd.page_title, '_', ' '), "\]\]") AS modele, CONCAT("{{a-redir-simple|Discussion modèle:", REPLACE(page_pdd.page_title, '_', ' '), "}}") AS pdd FROM (SELECT page_title FROM page WHERE page_namespace = 10) AS page_modele RIGHT JOIN (SELECT page_title FROM...
{"runningtime": "1.44", "resultsets": [{"rowcount": 1, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
frwiki
wikidata: most recent interface-admin activity
Letzte Aktion der Oberflächenadmins
SELECT user_name, page_title, page_namespace, rev_timestamp FROM user, user_groups, actor LEFT JOIN revision INNER JOIN page ON rev_page = page_id ON rev_id = ( SELECT MAX(maxR.rev_id) FROM revision_userin...
{"resultsets": [{"rowcount": 50, "headers": ["sender", "receiver", "thank_timestamp"]}], "runningtime": "5.50"}
wikidatawiki_p
Top 100 Tagalog Wikipedia editors of all time by number of edits
This query generates the top 100 editors in the Tagalog Wikipedia of all time by their edit count. This list excludes bots and includes both active and inactive users.
SET @row_number = 0; SELECT (@row_number:=@row_number + 1) AS rank, user_id, user_name, user_editcount FROM user WHERE user_editcount > 0 AND (user_name NOT IN (SELECT user_name FROM user JOIN user_groups ON use...
{"runningtime": "0.46", "resultsets": [{"rowcount": 37, "headers": ["page_title", "cl_to"]}]}
tlwiki_p
IPBE
null
select user_id, user_name, user_editcount from user_former_groups join user on user_former_groups.ufg_user = user.user_id where ufg_group = "ipblock-exempt" and user_editcount >= 50 order by user_editcount desc;
{"resultsets": [{"headers": ["actor_name", "actor_user", "Edit_count", "Gross_byte_count", "nett_byte_count"], "rowcount": 100}], "runningtime": "43.69"}
zhwiki_p
Scrape Wikidata Item IDs from {{Artwork}} templates
null
use commonswiki_p; SELECT concat("M",page_id) AS MID, 'P6243', REPLACE(el_to,'https://reasonator.toolforge.org/test/?q=','') AS QID, CONCAT("File:",page_title) FROM page JOIN externallinks ON page_id=el_from AND el_to LIKE 'https://reasonator.toolforge.org%' JOIN categorylinks ON page_id=cl_from AND cl_to='Paintings...
{"resultsets": [{"headers": ["date", "pagename"], "rowcount": 5}], "runningtime": "0.15"}
commonswiki_p
Non-empty categories marked as redirect with template on huwiki
null
# cl_to: Stores the name (excluding namespace prefix) of the desired category. Spaces are replaced by underscores (_) USE huwiki_p; SELECT distinct CONCAT('[https://hu.wikipedia.org/w/index.php?title=Kategória:',cat_title,'&redirect=no ',cat_title,']') AS cat_title, cat_id, page_id FROM category inner join page on page...
{"resultsets": [{"headers": ["log_namespace", "log_action", "COUNT(*)"], "rowcount": 1}], "runningtime": "4.27"}
huwiki_p
Contributions search by edit summary, date
null
SELECT CONCAT('[[Special:Diff/', r1.rev_id, ']]') AS diff, r1.rev_len-r2.rev_len AS delta, r1.rev_timestamp, CONCAT('[[{{ns:', page_namespace, '}}:', page_title, ']]') AS pagename, comment_text FROM revision_userindex r1 JOIN actor_revision ON actor_id = r1.rev_actor LEFT JOIN page O...
{"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": 5}], "runningtime": "5.32"}
enwiki
Organizations_by_country_and_subject
null
use enwiki_p; select CONCAT('Category:', cl_to) as category_name, count(*) as fawiki_counterparts from ( select cl_to from categorylinks join page on page_id = cl_from join langlinks on ll_from = cl_from and ll_lang = 'fa' where cl_to in ( select page_title from categorylinks join ...
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 5}], "runningtime": "0.07"}
enwiki_p
Recent warnings to extended confirmed users from RedWarn users
A list of warnings issued by RedWarn users to extended confirmed users onwiki.
SELECT `rc_this_oldid` AS "Diff", `actor_name` AS "Perfomer", IF((SELECT COUNT(*) FROM `user_groups` AS pxc WHERE pxc.`ug_user` = `actor_user` AND pxc.`ug_group` = "extendedconfirmed"), "Y", "") AS "P XC?", `user_name` AS "Target", `comment_text` AS "Comment", IF((SELECT COUNT(*) FROM `change_tag` rv ...
{"resultsets": [{"headers": ["log_type", "AAAAMMDD", "TotalDia"], "rowcount": 365}], "runningtime": "10.32"}
enwiki_p
Malayalam labels contains zwj character
Malayalam labels contains Zero-width joiner character
USE wikidatawiki_p; SELECT wbit_item_id, wbx_text FROM wbt_item_terms JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id JOIN wbt_type ON wbtl_type_id = wby_id JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id JOIN wbt_text ON wbxl_text_id = wbx_id LEFT JOIN enwiki_p.wbc_entity_usage ON eu_en...
{"resultsets": [{"headers": ["rank", "IFNULL(actor_name, '\u0412\u0441\u044c\u043e\u0433\u043e')", "created", "total_len", "articles"], "rowcount": 35}], "runningtime": "0.11"}
wikidatawiki_p
wikidata: deleted items that were created by User:MisterSynergy
null
USE wikidatawiki_p; SELECT archive.ar_title AS item, archive.ar_timestamp AS item_creation_timestamp FROM archive JOIN actor_archive ON archive.ar_actor=actor_archive.actor_id WHERE archive.ar_namespace=0 AND archive.ar_parent_id=0 AND actor_archive.actor_name='Jklamo' ORDER BY archive.ar_timestamp AS...
{"resultsets": [{"headers": ["CONCAT('# [[', page_title, ']] (', COUNT(*), ')')"], "rowcount": 271}], "runningtime": "3.02"}
wikidatawiki
enwiki:Translating "year in science" and "century in science" article titles in List of years in science to Turkish
null
USE enwiki_p; SELECT CONCAT("#[[",(CASE WHEN SUBSTRING(pl_title,3)="00s_in_science_and_technology" THEN REPLACE(pl_title,"s_in_science_and_technology","'lerde bilim ve teknoloji") WHEN SUBSTRING(pl_title,3)="20s_in_science_and_technology" THEN REPLACE(pl_title,"s_in_science_and_technology","'lerde bilim ve teknolo...
{"resultsets": [{"headers": ["$user", "$VE_edits"], "rowcount": 1}], "runningtime": "0.07"}
enwiki_p
Empty redirect categories on huwiki
null
# cl_to: Stores the name (excluding namespace prefix) of the desired category. Spaces are replaced by underscores (_) USE huwiki_p; SELECT distinct CONCAT('[https://hu.wikipedia.org/w/index.php?title=Kategória:',page_title,'&redirect=no ',page_title,']') AS page_title, CONCAT('[[:Kategória:',rd_title,']]') AS rd_title ...
{"resultsets": [{"headers": ["page_title", "pl_title"], "rowcount": 614}], "runningtime": "4.03"}
huwiki_p
Lonely Content Translations in Wikidata (arwiki)
null
use arwiki_p; select concat("[[",page_title,"]]") AS "المقالة", CONCAT("[[:d:",pp_value,"]]") AS "عنصر ويكي بيانات", REPLACE(comment_text, 'أُنشئَت بترجمة الصفحة' , '' ) AS "المقالة المُترجمة" from revision inner join comment on comment_id = rev_comment_id inner join page on page_id = rev_page LEFT JOIN langlinks ...
{"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.25"}
arwiki
صفحات فارغة في ويكيبيديا العربية - حجمها يساوي صفر
null
use arwiki_p; select page_title, page_namespace from page where page_len = 0 limit 500;
{"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", "ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_a...
arwiki_p
مستخدمون لديهم صلاحيتي مراجع تلقائي ومحرر في نفس الوقت
null
use arwiki_p; SELECT user_name FROM user where user_id in (select ug_user from user_groups where ug_group = "editor" and ug_user = user_id) and user_id in (select ug_user from user_groups where ug_group = "autoreview" and ug_user = user_id) limit 50;
{"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 0}], "runningtime": "0.05"}
arwiki_p
صفحات مستخدمين منشأة لحسابات غير مسجلة
null
use arwiki_p; select page_title from page where page_namespace = 2 and page_is_redirect = 0 and page_title not like "%/%" and page_title not in (select replace(user_name, " ", "_") from user where replace(user_name, " ", "_") = page_title) limit 5;
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 0}], "runningtime": "0.05"}
arwiki_p
Qualified pages with many incoming links
This query lists titles with 100+ incoming links which might be expected to be in italics or quotes and do not have a dab at the base name, e.g. Abraham_Lincoln_(1930_film). Links to the page at the base name which are in italics or quotes may be intended for the qualified name. To reduce run time, it checks one initi...
SET STATEMENT max_statement_time = 1000 FOR SELECT pl_title, rd_title, COUNT(*) FROM pagelinks JOIN page P ON page_namespace = 0 AND page_title = SUBSTRING_INDEX(pl_title,"_(",1) AND pl_from_namespace = 0 LEFT JOIN categorylinks ON cl_from = P.page_id AND cl_type = "page" AND cl_to = "All_disambiguation_pages" LEFT JOI...
{"resultsets": [{"headers": ["Page title", "Namespace", "Redirect?"], "rowcount": 511}], "runningtime": "0.74"}
enwiki_p
Beispiel Protokoll-relative Links
null
SELECT el_id , el_index FROM externallinks, page Where el_from=page_id AND page_title='.NET_Framework' AND page_namespace=0;
{"resultsets": [{"headers": ["user_id", "page_id", "categories"], "rowcount": 10}], "runningtime": "8.96"}
dewiki_p
SIRIS links
null
SELECT DISTINCT page.page_title, externallinks.el_to, page_props.pp_value FROM externallinks INNER JOIN page ON externallinks.el_from = page.page_id INNER JOIN page_props ON page.page_id = page_props.pp_page WHERE (externallinks.el_to LIKE "https://siris-artinventories.si.edu%" OR externallinks.el_to LIKE "http:...
{"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "2.99"}
enwiki_p
Pagine in Categoria:Persone viventi senza template Bio
null
SELECT page_title FROM page, categorylinks WHERE page_id = cl_from AND page_namespace = 0 AND cl_to = 'Persone_viventi' AND page_id NOT IN (SELECT tl_from FROM templatelinks WHERE tl_target_id IN (SELECT lt_id FROM linktarget WHERE lt_namespace = 10 AND lt_title IN ('Bio')));
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_latest", "rt_type", "Oldest"], "rowcount": 34}], "runningtime": "1.61"}
itwiki_p
مستخدمون لديهم صلاحيتي مراجع تلقائي ومحرر في نفس الوقت
null
use arwiki_p; SELECT user_name FROM user where user_id in (select ug_user from user_groups where ug_group = "editor" and ug_user = user_id) and user_id in (select ug_user from user_groups where ug_group = "autoreview" and ug_user = user_id) limit 50;
{"resultsets": [{"headers": ["page_title"], "rowcount": 5}], "runningtime": "0.32"}
ar_wiki
Pdd de modèles existantes alors que le modèle est une redirection sur WP:FR
Testé et validé le 5/10/2020.
SELECT CONCAT("{{a-redir-simple|Modèle:", REPLACE(page_article.page_title, '_', ' '), "}}") AS article, CONCAT("\[\[Discussion modèle:", REPLACE(page_pdd.page_title, '_', ' '), "\]\]") AS pdd FROM (SELECT page_title FROM page WHERE page_namespace = 11 and page_is_redirect = 0) AS page_pdd INNER JOIN ...
{"resultsets": [{"headers": ["date", "reviews", "accepts", "declines", "rejects", "accept %", "decline %", "reject %"], "rowcount": 31}], "runningtime": "22.60"}
frwiki
Redirection de page de documentation de modèle sur WP:FR
Redirection de page de documentation de modèle sur WP:FR
SELECT CONCAT("{{Noredirect|Modèle:", page_title, "}}") AS sortie FROM page WHERE page_namespace = 10 AND page_title LIKE "%/Documentation%" AND page_is_redirect = 1 ORDER BY page_title /* trier par ordre alhabetique */
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 104}], "runningtime": "11.94"}
frwiki
ukwiki users who still edit by registration year (without bots)
null
use ukwiki_p; select count(user_name) as users25, count(case when user_editcount >= 50 then 1 else null end) as users50, count(case when user_editcount >= 100 then 1 else null end) as users100, count(case when user_editcount >= 500 then 1 else null end) as users500, count(case when user_editcount >= 1000 then 1 else n...
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 0}], "runningtime": "60.62"}
ukwiki_p
ukwiki users by registration year (without bots)
null
use ukwiki_p; select count(user_name) as users25, count(case when user_editcount >= 50 then 1 else null end) as users50, count(case when user_editcount >= 100 then 1 else null end) as users100, count(case when user_editcount >= 500 then 1 else null end) as users500, count(case when user_editcount >= 1000 then 1 else n...
{"resultsets": [{"headers": ["url", "pagename", "page_id", "reason"], "rowcount": 0}], "runningtime": "37.89"}
ukwiki_p
összes link
null
select count(*) from pagelinks;
{"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 5}], "runningtime": "0.09"}
huwiki_p
Benutzer aus Hamburg - Details
Benutzer aus Hamburg - Details
Select user.user_id, user.user_name, user.user_email, user.user_touched, left(user.user_registration,6) as reg_year_month, user.user_editcount, categorylinks.cl_sortkey_prefix From user join categorylinks on user.user_name = categorylinks.cl_sortkey_prefix where categorylinks.cl_to = 'Benutzer:aus_Hamburg' ;
{"resultsets": [{"headers": ["COUNT(*)", "title", "cl_from", "cl_to", "cl_sortkey"], "rowcount": 1}], "runningtime": "0.08"}
dewiki
খণ্ড ত যুক্ত নিবন্ধ
For [[WP:VPT#articles with curly quotes in title]] circa 3 July 2020.
SELECT page_title FROM page WHERE page_namespace = 0 -- article namespace only AND page_is_redirect = 0 -- non-redirects AND page_title RLIKE "হুগলী";
{"resultsets": [{"headers": ["page_title"], "rowcount": 337}], "runningtime": "0.61"}
bnwiki
Template count in ruwiki
null
select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"resultsets": [{"headers": ["img_name"], "rowcount": 0}], "runningtime": "0.05"}
ruwiki_p
Template count in dewiki
null
select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"resultsets": [{"headers": ["img_name"], "rowcount": 1}], "runningtime": "0.06"}
dewiki_p
Template count in enwiki
null
select count(page_id) from page where page_namespace = 10 and -- Template page_is_redirect <> 1; -- Don't count redirects
{"resultsets": [{"headers": ["img_name"], "rowcount": 1}], "runningtime": "0.07"}
enwiki_p
Files on lb.wiki NOT in spec categories (no license)
null
#USE lbwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file FROM image JOIN page ON page_namespace=6 AND page_title = img_name AND page_is_redirect=0 AND NOT EXISTS( SELECT * FROM categorylinks WHERE page_id=cl_from AND (cl_to="All_fräi_Medien" OR cl_to= "All_net_fräi_Medien" )) ORDER BY img_name ASC
{"resultsets": [{"headers": ["user_name", "cohort"], "rowcount": 2}], "runningtime": "0.10"}
lbwiki_p
File pages without files and links
null
use arwiki_p; select DISTINCT concat ("ملف:",page_title) from page where page_namespace = 6 and not page.page_title in (select img_name from image) And Not page.page_title in (select il_to from imagelinks) And Not page.page_id in (select tl_from from templatelinks where tl_title = 'استعمال_مقيد') And Not page.page_id ...
{"resultsets": [{"headers": ["log_id", "log_timestamp", "log_title", "log_params", "comment_text"], "rowcount": 478}], "runningtime": "105.48"}
arwiki_p
Taxonomy templates linking to non-taxon homonyms
null
SELECT Pt.page_title as Template, Pa.page_title AS Article FROM page Pt /* Template:Foo */ JOIN pagelinks ON pl_from = Pt.page_id AND pl_title = SUBSTRING(Pt.page_title,10) AND pl_namespace = 0 /* Template:Taxonomy/Foo has a wikilink to [[Foo]] */ JOIN page Pa ON Pa.page_title = pl_title AND Pa.page_namespace = 0 /* ar...
{"resultsets": [{"headers": ["CONCAT(\"# [[\",p.page_title,\"]]\")", "page_len"], "rowcount": 0}], "runningtime": "0.04"}
enwiki_p
Annexes non catégorisées du Wiktionnaire francophone
null
SELECT page_title FROM page WHERE page_is_redirect = 0 AND page_namespace = 100 AND page_title NOT LIKE "Conjugaison%" AND page_id NOT IN ( SELECT distinct(cl_from) FROM categorylinks );
{"resultsets": [{"headers": ["page_namespace", "page_title", "count(cl.cl_to)", "tl_title"], "rowcount": 100}], "runningtime": "0.94"}
frwiktionary_p
Pages that don't have Arabic label at Wikidata (2020)
করতে হবে
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id), "Lar", CONCAT('"',ips_site_page,'"') FROM wb_items_per_site WHERE ips_site_id='arwiki' AND NOT EXISTS ( SELECT wbit_item_id FROM wbt_item_terms INNER JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id INNER JOIN wbt_text_in_lang ON wbxl_id = wbtl_...
{"resultsets": [{"headers": ["concat ('*[[',page_title,']]')"], "rowcount": 0}], "runningtime": "1.55"}
wikidatawiki
Scrape OTRS from files in Files_with_PermissionOTRS_template_but_without_P6305_SDC_statement
Scrape OTRS without relying on "Category:Files_with_PermissionOTRS_template_but_without_P6305_SDC_statement"
use commonswiki_p; SELECT concat("M",page_id) AS MID, "P6305", concat('"',REPLACE(el_to,'https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=',''),'"') AS OTRS, count(el_to) as num FROM page JOIN categorylinks c1 ON page_id=c1.cl_from AND c1.cl_to='Files_with_PermissionTicket_template_bu...
{"resultsets": [{"headers": ["Title", "user", "comment"], "rowcount": 147}], "runningtime": "0.26"}
commonswiki
مقالات مترجمة بواسطة أداة ترجمة المحتوى، وغير مرتبطة بوصلة لغات
null
select distinct page_title from change_tag inner join change_tag_def on ct_tag_id = ctd_id inner join revision on rev_id = ct_rev_id inner join page on page_id = rev_page where page_namespace = 0 and page_is_redirect = 0 and (ctd_name like "contenttranslation-v2" or ctd_name like "contenttranslation") and (pa...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "1.32"}
arwiki_p
Number of links to WP:THREE
null
select count(*) from pagelinks where pl_namespace = 4 and pl_title = 'THREE';
{"resultsets": [{"headers": ["comment_text"], "rowcount": 111099}], "runningtime": "88.80"}
enwiki_p
Categories with elements from namespace 2
null
SELECT distinct concat( 'Kategória:', cl_to, '' ) FROM categorylinks INNER JOIN page ON cl_from = page_id WHERE page_namespace = 2 # user namespace
{"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 15}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 7}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 6}], "runningtime": "0.15"}
huwiki_p
Wikidata Qids by category on plwiki (articles only)
null
USE frwiki_p; SELECT pp_value, page_title, page_namespace FROM page LEFT JOIN page_props ON pp_page = page_id LEFT JOIN categorylinks ON cl_from = page_id WHERE cl_to = "Article utilisant l'infobox Méthode scientifique" AND pp_propname = "wikibase_item" AND page_namespace = 0;
{"resultsets": [{"headers": ["AAAA", "Total"], "rowcount": 9}], "runningtime": "8.47"}
frwiki_p
catSuggest: Most active users
null
select actor_name, count(actor_name) c from revision join page on page_id = rev_page join comment on rev_comment_id = comment_id join actor on rev_actor = actor_id where comment_text like "catSuggest-ով%" and rev_timestamp > 20200701000000 group by actor_name order by c desc
{"resultsets": [{"headers": ["user_talk"], "rowcount": 1986}], "runningtime": "641.11"}
hywiki_p
zhwiki covid-19 page revisions
null
SELECT rev_id, comment_text, actor_name, rev_len, rev_timestamp FROM revision JOIN actor ON rev_actor = actor_id JOIN comment ON rev_comment_id = comment_id WHERE rev_page = 6861061;
{"resultsets": [{"headers": ["page_title", "defaultsort"], "rowcount": 868}], "runningtime": "1.22"}
zhwiki_p
nds_nlwiki Use of redirect categorylinks
null
/* Note: we have to use AS because Quarry cannot handle columns with the same name. */ SELECT pf.page_namespace AS from_ns, pf.page_title AS from_title, pt.page_title AS to_title FROM page pf, page pt, categorylinks WHERE pt.page_namespace=14 AND pt.page_is_redirect=1 AND cl_to=pt.page_title AND cl_from=pf.page_id;
{"resultsets": [{"headers": ["Username", "cnt"], "rowcount": 80}], "runningtime": "14.68"}
nds_nlwiki
nlwiki Unused categories without nomination
null
SELECT CONCAT('Categorie:', CONVERT(REPLACE(cat_title,'_',' ') USING utf8mb4)) AS categorie, page_is_redirect AS rd, rev_timestamp AS created FROM category, page, revision WHERE cat_pages=0 AND cat_subcats=0 AND cat_files=0 AND cat_title NOT REGEXP '^Wikipedia:Gebruikers/' AND page_namespace=14 AND cat_...
{"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 100}], "runningtime": "0.16"}
nlwiki
Short Commons categories with Wikipedia links but no sitelink
Intended behavior: find short (<200 byte) Commons categories with interwiki links but no templates
SELECT page.page_title, iwlinks.iwl_prefix, iwlinks.iwl_title FROM page JOIN iwlinks ON iwlinks.iwl_from = page.page_id WHERE page.page_namespace = 14 AND page.page_title LIKE 'E%' AND page.page_len < 200 AND page.page_id NOT IN (SELECT tl_from FROM templatelinks)
{"resultsets": [{"headers": ["creation_date", "extension_name", "page_creator"], "rowcount": 174}], "runningtime": "0.36"}
commonswiki_p
nlwiki Biggest categories
null
SELECT cat_title AS `cat`, (cat_pages-cat_subcats-cat_files) AS `pages`, cat_subcats AS `subcats`, cat_files AS `files`, cat_pages AS `total` FROM category WHERE cat_title NOT REGEXP '^(Wikipedia:|[A-Z][a-z]+_uit_het_[ANOP][a-zë]+_gebied|Diersoort_beschreven_in_[1-9][0-9]+|IUCN-status_)' ORDER BY `pages` DESC LIM...
{"resultsets": [{"headers": ["db", "count(*)", "sum(img_size)"], "rowcount": 6}], "runningtime": "0.40"}
nlwiki
Files on lv.wiki NOT in spec categories
null
#USE lvwiki_p; SELECT CONCAT("# [[:File:", img_name, "]]") AS file FROM image JOIN page ON page_namespace=6 AND page_title = img_name AND page_is_redirect=0 AND NOT EXISTS( SELECT * FROM categorylinks WHERE page_id=cl_from AND (cl_to="All_free_media" OR cl_to= "All_non-free_media")) ORDER BY img_name ASC
{"resultsets": [{"headers": ["tl_from", "tl_from_namespace", "tl_target_id", "lt_id", "lt_namespace", "lt_title"], "rowcount": 10}], "runningtime": "0.07"}
lvwiki_p
Images without use at ptwiki
Search for images without links with other pages
SELECT img_name AS "Image" FROM image, imagelinks WHERE NOT EXISTS (SELECT * FROM imagelinks WHERE image.img_name = imagelinks.il_to) ORDER BY img_name ASC;
{"resultsets": [{"headers": ["URL"], "rowcount": 0}], "runningtime": "49.88"}
ptwiki_p
Non-empty redirect categories on huwiki
null
# cl_to: Stores the name (excluding namespace prefix) of the desired category. Spaces are replaced by underscores (_) USE huwiki_p; SELECT distinct CONCAT('[https://hu.wikipedia.org/w/index.php?title=Kategória:',page_title,'&redirect=no ',page_title,']') AS page_title, CONCAT('[[:Kategória:',rd_title,']]') AS rd_title ...
{"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %", "Blocked"], "rowcount": 105}], "runningtime": "20.56"}
huwiki_p
nlwiki Atypical displaytitle usage
null
SELECT page_namespace, page_title, pp_value AS displaytitle FROM page, page_props WHERE page_namespace=0 AND page_id=pp_page AND pp_propname='displaytitle' AND /*pp_value=CONVERT(REPLACE(page_title,'_',' ') USING utf8mb4) OR */ ( NOT (pp_value REGEXP '\\<i\\>' AND pp_value REGEXP '\\</i\\>' AND LE...
{"resultsets": [{"headers": ["user_talk"], "rowcount": 354}], "runningtime": "266.49"}
nlwiki
zhwiki: Show tables
null
SHOW TABLES;
{"resultsets": [{"headers": ["page_title"], "rowcount": 647}], "runningtime": "51.43"}
zhwiki_p
Unsupported titles redirecting to supported titles and vice-versa
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": ["log_title", "COUNT(log_id)"], "rowcount": 41649}], "runningtime": "35.68"}
enwiktionary_p
zhwp: Templates need lower protection level
null
SELECT page_namespace, page_title, COUNT(*) AS cnt FROM page JOIN templatelinks ON page_title = tl_title AND page_namespace = tl_namespace LEFT JOIN page_restrictions ON pr_page = page_id AND pr_type = 'edit' WHERE tl_namespace IN (10, 828) AND pr_level = 'sysop' ...
{"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 31}], "runningtime": "1.24"}
zhwiki_p
wikidata: search deletion log for text
null
SELECT * FROM logging JOIN comment_logging ON log_comment_id=comment_id WHERE log_type='delete' AND log_action='delete' AND comment_text LIKE '%Tama Easton%' ;
{"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 4716}], "runningtime": "29.09"}
wikidatawiki_p
Pages that don't have Malayalam label at Wikidata
null
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id), "Lml", CONCAT('"',ips_site_page,'"') FROM wb_items_per_site WHERE ips_site_id='mlwiki' AND NOT EXISTS ( SELECT wbit_item_id FROM wbt_item_terms INNER JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id INNER JOIN wbt_text_in_lang ON wbxl_id = wbtl_...
{"resultsets": [{"headers": ["(((SELECT COUNT(*) FROM flaggedpages INNER JOIN page ON page_id = fp_page_id WHERE page_namespace = 0)-(SELECT COUNT(*) FROM flaggedpage_pending INNER JOIN page ON page_id = fpp_page_id WHERE page_namespace = 0))/(SELECT COUNT(*) FROM page WHERE page_name"], "rowcount": 1}], "runningtime":...
wikidatawiki_p
Voci a cui potrebbe mancare il template Bio
null
SELECT page_title, rev_timestamp FROM page, revision WHERE page_id = rev_page AND rev_parent_id = 0 AND page_namespace = 0 AND page_is_redirect = 0 AND page_id NOT IN (SELECT DISTINCT cl_from FROM categorylinks, pagelinks WHERE cl_to = pl_title AND pl_namespace = 14 AND pl_from = 4195411) AND page_id I...
{"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 835}], "runningtime": "6.22"}
itwiki_p
Orphan talk pages
null
set @namespace = 828; select * from page where page_namespace=@namespace+1 and not exists (select 1 from page page2 where page2.page_namespace=@namespace and page2.page_title=page.page_title) and page_title not like "%/Archive_%" limit 10000;
{"connection_id": 162305180}
enwiki
nlwiki Self-referencing categories
Lists category information for category pages that have a category-link to itself. Excludes Noindex-category.
SELECT cat_title, cat_pages, cat_subcats, cat_files FROM categorylinks, page, category WHERE cl_to!='Wikipedia:Niet_te_indexeren_pagina\'s' AND cl_from=page_id AND page_namespace=14 AND cl_to=page_title AND cl_to=cat_title; # should be the same /*SELECT cl_to AS cat FROM categorylinks, page WHERE cl_to!='Wikipedia:Niet...
{"resultsets": [{"headers": ["Page Title", "Size (bytes)"], "rowcount": 0}], "runningtime": "0.04"}
nlwiki
Container categories with pages not in subcategories on huwiki
null
SELECT concat( '[[:Kategória:', cat_title, ']]' ) as cat_title, cat_pages - cat_subcats FROM huwiki_p.categorylinks INNER JOIN huwiki_p.page ON cl_from = page_id INNER JOIN huwiki_p.category on cat_title = page_title WHERE cl_to = 'Gyűjtőkategóriák' AND cl_type = 'subcat' AND cat_pages > cat_subcats ORDER BY (cat_pag...
{"resultsets": [{"headers": ["\u5206\u7c7b"], "rowcount": 841}], "runningtime": "1.02"}
huwiki
AfC review total counts, last month
NOT including deleted articles
select COUNT(rc_id) as "total", SUM(comment_text like "%Publishing accepted%") as "accept", SUM(comment_text like "Declining submission:%") as "decline", SUM(comment_text like "Rejecting submission:%") as "reject", concat(round(SUM(comment_text like "%Publishing accepted%") * 100 / count(rc_id)...
{"resultsets": [{"headers": ["linter_template", "pages_using_template", "total_errors"], "rowcount": 10}], "runningtime": "0.06"}
enwiki_p
AfC accepts/declines per submitter (7 days)
null
select count(rc_id) as reviews, rc_title, SUM(comment_text like "%accepted ([[WP:AFCH|AFCH]] 0.9.1)") as "accepted", concat(round(SUM(comment_text like "%accepted ([[WP:AFCH|AFCH]] 0.9.1)") * 100 / count(rc_id), 1), "%") as "accept %", SUM(comment_text like "%declined ([[WP:AFCH|AFCH]] 0.9.1)") as "d...
{"resultsets": [{"headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"], "rowcount": 100}], "runningtime": "2.55"}
enwiki_p
Stub articles created in January
null
use tewiki_p; #desc revision; #desc page; select p.page_title,r.rev_user_text,p.page_len from revision r, page p where r.rev_parent_id = 0 and r.rev_len < 2048 and p.page_len < 2048 and p.page_namespace = 0 and p.page_is_redirect = 0 and rev_timestamp < '20200800000000' and rev_timestamp > '2020090000000' and r.rev_pag...
{"runningtime": "8.93", "resultsets": [{"rowcount": 3094, "headers": ["base_id", "id", "page_title"]}]}
null
Fiwiki thanks in 2020
null
USE fiwiki_p; SELECT log_title, COUNT(log_id) as "thank_count" FROM logging_logindex WHERE log_type = "thanks" AND log_timestamp >= "20200000000000" GROUP BY log_title ORDER BY 2 DESC
{"runningtime": "0.33", "resultsets": [{"rowcount": 97, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}]}
null
Bad disambiguation page titles (eswiki)
Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki).
use eswiki_p; select page_title as main_title from (page join redirect on page_id = rd_from) where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
{"runningtime": "0.14", "resultsets": [{"rowcount": 3, "headers": ["category_name", "fawiki_counterparts"]}]}
null
Pages that don't have Malayalam label at Wikidata (2020)
null
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id), "Lml", CONCAT('"',ips_site_page,'"') FROM wb_items_per_site WHERE ips_site_id='mlwiki' AND NOT EXISTS ( SELECT wbit_item_id FROM wbt_item_terms INNER JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id INNER JOIN wbt_text_in_lang ON wbxl_id = wbtl_...
{"runningtime": "4.12", "resultsets": [{"rowcount": 49, "headers": ["user_name", "user_editcount", "user_registration", "Last edit", "user_groups"]}]}
null
Pages that don't have ml label at Wikidata
করতে হবে
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id) as qid,",", CONCAT('"',ips_site_page,'"') as Lml FROM wb_items_per_site WHERE ips_site_id='mlwiki' AND NOT EXISTS ( SELECT wbit_item_id FROM wbt_item_terms INNER JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id INNER JOIN wbt_text_in_lang ON wbxl...
{"runningtime": "86.22", "resultsets": [{"rowcount": 174, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null
Pages that don't have Ml label in Wikidata
null
USE wikidatawiki_p; SELECT CONCAT("Q",ips_item_id), CONCAT("Lml"), CONCAT('"',ips_site_page,'"') FROM wb_items_per_site WHERE ips_site_id='mlwiki' AND NOT EXISTS ( SELECT 1 FROM wb_terms WHERE CONCAT("Q", ips_item_id) = term_full_entity_id AND term_type = "label" AND term_language='Lml' LIMIT 1 ) LIMIT 10000 ;
{"runningtime": "19.92", "resultsets": [{"rowcount": 101, "headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"]}]}
null
Number of cswiki users in ranges of edit count
null
USE cswiki_p; SELECT COUNT(*) AS count, CASE INTERVAL(user_editcount, 1, 10, 100) WHEN 0 THEN '0' WHEN 1 THEN '1..9' WHEN 2 THEN '10..99' WHEN 3 THEN '100..' END AS category FROM user GROUP BY category
{"runningtime": "2.74", "resultsets": [{"rowcount": 1000, "headers": ["ar_title", "ar_timestamp"]}]}
null
Find most recent changes on Wikidata in Malayalam
Malayalam recent changes in Wikidata
USE wikidatawiki_p; SELECT rc_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 WHERE ( comment_text REGEXP 'wbsetdescription-(add|set|remove)...(ml)' OR comment_text...
{"runningtime": "0.44", "resultsets": [{"rowcount": 135, "headers": ["cl_to", "page_title"]}]}
null
All edits made by participants ONAM Label-a-thon 2020
(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...
{"runningtime": "7.14", "resultsets": [{"rowcount": 759, "headers": ["user_name"]}]}
null
WikiDaheim users 2020 (by first revision, by uploader)
null
USE commonswiki_p; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count FROM actor, revision, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image.img_name = page.page_title and revision.r...
{"runningtime": "17.69", "resultsets": [{"rowcount": 596, "headers": ["user_name"]}]}
null
Users by number of distinct non-redirect articles they have edited
null
use fawiki_p; select actor_name, count(distinct page_id) from page join revision_userindex on rev_page = page_id join actor_revision on rev_actor = actor_id where page_namespace = 0 and page_is_redirect = 0 and rev_actor not in ( select actor_id from actor join user_groups on ug_user = a...
{"runningtime": "26.59", "resultsets": [{"rowcount": 29, "headers": ["Date", "Comment", "Page"]}]}
null
Users by number of distinct non-redirect articles they have edited
null
use fawiki_p; select actor_name, count(distinct page_id) from page join revision_userindex on rev_page = page_id join actor_revision on rev_actor = actor_id where page_namespace = 0 and page_is_redirect = 0 and rev_actor not in ( select actor_id from actor join user_groups on ug_user = a...
{"runningtime": "0.12", "resultsets": [{"rowcount": 9, "headers": ["title", "categories"]}]}
null
Wikidata - tables - wb_property_info - describe table, sample data
null
use wikidatawiki_p; DESCRIBE wbc_entity_usage;
{"runningtime": "13.73", "resultsets": [{"rowcount": 4496, "headers": ["img_name", "actor_name", "img_timestamp"]}]}
null
My Commons DR comments
null
USE commonswiki_p; SELECT CONCAT( 'https://commons.wikimedia.org/wiki/Commons:', page_title ), comment_text, rev_timestamp FROM page INNER JOIN revision_userindex ON page_id = rev_page INNER JOIN comment on rev_comment_id = comment_id WHERE rev_actor = 7509449 # User:Mdaniels5757 AND page_name...
{"runningtime": "128.80", "resultsets": [{"rowcount": 1544, "headers": ["MID", "P6243", "QID", "CONCAT(\"File:\",page_title)"]}]}
null
tekrar çalıştırmak için fork
null
USE trwiki_p; SELECT NOW() as updated; SET @N = -731; SELECT CONCAT("[[User:",user_name,"|]]") as kullanici, last_edit as son_katki, user_editcount as katki_sayisi, DATEDIFF(NOW(), last_edit) as gun, ug_group as grup , replace(ufg_group,'editor', null) as eski_grup, round(DATEDIFF(NOW(), last_edit)/365.24,2) as yil ...
{"runningtime": "0.49", "resultsets": [{"rowcount": 14, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 7, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 5, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]}
null
Size of Wikimedia Commons uploads by SecretName101
This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects.
USE commonswiki_p; SELECT COUNT(img_name) AS Count, ROUND(SUM(img_size/(1<<30))) AS Size_GB FROM image JOIN actor_image ON actor_id = img_actor WHERE actor_name = "SecretName101";
{"runningtime": "1.02", "resultsets": [{"rowcount": 12, "headers": ["user", "edit_count"]}]}
null
Wikidata - Malayalam descriptions starting with "ഒരു.."
null
SELECT CURRENT_DATE; use wikidatawiki_p; SELECT CONCAT('Q', term_entity_id) As item, CONCAT('D', term_language) As tr, CONCAT('"', term_text, '"') As current_desc, LENGTH(term_text) as strl, term_entity_id from wb_terms WHERE term_entity_type = 'item' AND term_language = 'ml' AND term_type = 'des...
{"runningtime": "294.90", "resultsets": [{"rowcount": 15, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]}
null
Telugu Wikipedia editors exceeding 100 edits till specific date
Editors exceeding 100 edits before a date
use tewiki_p; select rev_actor, actor_name, count(rev_id) as edit_count from revision, actor where rev_timestamp < 20200701000000 and rev_actor = actor_id group by rev_actor having count(rev_id) >= 100 order by edit_count desc LIMIT 1000;
{"runningtime": "1.28", "resultsets": [{"rowcount": 109, "headers": ["Title", "user", "comment"]}]}
null