title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Wikis linked to a given QID | null | SELECT CONCAT('Q', ips_item_id) AS item,
ips_site_page,
ips_site_id
FROM wb_items_per_site
WHERE ips_item_id = 1353202 | {"resultsets": [{"headers": ["Cat", "File"], "rowcount": 1127}], "runningtime": "43.90"} | wikidatawiki_p |
Latest revisions | null | SELECT rev_timestamp,
actor_name
FROM revision
JOIN actor ON rev_actor = actor_id
ORDER BY rev_timestamp DESC
LIMIT 10 | {"resultsets": [{"headers": ["page_title"], "rowcount": 3}], "runningtime": "0.29"} | eswiki_p |
Wikis and categories in a Wikipedia language edition whose title contain the string Peru and are not related to a Wikidata item sorted by content length | null | SELECT (
CASE
WHEN page_namespace = 0 THEN CONCAT("https://es.wikipedia.org/wiki/", page_title)
WHEN page_namespace = 14 THEN CONCAT("https://es.wikipedia.org/wiki/Categoría:", page_title)
END
) AS url,
page_len
FROM page
WHERE page_namespace IN (0, 14)
AND page_is_redirect = 0
AND page_title REGEXP ... | {"connection_id": 23987668} | eswiki_p |
WLM in Sweden participants (all editions, number of files) | People who have uploaded images during WLM in Sweden | SELECT actor_name, count(rev_page) as no_files
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2021_in_Sweden",
"Images_from_Wiki_Loves_Monuments_2020_in_Sweden",
"I... | {"resultsets": [{"headers": ["actor_name", "c"], "rowcount": 13}], "runningtime": "0.12"} | commonswiki_p |
WLM Sweden participants with number of files by edition | People who have uploaded images during WLM in Sweden | SELECT count(rev_page) as no_files, cl_to, actor_name
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2021_in_Sweden",
"Images_from_Wiki_Loves_Monuments_2020_in_Sweden... | {"resultsets": [{"headers": ["actor_name", "c"], "rowcount": 341}], "runningtime": "26.89"} | commonswiki_p |
WLM Sweden participants with number of editions they participated in | People who have uploaded images during WLM in Sweden | SELECT actor_name, count(DISTINCT cl_to) as edition_count
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Monuments_2021_in_Sweden",
"Images_from_Wiki_Loves_Monuments_2020_in_Sw... | {"resultsets": [{"headers": ["actor_name", "c"], "rowcount": 62}], "runningtime": "0.21"} | commonswiki_p |
Quantidade de categorias com poucas páginas | Quantas categorias estão vazias (ZERO), quantas têm apenas uma página (UMA_PÁG), quantas têm entre 2 e 5 (ENTRE2E5), e assim por diante. As categorias com nome começados por "!" foram excluídas. | SELECT
SUM(cat_pages = 0) ZERO,
SUM(cat_pages = 1) UMA_PÁG,
SUM(cat_pages BETWEEN 2 AND 5) ENTRE2E5,
SUM(cat_pages BETWEEN 6 AND 10) ENTRE6E10,
SUM(cat_pages BETWEEN 11 AND 20) ENTRE11E20,
SUM(cat_pages > 20) MAIORQUE20
FROM category
WHERE cat_title NOT LIKE '!%'; | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "rev_timestamp"], "rowcount": 1}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pp_propname"], "r... | ptwiki_p |
Get properties of a page given its ID in a Wikipedia language edition | null | SELECT *
FROM page_props JOIN page ON page_id = pp_page
WHERE page_id = 3242294 | {"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 797}], "runningtime": "6.54"} | enwiki_p |
thwiki editors with between 500-999 mobile edits since Jan2020 | null | 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 = @mobile_edit_tag ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 3}], "runningtime": "0.29"} | thwiki_p |
thwiki editors with between 100 and 499 content translation edits since 1Jan2020 | null | set @cx_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
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
rev_actor = actor_id
group by
... | {"resultsets": [{"headers": ["date", "pages"], "rowcount": 480}], "runningtime": "192.24"} | thwiki_p |
swear words in usernames? | null | SELECT user_name FROM user WHERE user_name LIKE '%fuck%' | {"resultsets": [{"headers": ["page_title", "page_namespace", "el_to"], "rowcount": 47}], "runningtime": "2.37"} | enwiki_p |
last edit by editor? 2 | null | DESCRIBE revision_userindex;
#SELECT actor_id
#FROM actor
#WHERE actor_name = "JPxG";
# 1195985
#SELECT COUNT(*)
#FROM revision
#WHERE rev_actor = 1195985; | {"resultsets": [{"headers": ["page_title", "page_namespace", "el_to"], "rowcount": 116}], "runningtime": "0.93"} | enwiki_p |
Get timestamp of editor's most recent edit (only checks last 30 days) | Credit to [[en:User:JPxG]] for the original code | SELECT MAX(rc_timestamp)
FROM recentchanges_userindex
INNER JOIN actor_revision
ON actor_revision.actor_id = recentchanges_userindex.rc_actor
WHERE actor_name = "JPxG"; | {"resultsets": [], "runningtime": "0.03"} | enwiki |
Get timestamp of editor's most recent edit (only checks last 30 days) | Credit to [[en:User:JPxG]] for the original code | SELECT MAX(rc_timestamp)
FROM recentchanges_userindex
INNER JOIN actor_revision
ON actor_revision.actor_id = recentchanges_userindex.rc_actor
WHERE actor_name = "209.129.224.22"; | {"resultsets": [{"headers": ["rank", "actor_name", "manual_accept_count"], "rowcount": 317}], "runningtime": "2.04"} | enwiki |
german public broadcaster links | null | USE enwiki_p;
SELECT externallinks.el_from, externallinks.el_to, externallinks.el_index, page.page_id, page.page_title
FROM externallinks, page WHERE externallinks.el_from = page.page_id;
where REPLACE(REPLACE(el_index, 'https://', ''), 'http://', '') LIKE 'de.ndr.%'
LIMIT 10 | {"connection_id": 43178136} | enwiki_p |
Search all revisions with #WPWP tag | null | SELECT rev_page,rev_id,comment_text
from revision
#join page on rev_page=page_id
join comment on rev_comment_id=comment_id
where comment_text LIKE '%WPWP%'
and rev_minor_edit=0
and rev_timestamp>20210429110750
#and page_namespace=0
#and page_is_redirect=0 | {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 109}], "runningtime": "0.21"} | itwiki_p |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (). | 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": ["cat_subcats"], "rowcount": 1}], "runningtime": "0.08"} | eswiki |
abbrev and meta/abbr subpage transclusions | null | SELECT CONCAT("Template:", page_title), COUNT(tl_from)
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE
page_namespace = 10
AND (
page_title LIKE "%/meta/abbr"
OR page_title LIKE "%/abbrev"
)
GROUP BY page_id
ORDER BY COUNT(tl_from) DESC | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 0}], "runningtime": "2.89"} | enwiki_p |
Tracking #SheSaid hashtags on Italian Wikiquote from Oct 1st 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM itwikiquote_p.revision R
JOIN itwikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN itwikiquote_p.page P ON R.rev_page=P.page_id
JOIN itwikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"resultsets": [{"headers": ["rev_id", "prev_rev_id", "rev_len", "prev_rev_len", "diff"], "rowcount": 4268}], "runningtime": "6.94"} | itwikiquote_p |
Tracking #SheSaid hashtags on Ukrainian Wikiquote from Oct 1st 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM ukwikiquote_p.revision R
JOIN ukwikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN ukwikiquote_p.page P ON R.rev_page=P.page_id
JOIN ukwikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"resultsets": [{"headers": ["rev_id", "prev_rev_id", "rev_len", "prev_rev_len", "diff"], "rowcount": 4268}], "runningtime": "6.37"} | ukwikiquote_p |
District, titles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%$_District,$_%' ESCAPE '$')
| {"resultsets": [{"headers": ["timestamp", "Average edit difference"], "rowcount": 4268}], "runningtime": "6.56"} | enwiki_p |
Wikiquote | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM enwikiquote_p.revision R
JOIN enwikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN enwikiquote_p.page P ON R.rev_page=P.page_id
JOIN enwikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"resultsets": [{"headers": ["actor_name", "Zero edits"], "rowcount": 201}], "runningtime": "0.54"} | enwikiquote_p |
FAs linked from open CCIs | null | SELECT CONCAT("[[", fal.pl_title, "]]"), GROUP_CONCAT(CONCAT("[[WP:", cci.page_title, "]]") SEPARATOR ', ')
FROM page cci
JOIN pagelinks ccip ON ccip.pl_title = cci.page_title AND ccip.pl_namespace = cci.page_namespace
JOIN pagelinks fal ON cci.page_id = fal.pl_from
JOIN page fa ON fa.page_title = fal.pl_title AND fa.p... | {"resultsets": [{"headers": ["CSI", "SE", "W&W"], "rowcount": 1}], "runningtime": "0.18"} | enwiki_p |
GAs linked from open CCIs | null | SELECT CONCAT("[[", fal.pl_title, "]]"), GROUP_CONCAT(CONCAT("[[WP:", cci.page_title, "]]") SEPARATOR ', ')
FROM page cci
JOIN pagelinks ccip ON ccip.pl_title = cci.page_title AND ccip.pl_namespace = cci.page_namespace
JOIN pagelinks fal ON cci.page_id = fal.pl_from
JOIN page fa ON fa.page_title = fal.pl_title AND fa.p... | {"resultsets": [{"headers": ["concat(\"#[[:\u09ac\u09bf\u09b7\u09df\u09b6\u09cd\u09b0\u09c7\u09a3\u09c0 \u0986\u09b2\u09cb\u099a\u09a8\u09be:\",page_title,\"]]\")"], "rowcount": 0}], "runningtime": "0.06"} | enwiki_p |
বাংলা উইকিসংকলনের সকল নির্ঘণ্ট পাতা | damn this "enter the db name here..." box... | select page_title
from page
where page_namespace = 102; | {"resultsets": [{"headers": ["Title"], "rowcount": 0}], "runningtime": "0.07"} | bnwikisource_p |
কমন্সের বিষয়শ্রেণীতে কি কি ফাইল আছে | damn this "enter the db name here..." box... | select page_title
from page
join categorylinks on cl_from = page_id
where cl_to = 'Bengali_scanned_books_by_Rabindranath_Tagore'
and page_namespace=6; | {"resultsets": [{"headers": ["actor_name", "count(log_actor)"], "rowcount": 12}], "runningtime": "1.54"} | commonswiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("{{U|",actor_name,"}}") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestamp <= 30191231235... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 78}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 13}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 18}], "runningtime": "1.08"} | bnwiki_p |
মোট সম্পাদনার সংখ্যা | ১ এপ্রিল ২০২০। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে HTML ক্লিক করুন। | USE bnwiki_p;
SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)"
ORDER BY user_editcount DESC... | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 10}], "runningtime": "11.57"} | bnwiki_p |
zhwiki: T295518 voting | null | SELECT user_name, ug1.ug_group, log_timestamp, ipb_id, ipb_expiry
FROM user_groups AS ug1
LEFT JOIN user ON ug1.ug_user = user_id
LEFT JOIN ipblocks ON user_id = ipb_user
LEFT JOIN actor ON user_id = actor_user
LEFT JOIN user_groups AS ug2 ON ug1.ug_user = ug2.ug_user AND ug2.ug_group = 'bot'
LEFT JOIN (
SELECT log_a... | {"resultsets": [{"headers": ["ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_auto", "ipb_anon_only", "ipb_create_account", "ipb_expiry", "ipb_range_start", "ipb_range_end", "ipb_enable_autoblock", "ipb_deleted", "ipb_block_email", "ipb_by_actor", "ipb_allow_usertalk", "ipb_parent_block_id", ... | zhwiki_p |
Number of blocks of distinct IP addresses | null | select
count(distinct(ipb_address)) as n_distinct_addresses
from
ipblocks
where
ipb_address != ''
and ipb_range_start = ipb_range_end
; | {"resultsets": [{"headers": ["rank", "actor_name", "manual_accept_count"], "rowcount": 315}], "runningtime": "1.20"} | dewiki |
CfDs on Commons needing review | null | USE commonswiki_p;
(SELECT CONCAT ('# [[:Category:', REPLACE (page_title,'_',' '), ']] → has CfD cat but tag is missing or possibly malformed') AS catlist FROM page
INNER JOIN categorylinks ON cl_from = page_id AND cl_to LIKE 'CfD_%'
WHERE page_namespace = 14 AND page_is_redirect = 0
AND NOT EXISTS (SELECT 1 FROM templ... | {"resultsets": [{"headers": ["user_id", "user_name", "ug_group"], "rowcount": 100}], "runningtime": "0.22"} | commonswiki_p |
Skin usage in thwikiquote | null | SELECT up_value, COUNT(*)
FROM user_properties_anon
WHERE up_property = "skin"
GROUP BY up_value | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 10}], "runningtime": "0.10"} | thwikiquote_p |
Skin usage in small | null | SELECT up_value, COUNT(*)
FROM user_properties_anon
WHERE up_property = "skin"
GROUP BY up_value | {"resultsets": [{"headers": ["page_title", "rev_id", "'https//he.wikipedia.org/w/index.php?diff=' + cast(revs.rev_id as varchar(20))", "rev_timestamp", "removed"], "rowcount": 25}], "runningtime": "155.18"} | itwiktionary_p |
Skin usage in thwiki | null | SELECT up_value, COUNT(*)
FROM user_properties_anon
WHERE up_property = "skin"
AND upa_touched > SUBDATE(NOW(), INTERVAL 1 YEAR)
GROUP BY up_value | {"resultsets": [{"headers": ["tl_title"], "rowcount": 93}], "runningtime": "2015.68"} | thwiki_p |
Skin usage in commonswiki | null | SELECT up_value, COUNT(*)
FROM user_properties_anon
WHERE up_property = "skin"
AND upa_touched > SUBDATE(NOW(), INTERVAL 1 YEAR)
GROUP BY up_value | {"resultsets": [{"headers": ["page_title", "length_in_bytes"], "rowcount": 20}], "runningtime": "0.16"} | commonswiki_p |
Skin usage in thwiktionary | null | SELECT up_value, COUNT(*)
FROM user_properties_anon
WHERE up_property = "skin"
AND upa_touched > SUBDATE(NOW(), INTERVAL 1 YEAR)
GROUP BY up_value | {"resultsets": [{"headers": ["comment_text"], "rowcount": 100}], "runningtime": "19.59"} | thwiktionary_p |
Top Guarani Wikipedia editors | null | SELECT actor_name, edits
FROM (
SELECT revactor_actor, COUNT(*) AS edits
FROM revision_actor_temp
GROUP BY revactor_actor
) AS actors
JOIN actor ON revactor_actor = actor_id
ORDER BY edits DESC
LIMIT 50; | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 365}], "runningtime": "0.62"} | gnwiki_p |
try to count distinct edit summaries(?) | null | #SELECT MAX(rev_timestamp)
#FROM revision_userindex
#INNER JOIN actor_revision
#ON actor_revision.actor_id = revision_userindex.rev_actor
#WHERE actor_name = "Jake";
#SELECT actor_id
#FROM actor
#WHERE actor_name = "MediaWiki message delivery";
# 68199
SELECT COUNT(*)
FROM revision
WHERE rev_actor = 68199; | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "page_title", "page_id", "rev_id", "rev_page", "rev_actor", "actor_id", "actor_user", "actor_name"], "rowcount": 138}], "runningtime": "1.29"} | enwiki |
try to count distinct edit summaries(?) | null | #SELECT MAX(rev_timestamp)
#FROM revision_userindex
#INNER JOIN actor_revision
#ON actor_revision.actor_id = revision_userindex.rev_actor
#WHERE actor_name = "Jake";
#SELECT actor_id
#FROM actor
#WHERE actor_name = "MediaWiki message delivery";
# 68199
SELECT DISTINCT comment_text, rev_timestamp
FROM revision
INNER J... | {"resultsets": [{"headers": ["page_id"], "rowcount": 16}], "runningtime": "2.52"} | enwiki |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("{{U|",actor_name,"}}") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestamp <= 30191231235... | {"resultsets": [{"headers": ["substr(img_timestamp,1,4)", "file_uploads"], "rowcount": 19}], "runningtime": "0.14"} | bnwiki_p |
List of tables in Quarry enwiki database | null | SHOW TABLES; | {"resultsets": [{"headers": ["CONCAT('# [[\u0986\u09b2\u09be\u09aa:',page_title,']]')"], "rowcount": 1000}], "runningtime": "1.58"} | enwiki |
german public broadcaster links | null | USE enwiki_p;
SELECT externallinks.el_to, externallinks.el_index, page.page_title
FROM page
INNER JOIN externallinks ON page.page_id=externallinks.el_from
where el_index LIKE '%://de.ndr.%'
or el_index LIKE '%://de.3sat.%'
or el_index LIKE '%://de.n-joy.%'
or el_index LIKE '%://de.radiobremen.de.%'
or el_index LIKE '%:... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 0}], "runningtime": "25.88"} | enwiki_p |
crap | Faster query for JPxG | SELECT DISTINCT comment_text
FROM revision_userindex
INNER JOIN comment_revision ON comment_revision.comment_id = revision_userindex.rev_comment_id
WHERE rev_actor = 68199; | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"], "rowcount": 0}], "runningtime": "0.06"} | enwiki |
LTA2 | null | SET
STATEMENT max_statement_time = 60 FOR
SELECT
DISTINCT actor_name,
ipb_address,
comment_text,
ipb_timestamp
FROM
ipblocks
INNER JOIN actor ON (ipblocks.ipb_by_actor = actor.actor_id)
INNER JOIN comment ON (ipblocks.ipb_reason_id = comment.comment_id)
WHERE
TRUE
AND ipb_user > 0 -- exclude IPs
A... | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 91}], "runningtime": "0.38"} | enwiki_p |
Find titles ending in ; | Find titles ending in ; | SELECT *
FROM page
WHERE page_namespace IN (0,2,4,6,8,10,12,14,100,828,446,2300,2302)
AND page_title REGEXP ';$' | {"resultsets": [{"headers": ["page_title"], "rowcount": 87671}], "runningtime": "134.67"} | elwikisource_p |
Pretty-ref tool usage on plwiki | null | select rev_timestamp, rev_id, actor_name, comment_text
from revision inner join comment on comment_id = rev_comment_id inner join actor on actor_id = rev_actor
where comment_text like "%przeniesienie refów na koniec%"
order by rev_timestamp desc
limit 50; | {"resultsets": [{"headers": ["substring(page_title, 0, length(page_title)-7)", "page_title"], "rowcount": 3}], "runningtime": "0.07"} | plwiki_p |
spaced dash two-part titles | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%$_–$_%' ESCAPE '$')
and not (page_title like '%$_Doubles%' ESCAPE '$')
and not (page_title like '%$_Singles%' ESCAPE '$')
| {"resultsets": [{"headers": ["tl_title", "backlinks", "from_main", "page_exists", "page_is_redirect"], "rowcount": 66}], "runningtime": "0.53"} | enwiki_p |
Get list of users in a global permissions group (e.g. staff, sysadmins) | null | -- The MediaWiki extension CentralAuth provides the extra database tables used for global groups. And it also has its own database.
SELECT gu_name
FROM globaluser
JOIN global_user_groups ON gug_user = gu_id
WHERE gug_group = 'staff'
ORDER BY gu_name ASC; | {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 96}], "runningtime": "3.25"} | centralauth |
All user categories | null | select concat("Category:",page_title),page_len,cat_pages,cat_subcats from page
join revision on rev_page=page_id and rev_parent_id=0
join category on cat_title=page_title
where page_namespace=14
and not exists (select 1 from categorylinks where cl_from=page_id and cl_to="Wikipedia_soft_redirected_categories")
order ... | {"resultsets": [{"headers": ["log_timestamp", "log_title", "log_comment_id", "log_action", "log_actor", "comment_text"], "rowcount": 586284}], "runningtime": "894.67"} | enwiki |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("{{U|",actor_name,"}}") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestamp <= 30191231235... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | bnwiki_p |
CKB YearStats 01 | null | SELECT COUNT(user_name)
FROM user
WHERE user_registration BETWEEN concat(year(now())-1,"0101000000") AND concat(year(now())-1,"1231235959"); | {"resultsets": [{"headers": ["img_name", "img_size", "img_width", "img_height", "img_metadata", "img_bits", "img_media_type", "img_major_mime", "img_minor_mime", "img_description_id", "img_actor", "img_timestamp", "img_sha1"], "rowcount": 52}], "runningtime": "5.28"} | ckbwiki |
Table Tennis with en dash | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (
(page_title like '%_–_%')
)
and (
(page_title like '%Table_Tennis%')
or (page_title like 'Table_tennis%')
)
| {"resultsets": [{"headers": ["user", "img_count"], "rowcount": 97}], "runningtime": "4.84"} | enwiki_p |
Singles capped after dash | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (page_title like '%_–_%_Singles')
| {"resultsets": [{"headers": ["cat", "#p", "articles"], "rowcount": 275}], "runningtime": "0.53"} | enwiki_p |
Award with en dash | null | select page_title from page where page_namespace=0
and page_is_redirect=0
and (
(page_title like '%$_–$_%' ESCAPE '$')
)
and (
(page_title like '%Award%')
or (page_title like '%award%')
)
| {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 100}], "runningtime": "0.20"} | enwiki_p |
Sysops on enwiki | null | SELECT user.user_name
FROM user_groups
INNER JOIN user ON user.user_id = user_groups.ug_user
WHERE user_groups.ug_group = "sysop" | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New SX sections", "New non-CX articles"], "rowcount": 1}], "runningtime": "0.23"} | enwiki |
current admins who held autopatrol before ~2011 | null | SELECT user_name
FROM user
JOIN user_groups sysop ON sysop.ug_user = user_id
JOIN user_former_groups ON ufg_user = user_id
LEFT JOIN user_groups ap ON ap.ug_user = user_id AND ap.ug_group = "autoreviewer"
WHERE
sysop.ug_group = "sysop"
AND ufg_group = "autoreviewer"
AND ap.ug_group IS NULL | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New SX sections"], "rowcount": 1}], "runningtime": "0.18"} | enwiki_p |
current admins who held autopatrol before ~2006 | null | SELECT DISTINCT user_name
FROM logging_userindex
JOIN `user` ON log_namespace = 2 AND REPLACE(log_title, "_", " ") = user_name
JOIN user_groups sysop ON sysop.ug_user = user_id
LEFT JOIN user_groups ap ON ap.ug_user = user_id AND ap.ug_group = "autoreviewer"
WHERE
sysop.ug_group = "sysop"
AND log_type = "rights"
... | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New SX sections"], "rowcount": 1}], "runningtime": "0.19"} | enwiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-poland | null | SELECT comment_text
FROM revision_userindex r1
WHERE r1.rev_timestamp > '20211106000000'
AND comment_text LIKE 'Adding WikiProject tags' | {"resultsets": [{"headers": ["@dbname", "New CX articles", "New SX sections"], "rowcount": 1}], "runningtime": "0.16"} | enwiki |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-poland | null | SELECT page_title, comment_text
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 r1.rev_timestamp > '20211106000000'
AND commen... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 6}], "runningtime": "344.86"} | commonswiki_p |
recent edit summary search | null | SELECT rc_title,rc_timestamp,comment_text
FROM recentchanges
JOIN `comment` ON comment_id = rc_comment_id AND comment_text like "%WikiProject banners ([[WP:AFCH|AFCH]]%"
WHERE rc_timestamp > "202111060000"
ORDER BY rc_title,rc_timestamp,comment_text | {"resultsets": [{"headers": ["th\u00e0nh_vi\u00ean", "edits"], "rowcount": 100}], "runningtime": "23.94"} | enwiki |
recent edit summary search | null | SELECT rc_title,rc_timestamp,comment_text
FROM recentchanges
JOIN `comment` ON comment_id = rc_comment_id AND comment_text like "%Adding WikiProject tags using [[WP:AFCSW|AfC-submit-wizard]]%"
WHERE rc_timestamp > "202111060000"
ORDER BY rc_title,rc_timestamp,comment_text | {"resultsets": [{"headers": ["th\u00e0nh_vi\u00ean", "edits"], "rowcount": 200}], "runningtime": "24.39"} | enwiki |
Links to misspellings | null | SET STATEMENT max_statement_time = 1000 FOR
SELECT MIN(CONCAT(CASE Pf.page_namespace WHEN 10 THEN " Template:" ELSE "" END, Pf.page_title)) AS "page 1",
MAX(CONCAT(CASE Pf.page_namespace WHEN 10 THEN " Template:" ELSE "" END, Pf.page_title)) AS "page 2",
Pt.page_title AS "typo",
COUNT(*) AS "links"... | {"resultsets": [{"headers": ["th\u00e0nh_vi\u00ean", "l\u1ea7n_s\u1eeda_\u0111\u1ed5i"], "rowcount": 200}], "runningtime": "23.39"} | enwiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-panama | null | SELECT page_title, comment_text
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 ... | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"], "rowcount": 0}], "runningtime": "0.17"} | commonswiki_p |
Find titles ending in ; | Find titles ending in ; | SELECT *
FROM page
WHERE page_namespace IN (0,2,4,6,8,10,12,14,100,828,446,2300,2302)
AND page_title REGEXP ';$' | {"resultsets": [{"headers": ["page_title", "page_id"], "rowcount": 0}], "runningtime": "0.06"} | elwikisource |
Files on vi.wiki with old versions | null | #USE viwiki_p;
SELECT CONCAT("File:", oi_name)
FROM oldimage
INNER JOIN page p ON p.page_title = oi_name AND p.page_namespace = 6
INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "Hình_không_tự_do" #Non-free files
#INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "सभी_मुक्त_मीडिया" ... | {"resultsets": [{"headers": ["ug_user", "user_name", "memberships"], "rowcount": 100}], "runningtime": "0.24"} | viwiki_p |
Disambiguations & authority control on plwiki | null | select
page_title
from page
inner join templatelinks on tl_from = page_id
inner join page_props on pp_page = page_id
where
page_namespace = 0 and
tl_namespace = 10 and
tl_title = "Kontrola_autorytatywna" and
pp_propname = "disambiguation"
;
| {"resultsets": [{"headers": ["tl_title"], "rowcount": 45}], "runningtime": "1887.44"} | plwiki_p |
CTE experiment 1 | null | #WITH (select cl_from
# from categorylinks
# where categorylinks.cl_to LIKE 'Living_people')
# AS CTE1
select categorylinks.cl_from#, page.page_title, categorylinks.cl_to
from categorylinks
#inner join page on page.page_id=categorylinks.cl_from
#where categorylinks.cl_from in CTE1
#and categorylinks.cl_to LIKE 'Peop... | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 104}], "runningtime": "0.23"} | enwiki_p |
Members of WikiProject Football | null | SELECT DISTINCT user_page.page_title
FROM page user_page
JOIN templatelinks ON user_page.page_id=templatelinks.tl_from
WHERE user_page.page_namespace = 2
AND templatelinks.tl_title = 'User_WikiProject_Football' | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 10}], "runningtime": "0.09"} | enwiki |
Заливки Maksim-bot | null | SELECT CONCAT(page_title) AS page
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON page_id = rev_page
JOIN comment_revision ON rev_comment_id = comment_id
WHERE actor_name = 'Maksim-bot'
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_parent_id = 0
; | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 104}], "runningtime": "0.26"} | ruwiki_p |
Most SPI edits this year | null | SELECT actor_name, COUNT(page_id) as `edits`
FROM user_groups
JOIN actor_revision ON ug_user = actor_user
LEFT JOIN revision_userindex ON (
rev_actor = actor_id
AND rev_timestamp > "20210000000000"
)
LEFT JOIN page ON (
rev_page = page_id
AND page_namespace = 4
AND page_title LIKE "Sockpuppet_investigations/%... | {"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 2}], "runningtime": "0.09"} | enwiki_p |
Tracking #SheSaid hashtags on Catalan Wikiquote from Oct 1st 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM cawikiquote_p.revision R
JOIN cawikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN cawikiquote_p.page P ON R.rev_page=P.page_id
JOIN cawikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 0}], "runningtime": "0.08"} | cawikiquote_p |
#SheSaid on French Wikiquote from Oct 1st 2021 | null | SELECT P.page_title, P.page_namespace, A.actor_name, R.rev_timestamp, C.comment_text
FROM frwikiquote_p.revision R
JOIN frwikiquote_p.comment C ON R.rev_comment_id=C.comment_id
JOIN frwikiquote_p.page P ON R.rev_page=P.page_id
JOIN frwikiquote_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp >= 202110010... | {"resultsets": [{"headers": ["log_timestamp", "log_title", "log_comment_id", "log_action", "comment_text"], "rowcount": 10}], "runningtime": "0.11"} | frwikiquote_p |
Number of pages in the Query namespace | null | # 2021/12/07 18:15:51 -05
#
# I dream that some day SPARQL examples on Wikidata will be stored
# using structured data with properties of the style
#
# + Properties used: P31, P527, P1696, etc.
# + Entities used: Q2, Q37807168, etc.
# + Result is a: list, count, etc.
# + qualifier: "of" human, animal, computers, citi... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 65}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 10}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 16}], "runningtime": "0.28"} | wikidatawiki_p |
Articles titles ends with ... (arwiki) | null | USE arwiki_p;
SELECT CONCAT('[[', page_title, ']]') AS page_title
FROM page
WHERE page_title RLIKE 'الدولي$'
AND page_namespace = 0
AND page_is_redirect = 0 | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.69"} | arwiki |
Living people links | null | SELECT p.page_title, pl.pl_from
FROM page p
INNER JOIN categorylinks c ON p.page_id = c.cl_from
INNER JOIN pagelinks pl ON p.page_title = pl.pl_title
INNER JOIN page p2 ON p2.page_id = pl.pl_from
AND pl.pl_from_namespace = 0 and p2.page_is_redirect=0
AND c.cl_to = 'Living_people'
AND p.page_namespace = pl.pl_namespace... | {"resultsets": [{"headers": ["user_id", "user_name", "user_editcount"], "rowcount": 153}], "runningtime": "1.34"} | enwiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-uruguay | null | SELECT page_title, comment_text
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 ... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.09"} | commonswiki_p |
Search all revisions with #WPWP tag | null | SELECT rev_page,rev_id,comment_text
from revision
#join page on rev_page=page_id
join comment on rev_comment_id=comment_id
where comment_text LIKE '%citeassist%'
and rev_minor_edit=0
and rev_timestamp>20210429110750
#and page_namespace=0
#and page_is_redirect=0 | {"resultsets": [{"headers": ["noms"], "rowcount": 1}], "runningtime": "0.95"} | itwiki_p |
sysops with redundant rights | null | use enwiki_p;
SELECT user_name, ug1.ug_group
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop')
AND ug1.ug_group IN ('templateeditor', 'accountcreator', 'eventcoordinator', 'import', 'massmessage-sender', 'transwiki', 'extendedmover', 'patroller', 'extendedconfirmed', 'rev... | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["tl_title"], "rowcount": 0}, {"headers": ["page_title", "rev_timestamp"], "rowcount": 1}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pp_propname"], "r... | enwiki_p |
Los 100 usuarios que más ha usado "agradecer" en es_wiki en 2019 | Los 100 usuario que más ha usado "agradecer" en es_wiki en 2019 | SELECT CONCAT(
'https://es.wikipedia.org/wiki/Usuario:',
page_title)
FROM page
WHERE
SUBSTR(page_title,1,7) ='Userbox'
AND
page_namespace = '2'
AND
page_is_redirect = '0'
| {"resultsets": [{"headers": ["username", "noms"], "rowcount": 5050}], "runningtime": "13.03"} | eswiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-peru | null | SELECT page_title, comment_text
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 ... | {"resultsets": [{"headers": ["page_id"], "rowcount": 18}], "runningtime": "9.11"} | commonswiki_p |
The search for the first 31-hour block [enwiki] | RIP SV | SELECT log_timestamp, user_name, CONCAT("https://en.wikipedia.org/wiki/Special:Redirect/logid/", log_id) AS link
FROM logging
JOIN actor ON log_actor = actor_id
JOIN user ON actor_user = user_id
WHERE log_action = "block"
AND log_params LIKE "%31 hours%"
ORDER BY log_timestamp ASC
LIMIT 10 | {"resultsets": [{"headers": ["subdomain", "count"], "rowcount": 1416}], "runningtime": "2.76"} | enwiki_p |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["substr(log_timestamp,1,6)", "count(*)"], "rowcount": 1}], "runningtime": "4.71"} | enwiki |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"resultsets": [{"headers": ["actor_name", "total", "weekdays", "dist_days"], "rowcount": 33}], "runningtime": "350.93"} | enwiki |
ukwiki users who edited .js .css and .json page in ns 8 and 2 the most | null | SELECT
actor_name,
count(*) as revisions,
count(distinct rev_page) as distinct_pages_edited,
count(case when rev_parent_id = 0 then 1 else null end) as pages_created
FROM revision_userindex r
JOIN page ON r.rev_page = page.page_id
JOIN actor on r.rev_actor = actor.actor_id
WHERE page_namespace in (8, 2) A... | {"resultsets": [{"headers": ["Tables_in_meta_p", "Table_type"], "rowcount": 3}], "runningtime": "0.07"} | ukwiki_p |
ukwiki users who edited templates the most | null | SELECT
actor_name,
count(*) as revisions,
count(distinct rev_page) as distinct_pages_edited,
count(case when rev_parent_id = 0 then 1 else null end) as pages_created
FROM revision
JOIN page ON revision.rev_page = page.page_id
JOIN actor on revision.rev_actor = actor.actor_id
WHERE page_namespace = 10
GROU... | {"resultsets": [{"headers": ["Database"], "rowcount": 17}], "runningtime": "0.10"} | ukwiki_p |
zhwiki: T295518 voting (20211211) | null | SELECT user_name, ug1.ug_group, log_timestamp, ipb_id, ipb_expiry
FROM user_groups AS ug1
LEFT JOIN user ON ug1.ug_user = user_id
LEFT JOIN ipblocks ON user_id = ipb_user
LEFT JOIN actor ON user_id = actor_user
LEFT JOIN user_groups AS ug2 ON ug1.ug_user = ug2.ug_user AND ug2.ug_group = 'bot'
LEFT JOIN (
SELECT log_a... | {"resultsets": [{"headers": ["actor_name", "count(log_actor)"], "rowcount": 12}], "runningtime": "0.46"} | zhwiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("{{U|",actor_name,"}}") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestamp <= 30191231235... | {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 1000}], "runningtime": "1.73"} | bnwiki_p |
Links von Jahresseiten to Disambiguation pages | null | SELECT pl_from, pl_title
FROM page , categorylinks as cl1, categorylinks as cl2, pagelinks
Where cl2.cl_to = 'Begriffsklärung'
AND cl2.cl_from= page_id
AND pl_title=page_title
AND pl_from_namespace = 0
AND pl_namespace = 0
AND SUBSTRING(cl1.cl_to,1,4) = 'Jahr'
AND cl1.cl_from= pl_from
Limit 50; | {"resultsets": [{"headers": ["page_title"], "rowcount": 52}], "runningtime": "69.50"} | dewiki_p |
Wikidata user talk page links | null | SELECT
SUBSTRING_INDEX(page_title, '/', 1) AS t1,
SUBSTRING_INDEX(pl_title, '/', 1) AS t2
FROM pagelinks, page
WHERE pl_namespace = 3 AND pl_from_namespace = 3
AND page_id = pl_from AND page_title != pl_title
GROUP BY t1, t2
| {"resultsets": [{"headers": ["CONCAT('# [[\u0986\u09b2\u09be\u09aa:',page_title,']]')"], "rowcount": 2362}], "runningtime": "3.48"} | wikidatawiki |
Wikidata user talk & project talk page links | null | SELECT
SUBSTRING_INDEX(page_title, '/', 1) AS t1,
pl_from_namespace AS t1ns,
SUBSTRING_INDEX(pl_title, '/', 1) AS t2,
pl_namespace AS t2ns
FROM pagelinks, page
WHERE pl_namespace IN (3,5) AND pl_from_namespace IN (3,5)
AND page_id = pl_from AND page_title != pl_title
GROUP BY t1, t2
| {"resultsets": [{"headers": ["titolo", "is_disambigua"], "rowcount": 90008}], "runningtime": "138.44"} | wikidatawiki |
page triage status per day | null | # 0 = marked as unreviewed
# 1 = marked as reviewed
# 2 = marked as patrolled
# 3 = autopatrolled
SELECT ptrp_reviewed, count(ptrp_reviewed) AS CountOf
FROM page
INNER JOIN revision_userindex ON rev_page = page.page_id
JOIN pagetriage_page ON rev_page = ptrp_page_id
WHERE rev_parent_id = 0
AND ptrp_create... | {"resultsets": [{"headers": ["id", "title", "timestmp"], "rowcount": 2204}], "runningtime": "3.58"} | enwiki |
Redirects created to articles at AfD | This query lists pages which redirect to articles at AfD but were recently of article length. Such pages risk deletion per G8 along with the AfD candidate, losing a potentially useful history. Ps is the redirect's source page (beginning #REDIRECT); Pd is its destination (the endangered article). rfn=redirect from na... | SET STATEMENT max_statement_time = 100 FOR
SELECT Ps.page_namespace AS rfn, Ps.page_title AS redirect, Pd.page_title AS article, actor_name AS redirector, rc_timestamp
FROM templatelinks
JOIN page Pd ON Pd.page_id = tl_from
JOIN redirect ON rd_title = Pd.page_title AND rd_namespace = 0
JOIN recentchanges ON rc_cur_id =... | {"resultsets": [{"headers": ["reviews", "rc_title", "accepted", "accept %", "declined", "decline %"], "rowcount": 1183}], "runningtime": "7.45"} | enwiki_p |
ریاضیاتی | null | select concat ('*[[',page_title,']]') from page
where page_namespace = 0
and page_title like '%ریاضیاتی%'
AND page_is_redirect = 0; | {"resultsets": [{"headers": ["rank", "user_name", "user_editcount"], "rowcount": 1000}], "runningtime": "3.04"} | fawiki_p |
(from Sept 2021) SDC edits by user and edit summary #WMSE-WLM-romania | null | SELECT page_title, comment_text
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 ... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "0.94"} | commonswiki_p |
اضافات المستخدمين | null | SELECT *
#page_title, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count
#actor.actor_name
FROM actor
JOIN revision rev
ON actor_id = rev.rev_actor
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
JOIN page
ON page_id = parent.rev_page
WHERE page_namespace = 0
AND rev.rev_timestamp ... | {"resultsets": [], "runningtime": "0.04"} | arwiki_p |
اضافات 2 | null | SELECT *
#page_title, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count
#actor.actor_name
FROM actor
JOIN revision rev
ON actor_id = rev.rev_actor
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
JOIN page
ON page_id = parent.rev_page
WHERE page_namespace = 0
AND rev.rev_timestamp >... | {"resultsets": [], "runningtime": "0.04"} | arwiki_p |
Articles in both a mother and a daughter category | null | SELECT
p1.page_title,
cl1.cl_to,
cl2.cl_to
FROM page p1 -- article
JOIN categorylinks cl1 -- daughter
ON p1.page_id = cl1.cl_from
JOIN categorylinks cl2 -- mother
ON p1.page_id = cl2.cl_from
JOIN page p2 -- daughter cat page
ON cl1.cl_to = p2.page_title
AND p2.page_namespace = 14
JOIN categorylinks cl3
... | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "1.87"} | fawiki_p |
Category members of ptwiki category "!Categorias vazias que não devem ser eliminadas" that starts with "Itens..." | null | SELECT page_title
FROM categorylinks
INNER JOIN page ON cl_from = page_id
WHERE cl_to = '!Categorias_vazias_que_não_devem_ser_eliminadas' AND page_title LIKE 'Itens%'; | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}], "runningtime": "2.70"} | ptwiki_p |
/meta/color subpage transclusions | null | SELECT CONCAT("Template:", page_title), COUNT(tl_from)
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE
page_namespace = 10
AND (
page_title LIKE "%/meta/color"
)
GROUP BY page_id
ORDER BY COUNT(tl_from) DESC | {"resultsets": [{"headers": ["actor_name"], "rowcount": 0}], "runningtime": "0.07"} | enwiki_p |
meta/shortname subpage transclusions | null | SELECT CONCAT("Template:", page_title), COUNT(tl_from)
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE
page_namespace = 10
AND (
page_title LIKE "%/meta/shortname"
)
GROUP BY page_id
ORDER BY COUNT(tl_from) DESC | {"resultsets": [{"headers": ["actor_name"], "rowcount": 807}], "runningtime": "28.65"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.