title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
MassMassage list creator:Active user of Sanskrit 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 sawikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = sa.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": [{"rowcount": 1, "headers": ["count(page_title)"]}], "runningtime": "10.55"} | null |
MassMassage list creator:Active user of Telugu 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 tewikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = te.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": [{"rowcount": 60, "headers": ["page_title", "el_to", "page_touched", "REGEXP_SUBSTR(el_to, '//[^/]*')"]}], "runningtime": "7.03"} | null |
Articles in a specific category with only initial revision (hrwiki) | null |
use hrwiki_p;
/*
SELECT DISTINCT cat_title, page.page_len, count(distinct(cl.cl_from)) as cnt -- , count( distinct(cl.cl_from))
-- staviti "--(razmak)" ispred ", count..." za popis umjesto broja
from category as c
inner join categorylinks as cl on c.cat_title = cl.cl_to
inner join page on cl.cl_from = ... | {"resultsets": [{"rowcount": 25, "headers": ["page_title", "el_to", "page_touched", "portal"]}], "runningtime": "4.45"} | null |
Translate Cost | null | select
url
from
enwiki_p.pages
where
url_domain = 'wikipedia.org' | {"runningtime": "0.09", "resultsets": [{"headers": ["incoming_links"], "rowcount": 1}]} | null |
Translate Cost | null | select
url
from
enwiki_p.pages
where
url_domain = 'wikipedia.org' | {"runningtime": "0.09", "resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 1}]} | null |
my logged actions | null | select * from logging, actor
where log_actor = actor_id
and log_title = 'User:RoySmith'
and actor_name = 'RoySmith'
limit 1; | {"resultsets": [{"rowcount": 25, "headers": ["page_title", "el_to", "page_touched", "portal"]}, {"rowcount": 200, "headers": ["broj", "portal"]}], "runningtime": "19.75"} | null |
zhwp: blocked user without protected | null | USE zhwiki_p;
SELECT ipb_timestamp, REPLACE(ipb_address, " ", "_") AS `username`, page_id, pt_timestamp
FROM ipblocks
LEFT JOIN page ON REPLACE(ipb_address, " ", "_") = page_title AND page_namespace = 2
LEFT JOIN protected_titles ON REPLACE(ipb_address, " ", "_") = pt_title AND pt_namespace = 2
WHERE ipb_user != 0
AND... | {"resultsets": [{"rowcount": 1, "headers": ["count(pa.page_title)"]}], "runningtime": "110.10"} | null |
List of template with excessive fair use images (arwiki) | null | USE arwiki_p;
SELECT concat('قالب:', p.page_title) as pagetitle, i_p.page_title
FROM page p
INNER JOIN imagelinks i ON i.il_from = p.page_id
AND i.il_from_namespace = 828
INNER JOIN page i_p ON i.il_to = i_p.page_title AND 1 <> p.page_is_redirect
INNER JOIN categorylinks c2 ON i_p.page_id = c2.cl_from AND c2.cl... | {"resultsets": [{"rowcount": 100, "headers": ["wl"]}], "runningtime": "4.43"} | null |
block and tag diff | null | USE zhwiki_p;
SELECT user_name, datediff(rev_timestamp, ipb_timestamp)*24+((rev_timestamp-ipb_timestamp)%1000000 DIV 10000)+((rev_timestamp-ipb_timestamp)%10000 DIV 100)/60 AS hour_diff FROM ipblocks, user, page, revision WHERE ipb_expiry="infinity" AND ipb_user=user_id AND page_namespace=2 AND page_title=REPLACE(user_... | {"resultsets": [{"rowcount": 1, "headers": ["Gender", "admins"]}], "runningtime": "0.48"} | null |
blocked, uncreated and unprotected | null | USE zhwiki_p;
SELECT user_name FROM ipblocks, user WHERE ipb_expiry="infinity" AND ipb_user=user_id AND NOT EXISTS(SELECT * FROM page WHERE page_title=REPLACE(user_name," ","_") AND page_namespace=2) AND NOT EXISTS(SELECT * FROM protected_titles WHERE pt_title=REPLACE(user_name," ","_") AND pt_namespace=2) AND ipb_time... | {"runningtime": "0.31", "resultsets": [{"headers": ["substr(log_timestamp,1,8)", "New_users"], "rowcount": 17}]} | null |
IA Books review | null | USE commonswiki_p;
SELECT
## CONCAT("User:",i.img_user_text) as username,
##p.page_latest,
##p.page_id,
##p.page_len,
CONCAT("File:",p.page_title) as page_title,
##i.img_name,
i.img_timestamp
##i.img_sha1
# Cross reference pages and images by page_tile ( I.E we want the Titular image for each 'page'
FROM page p
... | {"runningtime": "6.89", "resultsets": [{"headers": ["up_user", "user_registration", "user_name"], "rowcount": 0}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "4.67", "resultsets": [{"headers": ["user_registration", "user_name"], "rowcount": 0}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "67.73", "resultsets": [{"headers": ["COUNT(up_user)"], "rowcount": 1}]} | null |
Te Wikipedia Articles with File /Images /Links | null | use enwiki_p;
SELECT page_title FROM page LEFT JOIN imagelinks ON il_from=page_id WHERE page_namespace=0 AND page_is_redirect=0 AND page_len > 10 AND il_from IS NOT NULL; | {"connection_id": 396427143} | null |
Translators at meta with language, number of translations | For a given prefix of translatable pages, take all translators for the latest versions of translation units (otherwise someone fixing their own typos would look a prolific translator) and order them by language and translation volume. | use metawiki_p;
SELECT
actor_name as user,
substring_index(page_title, '/', -1) AS language,
count(*) AS no_translations,
CONCAT('* {{target | page = User:', actor_name, ' | site = meta.wikimedia.org}}') AS url
FROM
page
LEFT JOIN
-- Take only the latest revision of each translation to simplify
revision ON ... | {"resultsets": [{"rowcount": 1000, "headers": ["\u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0995\u09be\u09b0\u09c0_\u09a8\u09be\u09ae", "\u09ae\u09cb\u099f_\u09a8\u09bf\u09ac\u09a8\u09cd\u09a7"]}], "runningtime": "37.47"} | null |
Label/description/alias stats for Bengali | Since the migration away from wb_terms, and since the Grafana dashboard which previously displayed these stats is broke, the only way to get semi-immediate statistics on these is for a single language at a time. (There are pages, such as https://wikidata-analytics.wmcloud.org/app/WD_LanguagesLandscape and https://www.w... | use wikidatawiki_p;
SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text... | {"resultsets": [{"rowcount": 161, "headers": ["CONCAT('# [[',page.page_title,']]')"]}], "runningtime": "21.84"} | null |
kategori "Wikipediawan" | null | USE idwiki_p;
select concat("Category:",page_title),page_len from page
join revision on rev_page=page_id and rev_parent_id=0
where page_namespace=14
and page_title like "%Wikipediawan%" or "%pengguna%"
order by rev_timestamp desc; | {"runningtime": "0.10", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 10}]} | null |
Edit count to given articles by date | Number of edits to [[Joe Biden]], [[Donald Trump]], and [[Barack Obama]] by date from January 20 to March 10 in 2021, 2017, and 2009 respectively.
For [[WP:VPT#Is there a way to get a count of edits per day for a certain article?]] circa 15 March 2021. | SELECT page_title, DATE_FORMAT(LEFT(rev_timestamp, 8), '%Y-%m-%d') AS date, COUNT(*)
FROM revision
JOIN page
ON page_id = rev_page
WHERE page_namespace = 0
AND ((page_title = 'Joe_Biden' AND rev_timestamp BETWEEN '20210120' AND '20210311')
OR (page_title = 'Donald_Trump' AND rev_timestamp BETWEEN '20170120' ... | {"resultsets": [{"rowcount": 10, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"]}], "runningtime": "1392.90"} | null |
Articles created by new users in fiwiki using content translation | null | use fiwiki_p;
select
sum(1) as c,
log_id,
log_page,
log_title,
log_user_text,
count(distinct(rev_id)) as rev_count,
count(distinct(ar_rev_id)) as ar_rev_count,
max(rev_len) as max_rev_len,
max(ar_len) as max_ar_len,
sum(visualeditor) as ve,
sum(contenttranslation) as ... | {"connection_id": 400528241} | null |
Articles created by new users in fiwiki using content translation | null | use fiwiki_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": [{"rowcount": 18, "headers": ["File name", "Date", "Size", "Uploader's name"]}], "runningtime": "1015.88"} | null |
Average Sentence Character | null | USE enwiki_p
SELECT COUNT
FROM revision_userindex
WHERE
rev_actor = (SELECT actor_id
FROM actor
WHERE actor_name = "EpochFail") AND
rev_timestamp >= "20140101"; | {"resultsets": [{"rowcount": 21458, "headers": ["page_title", "cl_timestamp"]}], "runningtime": "67.84"} | null |
most thanked users in bnwiki | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ৫০০ ব্যবহারকারী | USE bnwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 500; | {"resultsets": [{"rowcount": 3, "headers": ["from", "to"]}], "runningtime": "36.44"} | null |
most thanked users in bnwiki | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ৫০০ ব্যবহারকারী | USE bnwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 500; | {"resultsets": [{"rowcount": 10, "headers": ["from", "to"]}], "runningtime": "0.92"} | null |
Daftar halaman yatim | fork from Quarry 32947 | USE idwiki_p;
SELECT concat('# [[',p1.page_title,']]')
FROM page AS p1
WHERE p1.page_is_redirect = 0
AND p1.page_namespace = 0
# not a DAB page
AND p1.page_id NOT IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
# not receiving direct link
AND NOT (
p1.page_title IN (
SELECT pl1.... | {"resultsets": [], "runningtime": "0.06"} | null |
Admin gender on Indonesian Wikipedia | Gender of admins and crats on enwiki. | use idwiki_p;
SELECT up_value Gender, COUNT(DISTINCT ug_user) admins FROM user_groups JOIN user_properties ON ug_user=up_user
WHERE (ug_group='sysop' OR ug_group='bureaucrat') AND (up_property='gender') GROUP BY up_value
# Copied from https://quarry.wmflabs.org/query/1888 by ICebear Sweden, with thanks. | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "231.76"} | null |
Total admin actions per month on idwiki | Fork from https://quarry.wmflabs.org/query/5607 | USE idwiki_p;
SELECT
DATE(CONCAT(YEAR(log_timestamp), '-', MONTH(log_timestamp), '-01')) AS Month,
COUNT(log_id) AS Actions
FROM logging
WHERE log_type IN ('block', 'delete', 'import', 'merge', 'protect', 'rights')
GROUP BY Month; | {"resultsets": [{"rowcount": 660, "headers": ["page_title"]}], "runningtime": "36.95"} | null |
Categories that have the highest number of orphan articles | null | use arwiki_p;
select DISTINCT cat_pages as "عدد الصفحات", cat_title as "التصنيف" ,COUNT(cl_from) as "عدد المقالات اليتيمة" from category
inner join page
on page.page_title = category.cat_title
inner join categorylinks
on categorylinks.cl_to = page.page_title
where cl_from in (select cl_from from categorylinks where... | {"resultsets": [{"rowcount": 1, "headers": ["count(*)"]}], "runningtime": "10.10"} | null |
Daily article deletions | null | USE idwiki_p;
SELECT
DATE( log_timestamp ) AS DATE,
COUNT( log_id ) AS deletions
FROM logging
WHERE log_action='delete'
AND log_namespace =0
GROUP BY DATE( log_timestamp ) | {"resultsets": [{"rowcount": 10, "headers": ["User", "Actions"]}], "runningtime": "0.98"} | null |
Women total, not bots, with at least 1 edit | Fork from https://quarry.wmflabs.org/query/3921 | USE idwiki_p;
SELECT COUNT(DISTINCT rev_actor) AS WomenTotal FROM revision WHERE rev_actor IN
(
SELECT user_id FROM user JOIN user_properties ON user_id=up_user WHERE
up_property = 'gender' AND up_value = 'female'
);
SELECT COUNT(DISTINCT rev_actor) AS MenTotal FROM revision WHERE rev_actor IN
(
SELECT user_... | {"resultsets": [{"rowcount": 1, "headers": ["up_user", "up_property", "up_value"]}], "runningtime": "0.20"} | null |
Female new users per month | Draft query 1 | USE idwiki_p;
SELECT COUNT(*) AS total,
FLOOR(user_registration/100000000) AS month
FROM user
JOIN user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'female'
GROUP BY month; | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "863.47"} | null |
User gender on Indonesian Wikipedia | Fork from https://quarry.wmflabs.org/query/2091 | use idwiki_p;
SELECT count(user_name) AS Masc, (SELECT count(user_name) FROM user
JOIN user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'female') AS Femin
FROM user
JOIN user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'male'
# derived from http://quarry.w... | {"runningtime": "18305.85", "resultsets": [{"headers": ["ipc_rev_id", "ipc_rev_timestamp", "ipc_hex"], "rowcount": 5618676}]} | null |
Reply Tool usage/user (en.wiki) | null | select actor_name, count(*) as total
from (
select ct.ct_id, ct.ct_rev_id, actor_user, actor_name
from enwiki_p.change_tag ct
inner join enwiki_p.revision_actor_temp rat
on ct.ct_rev_id = rat.revactor_rev
inner join enwiki_p.actor act
on rat.revactor_actor = act.actor_id
inner join enwiki_p.change_tag_def
on ct_tag_i... | {"connection_id": 924646471} | null |
Resolving pagelinks to page_id (from) | Attempting to query (page_id, page_id) links given the "from" page_id. | SELECT pl.pl_from, p.page_id as pl_to, p.page_is_redirect, p.page_title
FROM pagelinks AS pl
LEFT JOIN page AS p ON (pl.pl_title = p.page_title AND pl.pl_namespace = p.page_namespace)
WHERE p.page_id=62715690; | {"resultsets": [{"rowcount": 117, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}], "runningtime": "330.65"} | null |
Count of unreviewed pages per users (ukwiki) | null | USE ukwiki_p;
SELECT rev_actor, actor_name, COUNT(rev_id) articles
FROM revision
LEFT JOIN flaggedpages ON rev_page = fp_page_id
JOIN actor ON rev_actor = actor_id
JOIN page ON page_id = rev_page
WHERE fp_reviewed is null
AND rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect = 0
GROUP BY rev_actor
HAVING ... | {"runningtime": "1.22", "resultsets": [{"headers": ["user", "actions"], "rowcount": 200}]} | null |
contenttranslation check | null | use fiwiki_p;
select
t.log_user_text,
t.user_registration,
tt.max_rev_ts as last_edit,
datediff(str_to_date(tt.max_rev_ts, "%Y%m%d%H%i%S"), str_to_date(t.user_registration, "%Y%m%d%H%i%S")) as age,
t.user_editcount,
t.log_title,
t.log_comment
from (
select
l1.log_id,
l1.log_timestam... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(up_user)"]}], "runningtime": "109.08"} | null |
Twinkle users | null | USE enwiki_p;
SELECT
actor_name as `Username`,
user_editcount as `Edit count`,
user_registration as `Registration date`,
NOT(ug_group IS NULL) as `30/500`,
COUNT(*) as `Twinkle edits`,
COUNT(*)/user_editcount*100 as `RedWarn %`,
ipb_sitewide as `Currently blocked`
FROM revision_userindex
... | {"connection_id": 924961717} | null |
All female editors on German Wikipedia, sorted by user_id | null | USE dewiki_p;
SELECT
COUNT(user_name)
FROM user
JOIN user_properties ON user_properties.up_user = user.user_id
WHERE user_properties.up_value = "female"
ORDER BY user_id ASC
LIMIT 100000; | {"runningtime": "168.72", "resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}]} | null |
All female editors on German Wikipedia, sorted by user_id | null | USE dewiki_p;
SELECT
user_name,
user_registration
FROM user
JOIN user_properties ON user_properties.up_user = user.user_id
WHERE user_properties.up_value = "female"
ORDER BY user_registration DESC
LIMIT 100000; | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(up_user)"]}], "runningtime": "207.95"} | null |
All female editors on German Wikipedia, sorted by user_id | null | USE dewiki_p;
SELECT
user_name,
user_registration
FROM user
JOIN user_properties ON user_properties.up_user = user.user_id
WHERE user_properties.up_value = "female"
ORDER BY user_registration DESC
LIMIT 100000; | {"runningtime": "138.44", "resultsets": [{"headers": ["COUNT(up_user)"], "rowcount": 1}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 98, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}], "runningtime": "125.15"} | null |
Total bots on enwiki_p | Shows current and former. | USE enwiki_p;
SELECT COUNT(ug_user)
FROM user_groups
WHERE ug_group = 'bot';
SELECT COUNT(ufg_user)
FROM user_former_groups
WHERE ufg_group = 'bot'; | {"connection_id": 926440361} | null |
Current registered bots on enwiki | Sorted by total edit count. | USE enwiki_p;
SELECT user_groups.ug_user, user.user_name, user.user_editcount
FROM user_groups
LEFT JOIN user on (user_groups.ug_user = user.user_id)
WHERE user_groups.ug_group = 'bot'
ORDER BY user.user_editcount DESC;
| {"runningtime": "153.75", "resultsets": [{"headers": ["COUNT(user.user_name)"], "rowcount": 1}]} | null |
Former registered bots on enwiki | Sorted by total edit count. | USE enwiki_p;
SELECT user_former_groups.ufg_user, user.user_name, user.user_editcount
FROM user_former_groups
LEFT JOIN user on (user_former_groups.ufg_user = user.user_id)
WHERE user_former_groups.ufg_group = 'bot'
ORDER BY user.user_editcount DESC;
| {"resultsets": [{"rowcount": 10, "headers": ["rank", "page_id", "page_title", "created_at", "created_by"]}], "runningtime": "0.13"} | null |
4nn1l2 contribs in Supervisory Council case talk pages | null | use fawiki_p;
select
page_title,
count(*)
from revision
join page
on rev_page = page_id
join actor
on actor_id = rev_actor
where
actor_name = '4nn1l2'
and page_namespace = 5
and page_title like 'تابلوی_اعلانات_هیئت_نظارت/دوره_%'
group by page_title
| {"resultsets": [{"rowcount": 409, "headers": ["page_title"]}], "runningtime": "4.45"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user.user_name)"]}], "runningtime": "302.96"} | null |
Two-, three-, and four-character English terms | null | use enwiktionary_p;
select page_title from categorylinks
join page on page_id = cl_from
where page_namespace = 0
and page_title NOT LIKE '%[^a-zA-Z]%'
and cl_to in ('English_lemmas', 'English_non-lemma_forms')
and char_length(page_title) in (2, 3, 4)
order by page_title asc;
| {"resultsets": [{"rowcount": 1000, "headers": ["rank", "page_title", "created_at", "created_by", "page_id", "rev_id", "rev_len"]}], "runningtime": "11.89"} | null |
Articles in a specific category with only initial revision (hrwiki) | null | -- SET @ime_kat_unos = 'Planinarstvo po godinama'; -- promijeniti naziv kategorije po želji
-- SET @ime_kat = REPLACE(@ime_kat_unos, ' ', '_');
use hrwiki_p;
SELECT DISTINCT cat_title, page.page_len, count(distinct(cl.cl_from)) as cnt -- , count( distinct(cl.cl_from))
-- staviti "--(razmak)" ispr... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "71.43"} | null |
Admins and Reasons by Count of Revision Deletions | null | #SELECT * FROM user LIMIT 5;
USE frwiki_p;
SELECT actor_name, SUBSTRING(comment_text, 1, 14) AS comment_start, count(*)
FROM logging
JOIN actor ON logging.log_actor = actor.actor_id
JOIN comment ON comment.comment_id = logging.log_comment_id
WHERE log_type="delete" AND log_action="revision" AND log_namespace IN (0, 1,... | {"resultsets": [{"rowcount": 2977827, "headers": ["ipc_rev_id", "ipc_rev_timestamp", "ipc_hex"]}], "runningtime": "18186.59"} | null |
Most common deletion summaries in 1 year | null | USE frwiki_p;
SELECT
log_comment_id,
COUNT(log_id)
FROM logging
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_timestamp > ( NOW() - INTERVAL 12 MONTH )
GROUP BY log_comment_id
ORDER BY COUNT(log_id) DESC
LIMIT 100; | {"resultsets": [{"rowcount": 363, "headers": ["dated", "All_NS_new_pages"]}], "runningtime": "10.87"} | null |
Deleted pages by deletion reason ptwiki - 2020 | null | USE frwiki_p;
SELECT
SUM(comment_text REGEXP "WP:ER#ER[0-9]+\\|") as speedy_deleted_articles,
SUM(comment_text REGEXP "WP:ER#ER20\\|") as unsuitable_articles,
SUM(comment_text REGEXP "WP:ER#ER6\\|") as spam_articles,
COUNT(*) as deleted_articles
FROM archive
LEFT JOIN logging speedy_delete ON
log_namespace =... | {"runningtime": "22.50", "resultsets": [{"headers": ["dated", "mainspace_new_pages"], "rowcount": 315}]} | null |
AfC review counts, last 7 days | null | use frwiki_p;
select count(rc_id) as reviews, actor_name,
SUM(comment_text like "%Article supprimé (ajout bandeau clôture)%") as "accept",
from recentchanges_userindex
left join actor on rc_actor = actor_id
left join comment on rc_comment_id = comment_id
where (rc_namespace = 118 or rc_namespace = 2)
and (com... | {"resultsets": [{"rowcount": 351, "headers": ["dated", "mainspace_new_pages"]}], "runningtime": "13.60"} | null |
Total admin actions per month on frwiki | Fork from https://quarry.wmflabs.org/query/5607 | USE frwiki_p;
SELECT
DATE(CONCAT(YEAR(log_timestamp), '-', MONTH(log_timestamp), '-01')) AS Month,
COUNT(log_id) AS Actions
FROM logging
WHERE log_type IN ('block', 'delete', 'import', 'merge', 'protect', 'rights')
GROUP BY Month; | {"resultsets": [{"rowcount": 196, "headers": ["substr(ar_timestamp,1,8)", "mainspace_deletions"]}], "runningtime": "2.89"} | null |
Women total, not bots, with at least 1 edit | Fork from https://quarry.wmflabs.org/query/3921 | USE frwiki_p;
SELECT COUNT(DISTINCT rev_actor) AS WomenTotal FROM revision WHERE rev_actor IN
(
SELECT user_id FROM user JOIN user_properties ON user_id=up_user WHERE
up_property = 'gender' AND up_value = 'female'
);
SELECT COUNT(DISTINCT rev_actor) AS MenTotal FROM revision WHERE rev_actor IN
(
SELECT user_... | {"resultsets": [{"rowcount": 358, "headers": ["substr(log_timestamp,1,8)", "New_users"]}], "runningtime": "3.68"} | null |
zhwiki: DISTINCT ug_group FROM user_groups | null | USE zhwiki_p;
SELECt DISTINCT ug_group
FROM user_groups
| {"resultsets": [{"rowcount": 251, "headers": ["substr(img_timestamp,1,8)", "file_uploads"]}], "runningtime": "1.85"} | null |
zhwiki: rights log | null | USE zhwiki_p;
SELECT *
FROM logging
WHERE log_type = 'rights' AND log_action = 'rights'
ORDER BY log_id DESC
LIMIT 100; | {"resultsets": [{"rowcount": 354, "headers": ["substr(log_timestamp,1,8)", "New_users"]}], "runningtime": "1.83"} | null |
Patrollers & rollbackers in frwiki | null | USE frwiki_p;
SELECT COUNT(*) AS total, SUM(IF(ug_user IS NULL, 0, 1)) AS rollbackers
FROM change_tag
JOIN recentchanges ON rc_id = ct_rc_id
JOIN actor_recentchanges ON actor_id = rc_actor
LEFT JOIN user_groups
ON ug_user = actor_user AND ug_group = 'rollbacker' AND ug_user NOT IN (SELECT ug_user FROM user_groups WHER... | {"runningtime": "0.72", "resultsets": [{"headers": ["substr(ar_timestamp,1,8)", "mainspace_deletions"], "rowcount": 2}]} | null |
Thanks for 2020 commonswiki | Most thanked people in 2019
Blame Mz7, SQL, and stwalkerster for this | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20200000000000" AND
log_timestamp <= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"rowcount": 6, "headers": ["substr(ar_timestamp,1,8)", "All_NS_deletions"]}], "runningtime": "0.81"} | null |
Most common deletion reasons on frwp - 2020 | Motif de suppression des articles indiqué en commentaire.
https://fr.wikipedia.org/wiki/Aide:Espace_de_noms | USE frwiki_p;
SELECT comment_text, COUNT(log_id) FROM logging_logindex
JOIN comment ON log_comment_id = comment_id
WHERE log_type = 'delete' AND log_action = 'delete' AND log_namespace = 0 AND log_timestamp BETWEEN "20200101" AND "20201231"
GROUP BY comment_text
ORDER BY COUNT(log_id) DESC | {"runningtime": "4.25", "resultsets": [{"headers": ["datee", "mainspace_edits"], "rowcount": 0}]} | null |
All unused files on uk.wiki by size (small files) | null | USE ukwiki_p;
#SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p
SELECT CONCAT('# [[:File:', p.page_title, ']]') AS Filename, img_width, img_height, img_size, CONCAT("[[:User:", actor_name, "]]") as uploader
FROM page p
JOIN image ON img_name = page_title
JO... | {"resultsets": [{"rowcount": 7, "headers": ["page_namespace", "page_title", "rd_title"]}, {"rowcount": 56, "headers": ["page_namespace", "page_title", "rd_title"]}, {"rowcount": 2, "headers": ["page_namespace", "page_title", "rd_title"]}, {"rowcount": 28, "headers": ["page_namespace", "page_title", "rd_title"]}], "runn... | null |
Thanks 2017-2020 frwiki | null | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20170000000000" AND
log_timestamp <= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"rowcount": 549, "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", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_ti... | null |
Non-free files used outside articles (lb.wiki) | null | USE lbwiki_p;
SELECT DISTINCT CONCAT('# [[:File:', p.page_title, ']]') FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from
INNER JOIN (imagelinks i LEFT JOIN redirect r ON i.il_from = r.rd_from) ON p.page_title = i.il_to
WHERE c.cl_to = "All_net_fräi_Medien"
AND i.il_from_namespace != 0 #Articles
AND i.il_f... | {"resultsets": [{"rowcount": 549, "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", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_ti... | null |
All non-free files on lb.wiki by size (oversized) | null | USE lbwiki_p;
#SELECT CONCAT('# [[:File:', REPLACE(REPLACE(p.page_title, '"', '**DOUBLEQUOTE**'), '_', ' '), ']]') FROM page p
SELECT CONCAT('# [[:File:', p.page_title, ']]') AS Filename, img_width, img_height, CONCAT(img_width*img_height) as pixels #, img_size
FROM page p
JOIN image ON img_name = page_title
INNER JOI... | {"resultsets": [{"rowcount": 187, "headers": ["actor_name", "count(rev_actor)"]}], "runningtime": "3.03"} | null |
User in AfD | null | USE frwiki_p;
SELECT fr_rev_user_text, count(rev_id) AS contributi
FROM page
JOIN revision
ON page_id = rev_page
AND page_namespace = 4
AND page_title LIKE "Pages_à_supprimer"
AND rev_timestamp > NOW() - INTERVAL 12 MONTH
AND rev_user > 0
AND rev_parent_id = 0 -- solo creazione di tali PdC
GROUP BY rev_user
ORDER BY co... | {"resultsets": [{"rowcount": 1784, "headers": ["actor_name", "concat(\"[[\u0c1a\u0c30\u0c4d\u0c1a:\",page_title,\"]]\")", "rev_timestamp"]}], "runningtime": "19.17"} | null |
Thanks for 2020 frwiki | Most thanked people in 2019
Blame Mz7, SQL, and stwalkerster for this | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"runningtime": "4.09", "resultsets": [{"headers": ["page_title", "cl_to", "cl_from", "cl_type", "ll_lang", "ll_title"], "rowcount": 489}]} | null |
New page reviews by month | This includes any means of marking a page as patrolled (aka reviewed), either with Page Curation, Twinkle, manually, etc. | use frwiki_p;
SELECT EXTRACT(YEAR FROM DATE_FORMAT(log_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(log_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(DISTINCT log_user) AS `unique_reviewers`,
COUNT(log_id) AS `reviews`
FROM logging
WHERE log_timestamp BETWEEN 20200101000000 ... | {"connection_id": 407477288} | null |
FR Wikipedia mobile editors sorted by number of edits since Jan2020 | null | use frwiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
change_tag,
actor
where
rev_timestamp > 20200100000000 and
ct_rev_id = rev_id and
ct_tag_id = @m... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "131.48"} | null |
FR Wikipedia mobile editors sorted by number of edits since Jan2020 | null | use enwiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
change_tag,
actor
where
rev_timestamp > 20200100000000 and
ct_rev_id = rev_id and
ct_tag_id = @m... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "97.09"} | null |
Quota di contributi verificati nella Wikipedia in italiano | Patrolled edits on the Italian Wikipedia, it.wiki, it.wikipedia.
Quota giornaliera di modifiche modificate fra le ultime modifiche (30 giorni), sul totale e sulle solo modifiche effettuate da utenti non registrati. Sono escluse modifiche segnate come bot, modifiche fuori dal namespace 0, "finte" ultime modifiche (come ... | USE itwiki_p;
SELECT GIORNO, CONTRIBUTI, PATROLLED, CONCAT(ROUND(PATROLLED * 100 / CONTRIBUTI), ' %') AS PERCENTUALE, CONCAT(ROUND(ANONIMIPATROLLED * 100 / ANONIMI), ' %') AS SoloNonRegistrati
FROM (
SELECT SUBSTR(rc_timestamp, 1, 8) AS GIORNO,
SUM(rc_user > -1) AS CONTRIBUTI,
SUM(rc_patrolled) AS PATROLLED,
S... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "193.93"} | null |
Most common thanker/thanked unordered pairs | null | USE frwiki_p;
SELECT LEAST(REPLACE(log_title,'_',' '),log_user_text), GREATEST(REPLACE(log_title,'_',' '), log_user_text), COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY 1, 2
ORDER BY 3 DESC
LIMIT 100; | {"runningtime": "70.25", "resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}]} | null |
Thanks stats on fr wp per month | null | use frwiki_p;
select count(*) as 'total thanks number'
from logging
where log_type = 'thanks';
select substring(log_timestamp, 1, 8) as 'day', count(*) as 'thanks count'
from logging
where log_type = 'thanks'
group by 1
order by 1 asc; | {"runningtime": "126.67", "resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}]} | null |
Query to get the Top 100 users who were most thanked | This is a query to get the Top 10 users who were most thanked for GCI task. | use frwiki_p;
select log_title, COUNT(log_title)
from logging
where log_type='thanks' AND
log_timestamp >= "20200000000000" AND
log_timestamp <= "20210000000000"
GROUP by log_title
ORDER by COUNT(log_title) DESC
limit 100 | {"runningtime": "917.16", "resultsets": [{"headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"], "rowcount": 5}, {"headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"], "rowcount": 5}, {"headers": ["u... | null |
Query to get Top 10 Most thanked in frwiki_p | This query is to get Top 10 Most thanked in enwiki_p for Google Code-In. | use frwiki_p;
select actor, COUNT(log_user_text)
from logging
where log_type='thanks'
GROUP by log_user_text
ORDER by COUNT(log_user_text) DESC
limit 10 | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "112.78"} | null |
Sample usage of thanks stats | This query is a simple of the usage of the Thanks tables. It simply fetches, for each recorded "thanks entry", the user that has performed the action, the destination and when it was done.
It's then possible to edit this sample query to conduct further data analysis simply by editing the SQL code just below. | use frwiki_p;
select WEEKDAY(log_timestamp) as 'timestamp', log_user_text as 'from', log_title as 'to'
from logging
where log_type='thanks'
limit 1000 | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "267.01"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 106, "headers": ["up_user", "up_value", "user_registration", "user_name"]}], "runningtime": "0.83"} | null |
List of template with excessive fair use images (arwiki) | null | USE arwiki_p;
SELECT pagetitle, cnt FROM
(
SELECT concat('* [[قالب:', p.page_title, ']]') as pagetitle, count(*) AS cnt
FROM page p
INNER JOIN imagelinks i ON i.il_from = p.page_id
AND i.il_from_namespace = 10
INNER JOIN page i_p ON i.il_to = i_p.page_title AND 1 <> p.page_is_redirect
INNER JOIN categorylinks ... | {"connection_id": 930080428} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 1403, "headers": ["page_title", "page_is_redirect"]}], "runningtime": "7.10"} | null |
Archived discussions | null | USE dewiki_p;
SELECT page_title
FROM page
WHERE page_namespace = 1 AND NOT page_is_redirect AND page_title LIKE '%/Archiv%' | {"runningtime": "85.46", "resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 9}]} | null |
সবচেয়ে বেশি ব্যবহৃত টেমপ্লেট যেগুলো সুরক্ষিত নয় | null | use bnwiki_p;
select page_title from page
where (select count(*) from templatelinks where tl_title = page_title and tl_namespace = 10) > 5000
and (select count(*) from page_restrictions where pr_page = page_id) = 0
and page_namespace = 10
and page_is_redirect = 0
; | {"resultsets": [{"rowcount": 15, "headers": ["page_title"]}], "runningtime": "3.62"} | null |
List all pages redirects on Wikipedia Portuguese | List all pages redirects on Wikipedia Portuguese | USE ptwiki_p;
select page_title from
page
inner join redirect on page_id = rd_from; | {"runningtime": "424.96", "resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}]} | null |
// | null | use enwiki_p; select page_namespace, page_title from page where page_title regexp "\/\/"; | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "295.77"} | null |
// | null | use enwiki_p; select page_namespace, page_title from page where page_title regexp "\/\/"; | {"runningtime": "220.49", "resultsets": [{"headers": ["COUNT(user_registration)"], "rowcount": 1}]} | null |
new draftspace redirects not categorised as "from move" | categorisation subquery does not seem to work reliably | use enwiki_p; select page_title, rd_title, page_touched from page inner join redirect on page_id = rd_from where page_namespace = 118 and page_is_new = 1 and page_id not in (select cl_from from categorylinks where cl_to = "Redirects_from_moves"); | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "163.51"} | null |
How many articles link to dab pages (bs.wiki) | null | USE bswiki_p;
SELECT pl_title, count(pl_from) as cnt
FROM pagelinks, page, categorylinks
WHERE pl_from_namespace = 0
AND pl_namespace = 0
AND pl_title=page_title
AND cl_from=page_id
AND cl_to='Čvor_članci'
GROUP BY pl_title
ORDER BY cnt desc
LIMIT 444; | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(user_registration)"]}], "runningtime": "12.21"} | null |
Commons uploads per month | Number of currently existing files per month of newest file revision
see also https://quarry.wmflabs.org/query/50001 | USE commonswiki_p;
SELECT CONCAT(LEFT(img_timestamp, 4), "-", SUBSTR(img_timestamp, 5, 2)) as `month`, COUNT(*)
FROM image
GROUP BY LEFT(img_timestamp, 6) | {"resultsets": [{"rowcount": 1539, "headers": ["page_title", "cl_to", "cl_from", "cl_type", "ll_lang", "ll_title"]}], "runningtime": "11.32"} | null |
Thanks for 2020 frwiki per user | null | USE frwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20200000000000" AND
log_timestamp <= "20210000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"rowcount": 1, "headers": ["ss_total_edits"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}, {"rowcount": 820, "headers": ["userid", "name", "editcount", "admin", "bot"]}], "runningtime": "11.96"} | null |
Maithili Wikipedia Women Edit-a-thon 2021 | null | USE maiwiki_p;
SELECT rc_title
FROM recentchanges
WHERE rc_namespace = 0
AND rc_new = 1
AND 20210308000000 <= rc_timestamp
AND rc_timestamp <= 20210321235959; | {"resultsets": [{"rowcount": 389, "headers": ["user_name", "user_editcount", "user_registration"]}], "runningtime": "1.07"} | null |
Special:WantedCategories replica | Cats in red linked categories | SELECT
page_title,
cl_to
FROM page
JOIN
(SELECT DISTINCT
cl_to , cl_from
FROM categorylinks
LEFT JOIN page
ON cl_to = page_title
AND page_namespace = 14
WHERE page_title IS NULL
AND cl_to <> "Wikipedians_with_red-linked_categories_on_their_user_page"
AND cl_to <> "Wikipedians_with_red-l... | {"connection_id": 413208019} | enwiki_p |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 37179, "headers": ["actor_name", "concat(\"[[\u0c1a\u0c30\u0c4d\u0c1a:\",page_title,\"]]\")", "Edit_Date"]}], "runningtime": "362.13"} | commonswiki_p |
nlwiki_p Red links that appear to have a namespace prefix | ~2-6 min | SELECT fp.page_namespace AS fns, fp.page_title AS ft, pl_namespace AS tns, pl_title AS tt, MIN(rev_timestamp)
FROM pagelinks, page fp, revision
WHERE
pl_namespace=0 AND
pl_title REGEXP '^[A-Z][a-z]{2,}([_\\-][a-z]+)?:[^_]' AND
NOT EXISTS (SELECT * FROM page tp WHERE tp.page_namespace=pl_namespace AND tp.page_t... | {"connection_id": 934324276} | nlwiki_p |
Label/description/alias stats for Bengali | Since the migration away from wb_terms, and since the Grafana dashboard which previously displayed these stats is broke, the only way to get semi-immediate statistics on these is for a single language at a time. (There are pages, such as https://wikidata-analytics.wmcloud.org/app/WD_LanguagesLandscape and https://www.w... | SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_i... | {"resultsets": [{"rowcount": 53, "headers": ["page_title"]}], "runningtime": "10.40"} | wikidatawiki_p |
find invalid ISO:3166-2 codes (commons) | queries table geo-tags for non matching pairs of iso:3166-1 and iso:3166-2 codes, namespace 0, 6, 14 only. | # ISO status 2020-03-02
# last change MK, ZA, ...
select gt_lat, gt_lon, gt_page_id, gt_name,
(select page_namespace from page where page_id = gt_page_id) as ns,
(select page_title from page where page_id = gt_page_id) as title,
gt_country,gt_region from geo_tags where gt_country not in
( 'XA', 'XI', 'XN', 'XO', 'XP', ... | {"resultsets": [{"rowcount": 53, "headers": ["page_namespace", "page_title"]}], "runningtime": "4.72"} | commonswiki_p |
ruwiki: count article titles ending with ? ! . ... … " » | It can be used on 404 page (MediaWiki:Noarticletext), when the user has clicked on a link without ending character, checking its existense with #ifexist and advising him to follow the link. Article titles ending with "." are here: https://quarry.wmflabs.org/query/16258. | select
case
when right(page_title, 3) = "..." or right(page_title, 3) = "…" then right(page_title, 3)
when right(page_title, 2) = "»" then right(page_title, 2)
else right(page_title, 1)
end
as "Last character(s)",
if(page_is_redirect, "yes", "no") as "Is redirect",
count(*) as "C... | {"resultsets": [{"rowcount": 28, "headers": ["page_namespace", "page_title"]}], "runningtime": "8.16"} | ruwiki_p |
Malayalam Wikidata stats temp | null | SELECT
wby_name as term_type,
term_language,
terms
FROM (
SELECT
wbtl_type_id as term_type_id,
wbxl_language as term_language,
count(*) as terms
FROM wbt_item_terms
INNER JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_i... | {"resultsets": [{"rowcount": 123, "headers": ["page_title"]}], "runningtime": "52.86"} | wikidatawiki_p |
Gender Gap on Participants by Main Wikipedia | null | select enwiki_p.user_properties.up_value as 'gender', count(*) as 'number' from enwiki_p.user_properties where enwiki_p.user_properties.up_property = 'gender' group by enwiki_p.user_properties.up_value | {"resultsets": [{"rowcount": 1, "headers": ["Gender", "admins"]}], "runningtime": "0.87"} | enwiki |
Main pl.wiki query | null | #RESULTSET_1
USE plwiki_p;
SELECT CONCAT("# [[Dyskusja:",p1.page_title,"]]") AS page_title
FROM page AS p1
WHERE p1.page_title NOT LIKE '%/%'
AND p1.page_namespace = 1
AND NOT EXISTS (SELECT 1
FROM page AS p2
WHERE p2.page_namespace = 0
AND p1.page_title = p2.page_title);
#RESULTSET_3
USE plwiki_p;
SELECT concat("# [[D... | {"resultsets": [{"rowcount": 2, "headers": ["Gender", "admins"]}], "runningtime": "0.88"} | plwiki_p |
Externe Links mit Nicht-Buchstaben am Ende | null | USE dewiki_p;
select DISTINCT CONCAT('[[', CONCAT(IF(page_namespace = 10, 'Vorlage:', ''), REPLACE(page_title, '_', ' ')), ']]') AS "Artikel",
el_to AS "Verlinkt nach"
FROM externallinks STRAIGHT_JOIN page
WHERE page_id = el_from
AND page_namespace = 0
AND el_to NOT REGEXP '[a-zA-Z0-9/]$'
ORDER BY el_t... | {"resultsets": [{"rowcount": 1, "headers": ["Gender", "admins"]}], "runningtime": "0.67"} | dewiki_p |
plwikitionary backlinks | null | USE plwiktionary_p;
SELECT
pl_title AS title,
COUNT(*) AS backlinks
FROM
pagelinks
WHERE
pl_from_namespace = 0 AND
pl_namespace = 0
GROUP BY
pl_title
ORDER BY
backlinks DESC,
title
| {"resultsets": [{"rowcount": 2, "headers": ["Gender", "admins"]}], "runningtime": "0.70"} | plwiktionary_p |
All editors on German Wikipedia by registration date 2019+, 100+ edits 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 > "20210101000000"
GROUP BY edit_username
) AS ... | {"resultsets": [{"rowcount": 5170, "headers": ["user_name", "user_editcount", "user_registration"]}], "runningtime": "40.06"} | dewiki_p |
ORES data on IP edits on fawiki | null | select
oresc_rev,
oresm_name,
oresc_probability,
oresc_is_predicted,
rc_title,
rc_namespace,
rc_actor,
actor_name
from ores_classification
join ores_model
on oresm_id = oresc_model
join recentchanges
on rc_this_oldid = oresc_rev
and rc_source = 'mw.edit'
join actor_revision
on actor_id = rc_acto... | {"resultsets": [{"rowcount": 111, "headers": ["page_title"]}], "runningtime": "3.97"} | fawiki_p |
ORES data on IP edits on enwiki | null | select
oresc_rev,
oresm_name,
oresc_probability,
oresc_is_predicted,
rc_title,
rc_namespace,
rc_actor,
actor_name
from ores_classification
join ores_model
on oresm_id = oresc_model
join recentchanges
on rc_this_oldid = oresc_rev
and rc_source = 'mw.edit'
join actor_revision
on actor_id = rc_acto... | {"runningtime": "0.25", "resultsets": [{"headers": ["Datee", "count(substr(rev_timestamp, 1, 4))"], "rowcount": 25}]} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.