title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
List of wikidata tables in April 2021 | null | USE wikidatawiki_p;
SHOW TABLES; | {"runningtime": "1.32", "resultsets": [{"rowcount": 24, "headers": ["fns", "ft", "tns", "tt"]}]} | wikidatawiki_p |
ImageCount and Size | null | select count(*) c, actor_name
from revision
join actor on rev_actor = actor_id
where
actor_name = "Askeuhd"; | {"resultsets": [{"headers": ["CONCAT('# [[Template:', tl_title, ']] (', COUNT(*), ' collegamenti)')"], "rowcount": 0}], "runningtime": "0.05"} | commonswiki_p |
enwiki list of users with WP:DATED in their edit summaries | null | set @startdate:='2017-12-01 00:00:00';
set @enddate:= DATE_ADD(@startdate, INTERVAL 12 MONTH);/*'2020-03-01 00:00:00';*/
with c as (select comment_id from `comment` where comment_text like '%WP:DATED%'), rev as (SELECT rev_actor, rev_comment_id FROM revision JOIN page ON page_id = rev_page WHERE page_namespace = 0 AND ... | {"runningtime": "1475.18", "resultsets": [{"rowcount": 5, "headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"]}, {"rowcount": 71, "headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"]}, {"rowcount": ... | enwiki |
Return enwiki Comments where marked as Dated | null | set @startdate:='2020-12-01 00:00:00';
set @enddate:= DATE_ADD(@startdate, INTERVAL 12 MONTH);/*'2020-03-01 00:00:00';*/
with c as (select comment_id from `comment` where comment_text like '%say "current%'), rev as (SELECT rev_actor, rev_comment_id FROM revision JOIN page ON page_id = rev_page WHERE page_namespace = 0 ... | {"runningtime": "0.53", "resultsets": [{"rowcount": 30, "headers": ["regexp_substr(page_title, '.*_u_')", "count(*)"]}]} | enwiki |
Minor copyedit changes | Query to find recent minor copyedit-type changes | SELECT rev_id, rev_parent_id, comment_text, rev_timestamp FROM (SELECT * FROM revision ORDER BY rev_timestamp DESC LIMIT 1000000) AS revision
JOIN comment_revision ON revision.rev_comment_id = comment_revision.comment_id
JOIN page ON revision.rev_page = page.page_id
WHERE (comment_text LIKE "%grammar%" OR comment... | {"runningtime": "336.85", "resultsets": [{"rowcount": 0, "headers": ["actor_name", "rc_cur_id"]}]} | enwiki |
English Wikipedia proxy IP blocks | A list of all English Wikipedia proxy IP blocks. This started out as a joke on the Wikimedia Discord which suggested that schools block all IPs blocked by Wikipedia for being proxies in order to prevent VPN usage. | SELECT
ipb_address AS `IP`,
comment_text AS `Comment`
FROM ipblocks
JOIN comment_ipblocks ON ipb_reason_id = comment_id
WHERE comment_text LIKE "%proxy%"
ORDER BY `IP` ASC; | {"connection_id": 982613104} | enwiki_p |
enwiki list of users with WP:RELTIME in their edit summaries | null | set @startdate:='2020-12-01 00:00:00';
set @enddate:= DATE_ADD(@startdate, INTERVAL 12 MONTH);/*'2020-03-01 00:00:00';*/
with c as (select comment_id from `comment` where comment_text like '%WP:RELTIME%'), rev as (SELECT rev_actor, rev_comment_id FROM revision JOIN page ON page_id = rev_page WHERE page_namespace = 0 AN... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "2.07"} | enwiki |
enwiki list of users with WP:PEACOCK in their edit summaries | null | set @startdate:='2020-12-01 00:00:00';
set @enddate:= DATE_ADD(@startdate, INTERVAL 12 MONTH);/*'2020-03-01 00:00:00';*/
with c as (select comment_id from `comment` where comment_text like '%WP:PEACOCK%'), rev as (SELECT rev_actor, rev_comment_id FROM revision JOIN page ON page_id = rev_page WHERE page_namespace = 0 AN... | {"runningtime": "0.66", "resultsets": [{"rowcount": 0, "headers": ["page_title"]}]} | enwiki |
Name and Hash of Featured Images | null | SELECT img_name, Img_sha1
from image
INNER JOIN (SELECT page_title
FROM categorylinks
LEFT JOIN page
ON cl_from = page_id
WHERE cl_to LIKE 'Featured_pictures_on_Wikimedia_Commons'
AND page_namespace = 6) as qi ON qi.page_title=image.img_name
| {"runningtime": "48.12", "resultsets": [{"rowcount": 1825, "headers": ["page_title"]}]} | commonswiki |
Total Commons uploads by user | Well, kinda. "number of uploads where the upload is the current version of a file by user" is a bit more accurate. | SELECT actor_name, COUNT(*)
FROM image
JOIN actor_image ON img_actor = actor_id
GROUP BY img_actor
ORDER BY COUNT(*) DESC | {"runningtime": "156.17", "resultsets": [{"rowcount": 105944, "headers": ["user_name", "user_editcount"]}]} | commonswiki_p |
Total Commons uploads by user (with >500 edits) | Well, kinda. "number of uploads where the upload is the current version of a file by users that have more than 500 edits" is a bit more accurate. | SELECT actor_name, COUNT(*)
FROM image
JOIN actor_image ON img_actor = actor_id
JOIN `user` ON actor_user = user_id
WHERE user_editcount > 500
GROUP BY img_actor
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["rev_actor", "actor_name", "edit_count"], "rowcount": 140}], "runningtime": "40.26"} | commonswiki_p |
disambiguator qualifier "(genus)", red links | null | SELECT page_title
FROM page AS p
INNER JOIN pagelinks AS pl
ON p.page_id = pl.pl_from
WHERE p.page_namespace = 0
AND pl_title LIKE '%idae'
AND pl_title NOT IN (
SELECT page_title
FROM page
WHERE page_namespace = 0)
#GROUP BY page_title
LIMIT 1;
| {"runningtime": "1.28", "resultsets": [{"rowcount": 6, "headers": ["pl_from", "page_title"]}]} | enwiki_p |
Random pages | null | select HOUR(r.rev_timestamp), COUNT(*) as n_revs from revision_userindex r
GROUP BY HOUR(r.rev_timestamp) | {"resultsets": [{"headers": ["page_title"], "rowcount": 1121}], "runningtime": "4.92"} | eewiki |
Number of proofread pages by quality level in the French Wikisource | null | USE trwikisource_p;
SELECT pp_value AS level, COUNT(*) FROM page_props WHERE pp_propname = "proofread_page_quality_level" GROUP BY pp_value;
USE trwikisource_p;
SELECT CONCAT('* [[',page_title,']]') AS "Maddeler"
FROM page
JOIN page_props ON page_id = pp_page
WHERE pp_value = 3
AND pp_propname = "proofread_page_qua... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1462}], "runningtime": "89.27"} | trwikisource_p |
'ContentTranslation' tagged articles [enwp] | Searches en.wp for pages with the 'contenttranslation' | SELECT distinct page.page_title
FROM revision, change_tag_def
JOIN change_tag ON ct_rev_id = rev_id
JOIN page ON page_id = rev_page
WHERE ctd_name = 'contenttranslation'; | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 25}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 11}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "0.74"} | enwiki_p |
All editors on German Wikipedia by registration date 2021+ | null | USE dewiki_p;
SELECT
user_name,
edits_after,
user_registration
FROM user
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_after
FROM revision_compat
WHERE rev_timestamp > "20210301000000"
GROUP BY edit_username
) AS ... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 127}], "runningtime": "251.07"} | dewiki_p |
la:SeitenTitel.wikt | Seitentitel für weitere Abgleiche-LATEIN. | USE lawiktionary_p;
SELECT page_title
FROM page; | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len"], "rowcount": 9167}], "runningtime": "27.94"} | lawiktionary |
ruwiki: Convenient Discussions script usage: number of edits by month (edits with tag) | null | #select substring(rev_timestamp, 1, 6) date_, count(*) c, rev_page
select substring(rev_timestamp, 1, 8) date_, count(*) AS c #rev_page, rev_timestamp #, count(rev_page), rev_timestamp
from revision
left join change_tag on rev_id = ct_rev_id
where ct_tag_id = 94 -- 94 -- из модуля, 102 -- панель
AND DATE(rev_timestam... | {"resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}], "runningtime": "123.21"} | ruwiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"resultsets": [{"headers": ["month_year", "user", "No_of_articles", "Bytes"], "rowcount": 13}], "runningtime": "0.16"} | commonswiki_p |
Examples of data in wikidatawiki_p.wb_changes | null |
SELECT
*
FROM
wb_changes
LIMIT 10 | {"resultsets": [{"headers": ["count(*)", "avg_age"], "rowcount": 1}], "runningtime": "16.71"} | wikidatawiki_p |
تعديلات ذات ملخص تعديل محدد | تعديلات ذات ملخص تعديل محدد خلال فترة محددة | use arwiki_p;
select concat("[[",page_title,"]]"), concat("[[:en:",(select ll_title from langlinks
where ll_from = rev_page
and ll_lang = "en"
... | {"resultsets": [{"headers": ["user_name", "edits_after", "user_registration"], "rowcount": 206}], "runningtime": "76.84"} | arwiki_p |
Short user talk pages created by users other than the talk page owner (meta) | null | use metawiki_p;
select distinct page_len, page_title, page_touched, actor_name, user_editcount from page join revision on page_id = rev_page inner join actor on rev_actor = actor_id left join user on actor_user = user_id
where page_namespace = 3 and page_is_new = 1 and page_title not regexp "/" and page_len between 1 a... | {"resultsets": [{"headers": ["page_title"], "rowcount": 155}], "runningtime": "74.96"} | metawiki |
jawiki: page whose title contains \uFF5E | null | use jawiki_p;
SELECT concat("[[{{ns:", page_namespace, "}}:", page_title, "]]") as title, page_is_redirect as redirect, page_is_new as new
from page
where page_title like "%~%" -- \uFF5E
-- limit 100;
-- SELECT concat("[[", page_title, "]]") from page where page_title like "%~%"; | {"resultsets": [{"headers": ["page_id", "DATE_FORMAT(rev_timestamp, \"%Y-%m-%d\")"], "rowcount": 3828}], "runningtime": "6.14"} | jawiki_p |
Query | null | use enwiki_p;
SELECT `page`.*
from page
where page_title = 'South_Korean_drama_television_series'
limit 0,10 | {"connection_id": 478590504} | enwiki_p |
Short user talk pages created by users other than the talk page owner (wikidatawiki) | null | use wikidatawiki_p;
select distinct page_len, page_title, page_touched, actor_name, user_editcount from page join revision on page_id = rev_page inner join actor on rev_actor = actor_id left join user on actor_user = user_id
where page_namespace = 3 and page_is_new = 1 and page_title not regexp "/" and page_len between... | {"resultsets": [{"headers": ["ns", "lct", "lcrd", "uct", "ucrd"], "rowcount": 10}], "runningtime": "0.37"} | wikidatawiki |
Ruwiki most transcluded templates without TemplateData 2021 | null | SELECT *
FROM (
SELECT
tl_title,
COUNT(tl_from) AS cnt
FROM templatelinks
WHERE tl_namespace = 10
GROUP BY tl_title
ORDER BY cnt desc
LIMIT 1000
) t
INNER JOIN page
ON page_namespace = 10
AND page_title = tl_title
LEFT JOIN page_props
ON pp_page = page_id
AND pp_propname = "templatedata"
WHERE pp_page IS ... | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 211}], "runningtime": "0.55"} | ruwiki_p |
Userspace pages of Chlod | This is used to periodically synchronize my watchlist with my userspace pages that actually exist. | SELECT
CONCAT('User:', REPLACE(page_title, '_', ' ')) AS `page title`
FROM page
WHERE (page_title LIKE 'Chlod/%' OR page_title LIKE 'Chlod_(test)%' OR page_title = 'Chlod') AND (page_namespace = 2 OR page_namespace = 3) | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 642}], "runningtime": "750.30"} | enwiki_p |
صندوق معلومات تجمع سكاني | null | use arwiki_p;
select CONCAT('',page_title,'') AS "مثال صفحة", cl_sortkey_prefix AS "الوسيط غير المدعوم", COUNT(*) AS "عدد الاستخدامات" , page_namespace
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to = "صفحات_تستخدم_قالب:صندوق_معلومات_تجمع_سكاني... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.13"} | arwiki |
Page IDs 1869134 and 5602792 on fawiki | null | select *
from page
where page_id in (1869134, 5602792);
select *
from archive
where ar_page_id in (1869134, 5602792); | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "1728.19"} | fawiki_p |
Files with no license used where? (wa.wiki) | null | #USE ukwiki_p;
#SELECT DISTINCT CONCAT('# [[:File:', p.page_title, ']]'), i.il_from, d.page_title #GROUP_CONCAT(i.il_from_namespace ORDER BY i.il_from_namespace SEPARATOR ', ')
#SELECT CONCAT('# [[:File:', p.page_title, ']]'), GROUP_CONCAT(i.il_from_namespace SEPARATOR ', ')
SELECT CONCAT('[[:File:', p.page_title, ']... | {"resultsets": [{"headers": ["concat(\"Category:\",page_title)", "page_len"], "rowcount": 9165}], "runningtime": "30.82"} | wawiki_p |
Category code from CommanderWaterford | null | SELECT
page_title,
GROUP_CONCAT(cl2.cl_to SEPARATOR '|')
FROM page
JOIN categorylinks AS cl1
ON cl1.cl_from = page_id
LEFT JOIN categorylinks AS cl2
ON cl2.cl_from = page_id
WHERE cl1.cl_to = 'All_articles_needing_additional_references'
GROUP BY page_id; | {"resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "Delta"], "rowcount": 287}], "runningtime": "1.38"} | enwiki_p |
List all pages which contains double extension name (svg) on srwiki | null | use srwiki_p;
SELECT concat("# [[:File:",page_title,"]]")
FROM page WHERE page_title LIKE '%svg.svg' AND page_namespace=6 AND page_is_redirect=0; | {"resultsets": [{"headers": ["count(ug_user)", "ug_group"], "rowcount": 1}], "runningtime": "0.07"} | srwiki_p |
Non-empty redirect categories on srwiki | null | # cl_to: Stores the name (excluding namespace prefix) of the desired category. Spaces are replaced by underscores (_)
USE srwiki_p;
SELECT distinct CONCAT('[https://sr.wikipedia.org/w/index.php?title=Категорија:',page_title,'&redirect=no ',page_title,']') AS page_title, CONCAT('[[:Категорија:',rd_title,']]') AS rd_titl... | {"resultsets": [{"headers": ["ns", "lct", "lcrd", "uct", "ucrd"], "rowcount": 10}], "runningtime": "2.03"} | srwiki_p |
Non-free files used where? (hi.wiki) | null | #USE ukwiki_p;
#SELECT DISTINCT CONCAT('# [[:File:', p.page_title, ']]'), i.il_from, d.page_title #GROUP_CONCAT(i.il_from_namespace ORDER BY i.il_from_namespace SEPARATOR ', ')
#SELECT CONCAT('# [[:File:', p.page_title, ']]'), GROUP_CONCAT(i.il_from_namespace SEPARATOR ', ')
SELECT CONCAT('[[:File:', p.page_title, ']... | {"connection_id": 996010264} | hiwiki_p |
Articles with most outgoing links | Pages in the main namespace with internal links to at least 3000 distinct pages.
Limited to pages with length at least 45000 characters for performance reasons.
[[Outline of Islam]] is a surprising outlier with 4125 links and a page_len of just 49316; only one other page with page_len < 100000 has at least 4000 links... | SELECT page_title, COUNT(*), page_len
FROM pagelinks
JOIN page ON page_id = pl_from
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_len >= 45000
GROUP BY page_title, page_len
HAVING COUNT(*) >= 3000
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["pl_title"], "rowcount": 132}], "runningtime": "0.59"} | enwiki |
Quotation mark redirects #2 | enwiki two-word mainspace redirects targeting the same title minus quotation marks | SELECT page_title, rd_title
FROM page RIGHT JOIN redirect ON page_id = rd_from
WHERE page_title RLIKE CONCAT("^\"(?=[^_]+_[^_]+$)", rd_title, "\"$")
AND page_namespace = 0 | {"connection_id": 996356643} | enwiki_p |
بیهق | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%بیهق%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"], "rowcount": 1}], "runningtime": "0.59"} | fawiki_p |
Tagged {{Unreferenced}} within last 2 days | Credit to [[en:User:Cryptic]] for helping to debug this. Keep in mind: this query works on a replica database, so the data may be 2 weeks old. I guess this was more of a learning exercise than a practical one. Just use Wikipedia's native search if you need this data. | SELECT rc_title, rc_timestamp
FROM recentchanges
JOIN categorylinks ON cl_from = rc_cur_id
WHERE rc_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -2 DAY), "%Y%m%d%H%i%s")
AND cl_to = 'All_articles_needing_additional_references'
AND rc_new = 1
ORDER BY rc_title | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "0.07"} | enwiki_p |
RfA page size @ zhwiki | null | SELECT MIN(rev_timestamp) ts, page_title, page_len FROM page
JOIN revision ON rev_page = page_id
WHERE page_namespace = 4
AND page_title LIKE '申请成为管理员/%'
AND NOT page_is_redirect
AND page_len > 200 # 排除列表页面,非实际 RfA
GROUP BY page_id
ORDER BY ts
DESC; | {"resultsets": [{"headers": ["count(*)", "avg_age"], "rowcount": 1}], "runningtime": "6.66"} | zhwiki_p |
Images from Wiki Loves Monuments 2020 | null | SELECT img_name, Img_sha1
from image
INNER JOIN (SELECT page_title
FROM categorylinks
LEFT JOIN page
ON cl_from = page_id
WHERE cl_to LIKE 'Images_from_Wiki_Loves_Monuments_2020'
AND page_namespace = 6) as qi ON qi.page_title=image.img_name
| {"resultsets": [{"headers": ["actor_id", "user_id", "user_name", "user_pagescreated"], "rowcount": 0}], "runningtime": "70.61"} | commonswiki |
SDC edits by user and edit summary, distinct pages edited, #WMSE-WLM-israel | null | SELECT DISTINCT page_title
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND comment_tex... | {"resultsets": [{"headers": ["cat_pages"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
SDC edits by user and edit summary, distinct pages edited, #WMSE-WLM-sweden | null | SELECT DISTINCT page_title
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND comme... | {"resultsets": [{"headers": ["cat_pages"], "rowcount": 1}], "runningtime": "0.06"} | commonswiki_p |
Look for capitalized labels in Bosnian | https://doc.wikimedia.org/Wikibase/master/php/md_docs_storage_terms.html | # https://doc.wikimedia.org/Wikibase/master/php/md_docs_storage_terms.html
SELECT
CONCAT('Q', wbit_item_id) AS qid,
wby_name AS type,
wbxl_language AS lang,
wbx_text AS text
FROM
wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id=wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id=wby_id
LEF... | {"resultsets": [{"headers": ["pl_title", "page_title", "enwiki_title", "enwiki_len", "trwiki_len", "enprojects", "no_of_projects"], "rowcount": 2063}], "runningtime": "15.78"} | wikidatawiki_p |
Look for capitalized descriptions in Croatian | null | # https://doc.wikimedia.org/Wikibase/master/php/md_docs_storage_terms.html
SELECT
CONCAT('Q', wbit_item_id) AS qid,
wby_name AS type,
wbxl_language AS lang,
wbx_text AS text
FROM
wbt_item_terms
LEFT JOIN wbt_term_in_lang ON wbit_term_in_lang_id=wbtl_id
LEFT JOIN wbt_type ON wbtl_type_id=wby_id
LEF... | {"connection_id": 483456504} | wikidatawiki_p |
Top edited Index file bnwikisource | null | USE bnwikisource_p;
(SELECT month, page_namespace, page_title, edits
FROM (
SELECT LEFT(rev_timestamp, 6) AS month, rev_page, COUNT(*) AS edits
FROM revision
WHERE rev_timestamp BETWEEN "202101" AND "202103"
GROUP BY month, rev_page
ORDER BY edits DESC
LIMIT 500
) AS top_page_edits
INNER JOIN page O... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 10}], "runningtime": "0.57"} | bnwikisource_p |
MassMassage list creator: Active user of Bengali NS0 & NS104 | MassMassage list creator:Active user of Indic Wikisource, here NS:0 an NS:104 ( Main namespace and Page namespace) edit done by the user account | USE bnwikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = bn.wikisource.org }}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN ('0','104','... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 10}], "runningtime": "0.45"} | bnwikisource_p |
fix templates أركنساس | null | select
CONCAT('* [[:',ll_title, ']]>') AS cat1
, REPLACE(CONCAT( '[[:' , ll_title , ']]' ) , 'أركنسو'
,'أركنساس' ) AS cat2
#, REPLACE(CONCAT( '[[:' , ll_title , ']]' ) , 'سياسيون' ,'سياسية' ) AS cat2
, CONCAT("#Template:", p1.page_title) AS title
from page AS p1, langlinks
where p1.page_... | {"resultsets": [{"headers": ["page_id"], "rowcount": 2452}], "runningtime": "3.49"} | enwiki_p |
fix categories أركنساس | null | select
CONCAT('* [[:',ll_title, ']]>') AS cat1
#, REPLACE(CONCAT( '[[:' , ll_title , ']]' ) , 'أركنسو' ,'أركنساس' ) AS cat2
#, REPLACE(CONCAT( '[[:' , ll_title , ']]' ) , 'غير متجددة' ,'متجددة' ) AS cat2
#, REPLACE(CONCAT( '[[:' , ll_title , ']]' ) , 'متجددة' ,'غير متجددة' ) AS cat2
#, REPLACE(CONCA... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 213}], "runningtime": "173.09"} | enwiki_p |
Articles created by new users in tewiki using content translation | null | use tewiki_p;
select
l1.log_id,
l1.log_timestamp,
user_registration,
(datediff(str_to_date(l1.log_timestamp, "%Y%m%d%H%i%S"), str_to_date(user_registration, "%Y%m%d%H%i%S"))<=1) as diff,
l1.log_user_text,
l1.log_title,
l1.log_comment,
l1.log_page,
rev_id,
ar_rev_id,
rev_le... | {"resultsets": [{"headers": ["cat", "pages", "subcats", "files", "total"], "rowcount": 50}], "runningtime": "0.12"} | tewiki_p |
SDC edits by user and edit summary, distinct page edited, #WMSE-GLAM-musikverket | null | SELECT DISTINCT page_title
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND comme... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "17.73"} | commonswiki_p |
SDC edits by user and edit summary, distinct pages edited, #WMSE-WLM-poland | null | SELECT DISTINCT page_title
FROM revision_userindex r1
JOIN actor_revision ON actor_id = r1.rev_actor
LEFT JOIN page ON page_id = r1.rev_page
LEFT JOIN comment_revision ON comment_id = r1.rev_comment_id
LEFT JOIN revision r2 ON r1.rev_parent_id = r2.rev_id
WHERE actor_name IN ('AliciaFagervingWMSE-bot')
AND comme... | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_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"], "rowcount": 0}],... | commonswiki_p |
Highest edit count (enwiki, last 365 days) | null | SET @rev = (SELECT MIN(rev_id)
FROM revision
WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s"));
SELECT COUNT(*) AS 'Edits',
actor_name AS `User`
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE rev_id >= @rev
GROUP BY `User`
LIMIT ... | {"resultsets": [{"headers": ["page_title", "iwl_title"], "rowcount": 10}], "runningtime": "6.70"} | enwiki_p |
newly uploaded Wikimedia Commons files per day | null | SELECT SUBSTR(rc_timestamp, 1, 8), COUNT(*)
FROM recentchanges
WHERE rc_namespace = 6 -- NS_FILE
AND rc_new = 1
GROUP BY SUBSTR(rc_timestamp, 1, 8); | {"connection_id": 484509152} | commonswiki_p |
Asian-American content on enwiki | Get Asian-American-related articles from English Wikipedia based on tagging by WikiProject Asian Americans (https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Asian_Americans) | SELECT
pa_page_id AS page_id,
page_title AS page_title,
pa_class AS quality_class,
pa_importance AS importance_class
FROM page_assessments
INNER JOIN page_assessments_projects
ON (pap_project_id = pa_project_id
AND (pap_project_title = 'Asian Americans'
OR pap_project_title = 'United States/W... | {"resultsets": [{"headers": ["actor_name", "count", "bot", "page_title"], "rowcount": 17}], "runningtime": "2.71"} | enwiki_p |
Module:typing-aids categories | null | select cl_to, count(cl_to) as count from categorylinks
join page on page_id = cl_from
where page_title like 'typing-aids%' and page_namespace = 828
group by cl_to
order by count desc; | {"resultsets": [{"headers": ["actor_name", "count", "bot", "page_title"], "rowcount": 14}], "runningtime": "3.61"} | enwiktionary |
Redirected pages (wa.wiki) | null | SELECT CONCAT('# [[Copene:', p.page_title, ']]')
FROM page p
WHERE p.page_namespace = 1 AND p.page_is_redirect = 1
ORDER BY p.page_title ASC;
| {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 139}], "runningtime": "94.07"} | wawiki_p |
Files on wa.wiki NOT in spec categories (no license) | null | #USE tewiki_p;
SELECT
CONCAT("# [[:File:", img_name, "]]") AS file, actor_name
###FROM templatelinks
###JOIN page ON tl_from = page_id
###JOIN image ON img_name = page_title AND page_namespace = 6
###JOIN actor_image ON img_actor = actor_id
FROM image
JOIN page
ON page_namespace=6
AND page_title = img_name
AND pag... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 74}], "runningtime": "5.40"} | wawiki_p |
Map category name in hewiki to Wikidata QID | null | select pp_value,hepage.page_title from page hepage inner join enwiki_p.page enpage on enpage.page_namespace=14 and enpage.page_title=concat('Plants_described_in_', right(hepage.page_title,4)) inner join enwiki_p.page_props on pp_page=enpage.page_id and pp_propname='wikibase_item' left join langlinks on ll_from=hepage.p... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 26}], "runningtime": "0.62"} | hewiki_p |
Number of images uploaded to fiwiki by Kulttuurinavigaattori | null | SELECT count(distinct(img_name)) as c FROM image_compat WHERE img_user_text="Kulttuurinavigaattori" limit 1; | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 39}], "runningtime": "9.19"} | fiwiki |
Number of images uploaded to commons by Kulttuurinavigaattori | null | SELECT count(distinct(img_name)) as c FROM image_compat WHERE img_user_text="Kulttuurinavigaattori" limit 1; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 5}], "runningtime": "0.35"} | commonswiki |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 46}], "runningtime": "2.70"} | commonswiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 91}], "runningtime": "104.22"} | commonswiki_p |
Charlie_Jabaley | null | SELECT ar_id, ar_title, ar_timestamp, ar_user_text, ar_namespace, ar_len FROM archive_compat WHERE ar_title="Charlie_Jabaley" AND ar_namespace=0; | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 28}], "runningtime": "10.67"} | enwiki |
Sprit 1 contribs in Supervisory Council case talk pages | null | select
page_title,
count(*)
from revision
join page
on rev_page = page_id
join actor
on actor_id = rev_actor
where
actor_name = 'Sprit 1'
and page_namespace = 5
and page_title like 'تابلوی_اعلانات_هیئت_نظارت/دوره_%'
group by page_title
| {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 177}], "runningtime": "12.69"} | fawiki_p |
All edits by me | null | select count(*)
from revision_userindex
join actor_revision
on rev_actor = actor_id
where actor_name = 'Huji' | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 8}], "runningtime": "3.84"} | fawiki_p |
nlwiki Red links that appear to have a namespace prefix | Column 'sp' = whether a space can be inserted to make the red link blue.
Executes in ~3-6 min. | SELECT
fp.page_namespace AS fn,
fp.page_title AS ft,
pl_namespace AS tn,
pl_title AS tt,
MIN(rev_timestamp) AS created,
EXISTS (SELECT * FROM page WHERE page_namespace=pl_namespace AND page_title=REGEXP_REPLACE(pl_title, ':+', ':_')) AS sp
FROM pagelinks, page fp, revision
WHERE
pl_namespace=... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 27}], "runningtime": "9.39"} | enwiki |
Redirects to nonexistent pages | null | # Turns outs this is handled by AnomieBOT III
/*SELECT rd_from, rd_namespace
FROM redirect
LEFT JOIN page ON page_namespace = rd_namespace AND page_title = rd_title
-- WHERE rd_interwiki IS NULL
-- AH, this is empty because rd_interwiki is not used on the English Wikipeda; soft redirects are used instead.
WHERE page_id... | {"resultsets": [{"headers": ["user_name", "user_editcount", "user_registration", "Last edit", "Last log", "user_group"], "rowcount": 49}], "runningtime": "1.32"} | wikidatawiki |
Find blocked DevilBlack69 socks | null | Use enwiki_p;
SELECT user_name
FROM user
JOIN ipblocks ON user_id=ipb_user
AND user_editcount > 0
AND length(user_name) >=8 AND length(user_name) <=19
AND user_registration > adddate(now(),-1000) # approx last three years
AND (
user_name like ("%Queen")
OR user_name like ("Ruby[A-Z]%")
OR user_name like ("Diam... | {"resultsets": [{"headers": ["actor_name", "count(rev_actor)"], "rowcount": 12}], "runningtime": "2.49"} | enwiki_p |
sortkey prefix all-infobox | null | #use arwiki_p;
select page_title, cl_sortkey_prefix, COUNT(*) , cl_to
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to like "صفحات_تستخدم_قالب%_مع_وسائط_غير_معروفة"
#where cl_to = "صفحات_بها_وسائط_مستغنى_عنها"
and page_namespace = 0
#and cl_sortkey... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2927}], "runningtime": "420.36"} | arwiki_p |
sortkey prefix infobox | null | #use arwiki_p;
select page_title, cl_sortkey_prefix, COUNT(*)
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to like "صفحات_بها_وصلات_إنترويكي_للإزالة"
#where cl_to = "صفحات_بها_وسائط_مستغنى_عنها"
and page_namespace = 0
#and cl_sortkey_prefix like "... | {"resultsets": [{"headers": ["CONCAT(\"Draft:\",page_title)", "rev_timestamp_", "actor_name_"], "rowcount": 4904}], "runningtime": "36.90"} | arwiki_p |
Missing categories (enwiki from arwiki) | null | #USE arwiki_p;
SELECT
count(*) ll_count,
CONCAT("[[:تصنيف:",page_title,"]]") title_pl,
(select ll_title from langlinks where ll_from = page_id and ll_lang = 'ar') title_en,
(select pp_value from page_props where pp_page = page_id and pp_propname = 'wikibase_item') wb_item
FROM
page, langlinks
... | {"connection_id": 1001891106} | arwiki_p |
long page titles | null | use enwiki_p;
select page_namespace, page_title, page_is_redirect from page where length(page_title) > 200; | {"resultsets": [{"headers": ["log_title", "comment_text", "link"], "rowcount": 51}], "runningtime": "18.85"} | enwiki |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["MONTH", "edits", "id", "ds", "ctd_name", "rev_id"], "rowcount": 1}], "runningtime": "0.07"} | eswiki |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"resultsets": [{"headers": ["rev_id", "rev_timestamp", "comment_text"], "rowcount": 0}], "runningtime": "408.52"} | commonswiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('#[[:File:', page_title, ']]') AS wikitext
FROM categorylinks
JOIN templatelinks ON tl_from = cl_from
JOIN page ON page_id = cl_from
WHERE cl_to LIKE 'All\_media\_needing\_categories\_as\_of%'
AND cl_type = 'file' AND page_namespace = 6
AND tl_namespace = 10 AND tl_title = 'Cs'
ORDER BY page_title;
/*
SEL... | {"resultsets": [{"headers": ["user_id", "user_name"], "rowcount": 1}], "runningtime": "0.08"} | commonswiki_p |
Broj poveznica na razdvojbe | koliko članaka vodi na svaku stranicu s razdvojbom? | USE hrwiki_p;
SELECT pl_title, count(pl_from) as cnt
FROM pagelinks, page, categorylinks
WHERE pl_from_namespace = 10
AND pl_namespace = 0
AND pl_title=page_title
AND cl_from=page_id
AND cl_to='Razdvojba'
GROUP BY pl_title
ORDER BY cnt desc
LIMIT 444; | {"resultsets": [{"headers": ["cnt", "title"], "rowcount": 2918}], "runningtime": "161.15"} | hrwiki |
Sandboxes of anonymous users on plwiki | null | SELECT CONCAT("# [[User:",page_title,"]]") AS page_title, page_len
FROM page, revision
WHERE page_latest = rev_id
AND page_title RLIKE '[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}\/.*'
AND page_title NOT LIKE '%.css'
AND page_title NOT LIKE '%.js'
#AND page_title NOT LIKE '%/brudnopis%'
AND page_namespace = 2
/*A... | {"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["userid", "name", "editcount", "admin", "bot"], "rowcount": 821}], "runningtime": "7.35"} | plwiki_p |
Files on gl.wiki GFDL file revisions by user | null | SELECT CONCAT("# [[:File:", page_title, "]]") as File, img_timestamp, actor_name
FROM templatelinks
JOIN page ON tl_from = page_id
JOIN image ON img_name = page_title AND page_namespace = 6
JOIN actor_image ON img_actor = actor_id
JOIN categorylinks
ON cl_from = page_id
AND cl_type = "file"
AND cl_to = "Imaxes_GFDL" ... | {"resultsets": [{"headers": ["page_title", "actor_name", "comment_text", "rev_timestamp"], "rowcount": 8024}], "runningtime": "38.87"} | glwiki_p |
all revs | null | select * from revision r
where rev_page in (select page_id from page p
where p.page_title in (select pl_title from pagelinks where pl_from = 990505 and pl_namespace = 0)
and p.page_namespace = 0 and p.page_is_redirect = 0 and p.page_is_new = 0); | {"resultsets": [{"headers": ["user_name", "ufg_group"], "rowcount": 1}], "runningtime": "0.20"} | enwiki |
all revs (joins) | null | select * from revision r
inner join page p on r.rev_page = p.page_id
inner join pagelinks pl on p.page_title=pl.pl_title
where pl.pl_from = 990505 and pl.pl_namespace = 0
and p.page_namespace = 0 and p.page_is_redirect = 0 and p.page_is_new = 0; | {"resultsets": [{"headers": ["user_name", "ipb_id"], "rowcount": 1}], "runningtime": "0.07"} | enwiki |
nlwiki Number of recently active IPv6 users grouped by /64 | null | SELECT INET6_NTOA(CONCAT(LEFT(INET6_ATON(actor_name), 8), '\0\0\0\0\0\0\0\0')) AS `/64`, COUNT(*) AS `count`
FROM (SELECT DISTINCT actor_name FROM recentchanges, actor WHERE rc_actor=actor_id AND actor_user IS NULL AND IS_IPV6(actor_name)) t
GROUP BY `/64`
ORDER BY `count` DESC
LIMIT 50 | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.10"} | nlwiki |
nlwiki Example of anonymous page creation log by IP prefix | null | SELECT log_timestamp, actor_name, log_namespace, log_title, EXISTS (SELECT * FROM page WHERE log_page=page_id) AS `exists`
FROM logging, actor
WHERE log_type='create' AND log_action='create' AND log_actor=actor_id AND actor_user IS NULL AND actor_name REGEXP '^2A02:1810:140'
ORDER BY log_timestamp DESC, actor_name | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 13}], "runningtime": "1.07"} | nlwiki |
Files within a specific hidden category and any other visible category as well | null | set @hidden_cat = "Media_contributed_by_the_Mazovian_Digital_Library_–_needing_category";
select distinct(p1.page_title)
from page as p1
inner join categorylinks as cl1 on cl1.cl_from = p1.page_id and cl1.cl_to = @hidden_cat
inner join categorylinks as cl2 on cl2.cl_from = p1.page_id
where cl1.cl_type = "file" an... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 33}], "runningtime": "2.37"} | commonswiki_p |
gl.wiki files by uploader | null | #USE ukwiki_p;
SELECT CONCAT("# [[:File:", page_title, "]]") as File, img_timestamp, actor_name
FROM templatelinks
JOIN page ON tl_from = page_id
JOIN image ON img_name = page_title AND page_namespace = 6
JOIN actor_image ON img_actor = actor_id
JOIN categorylinks
ON cl_from = page_id
AND cl_type = "file"
#AND cl_to ... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 25}], "runningtime": "22.57"} | glwiki_p |
Files within a specific hidden category and any other visible category as well | null | set @hidden_cat = "Media_contributed_by_the_Mazovian_Digital_Library_–_needing_category";
select distinct(p1.page_title)
from page as p1
inner join categorylinks as cl1 on cl1.cl_from = p1.page_id and cl1.cl_to = @hidden_cat
inner join categorylinks as cl2 on cl2.cl_from = p1.page_id
where cl1.cl_type = "file" an... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 24}], "runningtime": "2.89"} | commonswiki_p |
ukwiki Red links with english names | null | SELECT fp.page_namespace AS 'fn', fp.page_title AS 'ft', pl_namespace AS 'tn', pl_title AS 'tt'
FROM pagelinks, page fp
WHERE
pl_namespace=0 AND
pl_title REGEXP '^[a-zA-Z0-9_\\- ]+$' AND
NOT EXISTS (SELECT * FROM page tp WHERE tp.page_namespace=pl_namespace AND tp.page_title=pl_title) AND
pl_from=fp.page_i... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 2}], "runningtime": "3.13"} | ukwiki |
Files within a specific hidden category and any other visible category as well | null | set @hidden_cat = "Media_contributed_by_the_Mazovian_Digital_Library_–_needing_category";
select distinct(p1.page_title)
from page as p1
inner join categorylinks as cl1 on cl1.cl_from = p1.page_id and cl1.cl_to = @hidden_cat
inner join categorylinks as cl2 on cl2.cl_from = p1.page_id
where cl1.cl_type = "file" an... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 0}], "runningtime": "0.06"} | commonswiki_p |
ukwiki Red links with english names | null | SELECT pl_title, count(pl_title) AS counting
FROM pagelinks
WHERE
pl_namespace=0 AND
pl_from_namespace = 0 AND
not exists (select page_title
from page
where page_title = pl_title
and page_namespace = 0) AND
pl_title REGEXP '^[a-zA-Z0-9_\\- ]+$'
group by ... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 1}], "runningtime": "0.18"} | ukwiki |
ukwiki Red links with english names | null | SELECT pl_title, count(pl_title) AS counting
FROM pagelinks
WHERE
pl_namespace=0 AND
pl_from_namespace = 0 AND
not exists (select page_title
from page
where page_title = pl_title
and page_namespace = 0) AND
pl_title REGEXP '^[a-zA-Z0-9_\\- ]+$'
group by ... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 3}], "runningtime": "0.25"} | ukwiki_p |
ukwiki Red links with english names | null | SELECT pl_title, count(pl_title)
FROM pagelinks
WHERE
pl_namespace=0 AND
pl_from_namespace = 0 AND
pl_title REGEXP '^[a-zA-Z0-9_\\- ]+$' AND
not exists (select page_title
from page
where page_title = pl_title
and page_namespace = 0)
group by pl_titl... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 4}], "runningtime": "0.10"} | ukwiki_p |
ukwiki Red links with english names | null | SELECT pl_title, count(pl_title)
FROM pagelinks
WHERE
pl_namespace=0 AND
pl_from_namespace = 0 AND
pl_title REGEXP '^[a-zA-Z0-9_\\- ]+$' AND
not exists (select page_title
from page
where page_title = pl_title
and page_namespace = 0)
group by pl_titl... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 26}], "runningtime": "3.95"} | ukwiki_p |
Week days | null | SET
STATEMENT max_statement_time = 300 FOR
SELECT
user_name,
total,
weekdays,
dist_days
FROM
(
SELECT
rc_actor,
COUNT(*) AS total,
SUM(
CASE
WHEN day = 1 THEN 0
WHEN day = 7 THEN 0
ELSE 1
END
) AS weekdays,
COUNT(DISTINCT day) A... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 1}], "runningtime": "0.07"} | enwiki_p |
الاكثر مراجعة | null | select CONCAT(actor_name), COUNT(*)
from logging
INNER JOIN actor ON actor.actor_id = logging.log_actor
where log_timestamp BETWEEN 20210419000000 AND 20210426000000
and log_action = "approve"
and log_namespace = 0
and ucase (actor_name) not like ucase (_utf8"%BOT") COLLATE utf8_general_ci
a... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 41}], "runningtime": "17.00"} | arwiki |
Carlossuarez46 pages reffing only geonames/Iranian census | Main namespace pages created by [[User:Carlossuarez46]] that currently have at least one external link to geonames.nga.mil, and no other external links except possibly to:
geohack.toolforge.org (coordinate templates),
web.archive.org (reference archival),
https://www.amar.org.ir/Portals/0/census/.
Currently only displ... | SELECT rev_timestamp, page_id, page_title
FROM revision
JOIN page ON page_id = rev_page
JOIN actor_revision ON actor_id = rev_actor
WHERE page_namespace = 0
AND page_title LIKE 'Bar%'
AND rev_parent_id = 0
AND actor_name = 'Carlossuarez46'
AND EXISTS (SELECT 1
FROM externallinks
WHER... | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 13}], "runningtime": "0.21"} | enwiki |
Replica SQL database delay | null | SELECT MAX(rc_timestamp) AS replica_time,
DATE_FORMAT(NOW(), "%Y%m%d%H%i%s") AS actual_time,
(DATE_FORMAT(NOW(), "%Y%m%d%H%i%s") - MAX(rc_timestamp)) AS seconds_different
FROM recentchanges | {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 0}], "runningtime": "0.04"} | enwiki |
Multiple columns with the same name | null | SELECT c1.comment_id, c2.comment_id FROM comment c1
JOIN comment c2 ON c1.comment_id = c2.comment_id
LIMIT 50; | {"resultsets": [{"headers": ["page_title"], "rowcount": 142}], "runningtime": "217.39"} | enwiki_p |
List of stewards | null | SELECT user_name
FROM user
JOIN user_groups ON ug_user = user_id
WHERE ug_group = 'steward'
ORDER BY user_name ASC; | {"resultsets": [{"headers": ["Count", "Size_GB"], "rowcount": 1}], "runningtime": "1.45"} | metawiki |
Highest edit count (enwiki, last 365 days) | null | SET @rev = (SELECT MIN(rev_id)
FROM revision
WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s"));
SELECT COUNT(*) AS 'Edits',
actor_name AS `User`
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
WHERE rev_id >= @rev
GROUP BY `User`
LIMIT ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 76}], "runningtime": "1.89"} | enwiki_p |
Most active all-German speakers on Commons in 2021 | null | USE commonswiki_p;
#SELECT * FROM revision_compat limit 1;
SELECT
edit_username,
edits_after
FROM categorylinks
INNER JOIN page ON page.page_id = cl_from
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_after
FROM revision_compat
WHERE rev_tim... | {"resultsets": [{"headers": ["page_title"], "rowcount": 67}], "runningtime": "7.33"} | commonswiki_p |
Most active all-German speakers on Wikidata in 2021 | null | USE wikidatawiki_p;
#SELECT * FROM revision_compat limit 1;
SELECT
edit_username,
edits_after
FROM categorylinks
INNER JOIN page ON page.page_id = cl_from
INNER JOIN (SELECT
rev_user_text AS edit_username,
COUNT(rev_id) AS edits_after
FROM revision_compat
WHERE rev_ti... | {"resultsets": [{"headers": ["page_title"], "rowcount": 98}], "runningtime": "0.53"} | wikidatawiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.