title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
WikiDaheim new users 2019 (by first revision, by uploader) and sum | null | USE commonswiki_p;
set @cat:="Media_from_WikiDaheim_2019_in_Austria/all"; # reference category counted
set @timestamp:=20190616220000; # registration time threshold for new users
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count, user.user_registration
FROM actor, revision, image... | {"connection_id": 7982775} | null |
Label/description/alias stats for SQ | null | use wikidatawiki_p;
SELECT CURRENT_DATE;
SELECT
term_entity_type,
term_language,
count(if(term_type = 'label',1,null)) as labels,
count(if(term_type = 'description',1,null)) as descriptions,
count(if(term_type = 'alias',1,null)) as aliases
FROM wb_terms
WHERE term_language IN (
'sq', 'en'
)
GROUP BY te... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 13}], "runningtime": "560.32"} | null |
Forgotten articles | null | SELECT
MAX(rev_timestamp) AS lastedit, COUNT(rev_id) AS editcount, page_title
FROM
revision,
/******************************************************************************************************/
/* This inner query returns the 500 pages with the earliest timestamps on their latest rev... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "0.21"} | null |
مخصوص مضمون کے سرخ روابط کی فہرست | null | USE urwiki_p;
SELECT DISTINCT pl_title AS "سرخ روابط",
"{{نہیں ہوا-م}}" AS "صورت حال"
FROM pagelinks
JOIN page ON page_id = pl_from
AND (NOT EXISTS(
SELECT 1 FROM page
WHERE page_title = pl_title
AND page_namespace = 0
))
AND pl_namespace = 0
AND page_title = "بھارتیہ جنتا پارٹی کے وزرائے اعلی کی فہرست"; | {"resultsets": [{"rowcount": 268, "headers": ["concat('[[:en:',page_title,']]')"]}], "runningtime": "19.62"} | null |
Impact of images from a specific category in Commons | null | USE commonswiki_p;
SELECT *
FROM globalimagelinks
WHERE gil_to in
(SELECT page_title
FROM page
LEFT JOIN categorylinks
ON cl_from = page_id
WHERE cl_to LIKE 'Images_from_Wiki_Loves_Monuments_2019'
AND page_namespace = 6)
limit 10 | {"runningtime": "0.60", "resultsets": [{"headers": ["Page title", "Date", "Edit count"], "rowcount": 12}]} | null |
Get all disambiguation without talk pages | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT CONCAT('আলাপ:',page.page_title) AS page_title
FROM page
INNER JOIN categorylinks
ON categorylinks.cl_from = page.page_id
WHERE categorylinks.cl_to = "সকল_দ্ব্যর্থতা_নিরসন_পাতা"
and page.page_namespace = "0"
and NOT EXISTS (SELECT NULL FROM page p2 WHERE p2.page_namespace = "1"
and p2.page_ti... | {"resultsets": [{"rowcount": 18, "headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"]}, {"rowcount": 42, "headers": ["log_id", "log_type", "log_action", "user_name", "user_editcount", "user_registration", "log_params"]}, {"rowcount": 4, "headers": ["user_name... | null |
Redirects to deleted pages | null | USE bnwiki_p;
SELECT rd_from, rd_title AS 'TO', pg.page_title AS 'FROM' FROM redirect
LEFT JOIN page AS pg ON rd_from = pg.page_id
WHERE page_namespace = 0
AND rd_title NOT IN (SELECT page_title FROM page AS pg2)
LIMIT 100 | {"resultsets": [{"rowcount": 0, "headers": ["page_title"]}], "runningtime": "0.11"} | null |
Test | Refer to https://quarry.wmflabs.org/query/42106 and https://quarry.wmflabs.org/query/31893 | USE zhwiki_p;
SELECT page_title, rev_timestamp
FROM revision_userindex
JOIN page ON rev_page = page_id
JOIN templatelinks ON tl_from = rev_page
WHERE rev_parent_id = 0
AND tl_namespace = 10
AND tl_title LIKE "Rough_translation"
AND page_namespace = 0
AND rev_timestamp > '201912010000' AND rev_timestamp < '202003302359... | {"runningtime": "130.44", "resultsets": [{"headers": ["page_title"], "rowcount": 642}]} | null |
ruwiki: Convenient Discussions script usage: number of edits by month | null | use ruwiki_p;
select substring(rev_timestamp, 1, 6) date_, count(*) c
from revision
join actor on rev_actor = actor_id
join comment on rev_comment_id = comment_id
where
# rev_timestamp > "20180220000000" and
rev_timestamp > "20200101000000" and
# comment_text like "%JWBTH/CD%"
comment_text like "%JWBTH/CD|... | {"connection_id": 23861931} | null |
Users edited only user namespace | ০১-০৯-২০১৯ | USE bnwiki_p;
SELECT user.*, COUNT(rev_page) AS created, page_title AS userpage, page_len
FROM actor
JOIN user ON user_id = actor_user
LEFT JOIN revision_userindex ON rev_actor = actor_user AND rev_parent_id = 0
LEFT JOIN page ON page_namespace = 2 AND page_title = REPLACE(user_name, ' ', '_')
WHERE NOT EXISTS (
SELE... | {"connection_id": 52630596} | null |
Retrieving all images in a Wikipedia page | null | use itwiki_p;
select * from imagelinks #imagelinks contains the links from pages to images
where il_from=1375526 #'Felis_silvestris_catus'in italian
and il_from_namespace=0
#limit 100
| {"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 50}], "runningtime": "0.27"} | null |
Closed Wikipedias | metadata about all the wikis | use meta_p;
select * from meta_p.wiki where
is_closed = 1
-- and lang = 'tlh'
and family = 'wikipedia'
-- dbname = 'ptwiki'; | {"resultsets": [{"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lbn\")", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 6}, {"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lbn\")", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 1}, {"headers": ["CONCAT(\"Q\",ips_item_id)", "CONCAT(\"Lbn\")", "CONCAT('\"',ips_... | null |
Users whose global rights were revoked locally | null | select
actor_name, gug_group
from
actor
join centralauth_p.globaluser on gu_name = actor_name
join centralauth_p.global_user_groups on gug_user = gu_id
where
(
(gug_group = "global-rollbacker" || gug_group = "steward")
and exists (select 1 from user_former_groups where ufg_user=actor_user and (ufg_group... | {"resultsets": [{"headers": ["user_name", "articles"], "rowcount": 50}], "runningtime": "1408.16"} | null |
Revisions with "ridiculous" as the sole word in their comments | null | USE enwiki_p;
SELECT * FROM revision WHERE rev_comment_id = 110761 and rev_timestamp < 20200101000000 ORDER BY rev_timestamp DESC LIMIT 6 | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 1}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pl_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["pa... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]')
FROM commonswiki_p.page
INNER JOIN commonswiki_p.categorylinks ON cl_from = page_id
INNER 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 WHERE cl_from... | {"connection_id": 55701467} | null |
enWS user id number | null | USE enwikisource_p;
SELECT user_id, user_name FROM user
WHERE user_name = "Ineuw"
| {"connection_id": 76760646} | null |
IP user pages on Commons | null | USE commonswiki_p;
SELECT CONCAT('User:',page_title) FROM page
WHERE page_namespace = 2
AND page_title LIKE '%.%.%.%'
AND page_title REGEXP '^(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4... | {"resultsets": [{"headers": ["\u0627\u0644\u0645\u0642\u0627\u0644\u0629", "\u0627\u0644\u062d\u062c\u0645"], "rowcount": 385}], "runningtime": "37.84"} | null |
Commons images only in hidden cat | null | use commonswiki_p;
select CONCAT ('File:',p1.page_title,'')
from page p1 left outer join categorylinks on
cl_from = p1.page_id left join page p2 on cl_to = p2.page_title and
p2.page_namespace = 14 left join page_props on p2.page_id = pp_page
and pp_propname = 'hiddencat'
where p1.page_namespace = 6
and p1.page_is_red... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 14}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 6}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "21.37"} | null |
unexisting cat in enwiki | null | use enwiki_p;
select CONCAT ('category:',cl_to,'')
#from page p1 left outer join
FROM categorylinks AS cl
#cl_from = p1.page_id left join page p2 on cl_to = p2.page_title and
#p2.page_namespace = 14 left join page_props on p2.page_id = pp_page
WHERE cl_to NOT IN (select page_title from page where page_namespace=14)
... | {"connection_id": 348241066} | null |
صفحات مشاريع الويكي | null | USE arwiki_p;
SELECT CONCAT('{{مدخل دليل مشروع ويكي|المشروع=', page_title, '}}') AS page_title
FROM page
WHERE page_namespace = 4 and page_is_redirect = 0
AND page_title REGEXP 'مشروع_ويكي'
AND page_title NOT LIKE '%/%'
AND page_title NOT LIKE '%دعوة_مشروع%'
GROUP BY page_title
ORDER BY page_title DESC; | {"resultsets": [{"headers": ["page_title"], "rowcount": 28341}], "runningtime": "106.29"} | null |
صفحات المشاريع حسب القالب | null | USE arwiki_p;
SELECT CONCAT('{{مدخل دليل مشروع ويكي|المشروع=',page_title,'|عدد الصفحات=') AS "القالب",
CONCAT('',COUNT(tl_from),'}}')
AS uses
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE page_namespace = 10 and page_is_redirect=0
AND page_title REGEXP 'مشروع_ويكي_... | {"runningtime": "3.99", "resultsets": [{"rowcount": 39, "headers": ["page_namespace", "page_title", "rd_title"]}]} | null |
Some items to be merged in Wikidata | 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 wikidatawiki_p;
SELECT CONCAT('* ', wbA.ips_site_page, ' - [[Q', wbA.ips_item_id, ']] & [[Q', GROUP_CONCAT(DISTINCT wbC.ips_item_id ORDER BY wbC.ips_item_id ASC SEPARATOR ']], [[Q'), ']]')
FROM wb_items_per_site AS wbA
LEFT JOIN wb_items_per_site AS wbB
ON (wbA.ips_item_id = wbB.ips_item_id AND NOT wbA.ips_site... | {"connection_id": 355507069} | null |
Articles that are Lists on some WikiProjects but not all | null | use arwiki_p;
SELECT DISTINCT(page_title)
FROM page
JOIN page_assessments ON pa_page_id = page_id
WHERE page_namespace = 0
AND pa_class = 'قائمة'
AND EXISTS (
SELECT 1
FROM page_assessments
WHERE pa_page_id = page_id
AND pa_class != 'قائمة'
# Exclude Wikipedia 1.0, Spoken Wikipedia and Guild of Copy Editors
... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 2}, {"headers": ["cl_to"], "rowcount": 7}, {"headers": ["cl_to"], "rowcount": 23}], "runningtime": "0.46"} | null |
LR counter, Commons | null | use commonswiki_p;
select count(*) as "Number of license reviews"
from revision
join comment
on comment_id = rev_comment_id
join revision_actor_temp
on revactor_rev = rev_id
join actor
on actor_id = revactor_actor
where actor_name = "Ahmad252" -- Or your username. Please note that this query has been only tested with M... | {"runningtime": "1.31", "resultsets": [{"rowcount": 11, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 7, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 5, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Ukrainian speakers who edit WD a lot | null | select u.user_name, u.user_editcount, b.babel_level
from wikidatawiki_p.babel b
join wikidatawiki_p.user u on u.user_id = b.babel_user
and babel_lang = 'uk'
and babel_level in (4, 'N', 5)
and user_editcount >= 1000
order by u.user_editcount desc | {"runningtime": "150.39", "resultsets": [{"rowcount": 1, "headers": ["CONCAT('[[', page_title, ']]')"]}]} | null |
Find draftifications of old articles | null | /* Find draftifications of old articles */
SELECT log_params
FROM logging
JOIN page
ON logging.log_title = page.page_title
AND page.page_namespace = 118
JOIN
(
SELECT rev_page, MIN(rev_timestamp) as page_created_at
FROM revision
GROUP BY rev_page
) AS rev
ON rev.rev_page = page.page_id
WHERE logg... | {"runningtime": "0.20", "resultsets": [{"rowcount": 9, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
(The xxx EP) | Titles with "(The xxx EP)" | select page_title from page where page_namespace=0
and (page_title like '%(The!_%' escape '!')
and (page_title like '%EP)')
and page_is_redirect=0 | {"runningtime": "0.44", "resultsets": [{"rowcount": 12, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
Deleted pages connected to Wikidata (bnwiki) | Example data for task https://phabricator.wikimedia.org/T215397 . Shows ratio of main namespace articles that were created using Content Translation and not using Content Translation and subsequently deleted. This sample works for the Hungarian Wikipedia (huwiki) for January 2016 (201601). | USE bnwiki_p;
SELECT CONCAT('-Q', ips_item_id), 'Sbnwiki', CONCAT('"', ips_site_page, '"')
FROM wikidatawiki_p.wb_items_per_site
LEFT JOIN page ON REPLACE(ips_site_page, ' ', '_') = page_title AND page_namespace = 0
WHERE page_title IS NULL
AND ips_site_id = 'bnwiki'
AND ips_site_page NOT LIKE '%:%'; | {"runningtime": "0.23", "resultsets": [{"rowcount": 4, "headers": ["cl_to"]}]} | null |
Commons files with missing infobox template | null | USE commonswiki_p;
SELECT concat("File:",page_title)
FROM page
WHERE page_namespace = 6 -- files only
AND page_is_redirect = 0 -- no redirects
AND page_title NOT LIKE '%/%' -- skip rare image subpages
AND NOT EXISTS (
SELECT *
FROM templatelinks
WHERE page_id = tl_from
AND tl_title in ('Infobox_... | {"runningtime": "0.24", "resultsets": [{"rowcount": 2, "headers": ["cl_to"]}]} | null |
Voci senza interlink create nel 2006 (2° trimestre) | null | USE itwiki_p;
SELECT DISTINCT page_title
FROM page, revision
WHERE page_id = rev_page
AND rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND rev_timestamp BETWEEN 20060401000000 AND 20060701000000
AND page_id NOT IN
(SELECT cl_from
FROM categorylinks, pagelinks
WHERE cl_to = pl_title
AND pl_namespace... | {"runningtime": "0.20", "resultsets": [{"rowcount": 7, "headers": ["cl_to"]}]} | null |
tributaries | Titles probably needing " tributary" before close paren | select page_title from page where page_namespace=0
and (
((page_title like '%Creek_(%') and (page_title like '%Creek)'))
or ((page_title like '%Creek_(%') and (page_title like '%River)'))
or ((page_title like '%River_(%') and (page_title like '%River)'))
or ((page_title like '%River_(%') and (page_titl... | {"runningtime": "0.34", "resultsets": [{"rowcount": 19, "headers": ["grand_grand_parent_title", "grand_grand_parent_subcats", "grand_parent_title", "grand_parent_subcats", "parent_title", "parent_subcats", "child_title"]}]} | null |
Հայերեն Վիքիպեդիայի ամենաշատ օգտագործվող արտաքին հղումները | null | USE hywiki_p;
SELECT Count(*),
Trim(LEADING 'www.' FROM Substring_index(Substring_index(el_to, '/', 3),'/',-1)) AS site
FROM externallinks,
page
WHERE el_from = page_id
AND page_namespace = 0
GROUP BY 2
HAVING Count(*) > 10
ORDER BY 1 DESC; | {"runningtime": "0.11", "resultsets": [{"rowcount": 2, "headers": ["cl_to"]}]} | null |
Accounts of WMUA staff | null | SELECT user_name, user_editcount, user_registration
FROM uawikimedia_p.user
WHERE user_name LIKE "%(WMUA)"
ORDER BY user_registration ASC | {"runningtime": "0.17", "resultsets": [{"rowcount": 0, "headers": ["rev_user_text", "recent_user_editcount"]}]} | null |
Articles with curly quotes in title | Articles with curly quotes in title
| SELECT page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_title RLIKE '\ʻ' | {"runningtime": "245.86", "resultsets": [{"rowcount": 49, "headers": ["rev_actor", "edits"]}]} | null |
Pictures taken during Wikiměsto Litomyšl | null | USE commonswiki_p;
SELECT
actor_name, count(rev_page)
FROM revision_userindex
JOIN page ON page_id = rev_page
JOIN actor ON actor.actor_id = revision_userindex.rev_actor
JOIN categorylinks ON cl_from = page_id
WHERE
rev_parent_id=0 /* nově založené, tj. nemělo minulou revizi */
AND
page_namespace = 6 /... | {"runningtime": "1742.24", "resultsets": [{"rowcount": 1000, "headers": ["page_title", "el_to"]}]} | null |
Number of photos during FWS | null | USE commonswiki_p;
SELECT
actor_name, count(rev_page)
FROM revision_userindex
JOIN page ON page_id = rev_page
JOIN actor ON actor.actor_id = revision_userindex.rev_actor
JOIN categorylinks ON cl_from = page_id
WHERE
rev_parent_id=0 /* nově založené, tj. nemělo minulou revizi */
AND
page_namespace = 6 /... | {"connection_id": 2694896} | null |
Interwiki file links from wikis to Commons | null | USE dewiki_p;
#USE dewikivoyage_p;
#USE enwiki_p;
#USE frwiki_p;
#USE itwiki_p;
#USE nlwiki_p;
#USE specieswiki_p;
SET @w = LEFT (DATABASE(), LENGTH(DATABASE()) - 2); SET @l = (SELECT lang FROM meta_p.wiki WHERE dbname = @w);
SET @p = '^$'; #dummy
SET @ext = '(?:[Ii]mage|[Ff]ile)\:.*\.(?:jpe?g|JPE?G|png|PNG|svg|SVG|tif... | {"connection_id": 4339841} | null |
SVG files uploaded by a user from a certain date | Shows all SVG files uploaded by a user from a certain date (user & date set as conditions). | SELECT DISTINCT I.img_name, I.img_actor, I.img_timestamp
FROM commonswiki_p.image I
LEFT JOIN commonswiki_p.actor A ON I.img_actor=A.actor_id
LEFT JOIN commonswiki_p.user U ON A.actor_user=U.user_id
WHERE I.img_timestamp > 20071030000000
AND I.img_minor_mime = "svg+xml"
AND U.user_name = "Чаховіч Уладзіслаў"
ORDER ... | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_ne... | null |
Bad links from wikis to m, mw, species cats: broken | null | #USE dewiki_p;
#USE dewiktionary_p;
#USE dewikisource_p;
#USE dewikivoyage_p;
#USE enwiki_p;
#USE eswiki_p;
#USE frwiki_p;
#USE itwiki_p;
USE nlwiki_p;
#USE svwiki_p;
#USE specieswiki_p;
SET @w = LEFT (DATABASE(), LENGTH(DATABASE()) - 2); SET @l = (SELECT lang FROM meta_p.wiki WHERE dbname = @w);
SET @lenm = LENGTH('ht... | {"runningtime": "1.07", "resultsets": [{"rowcount": 59, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_n... | null |
Number of Malayalam labels in Wikidata | Get the count of Malayalam Labels in wikidata. This query is faster than the query service in Wikidata | USE wikidatawiki_p;
DESCRIBE wb_terms;
SELECT COUNT(*) FROM wb_terms
WHERE term_type = 'label' AND term_language = "en"; | {"runningtime": "3.06", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Bad links from wikis to Commons galleries: broken | empty & broken links → galleries | #USE dewiki_p; #Klammern!
#USE dewikisource_p;
#USE dewikivoyage_p;
#USE dewiktionary_p;
#USE enwiki_p;
#USE frwiki_p;
#USE itwiki_p;
USE nlwiki_p;
#USE svwiki_p;
#USE specieswiki_p;
SET @w = LEFT (DATABASE(), LENGTH(DATABASE()) - 2); SET @l = (SELECT lang FROM meta_p.wiki WHERE dbname = @w);
SET @p = '^$'; #dummy
IF (... | {"runningtime": "0.12", "resultsets": [{"rowcount": 4, "headers": ["page_title", "page_len"]}]} | null |
Autoconfirmed users in ptwiki | null | use ptwiki_p;
# select ug_group, count(*) from user_groups group by ug_group order by 2 asc;
# select * from user where user_name = 'HenriqueCrang';
# select * from user_rights;
select * from user where
#user_name = 'HenriqueCrang' and
user_editcount > 10 and
20200730000000 - user_registration > 4
; | {"runningtime": "0.71", "resultsets": [{"rowcount": 9, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 5, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Test | null | use commonswiki_p;
SELECT concat("M",page_id) AS MID, 'P1259', 'Q63348040'
FROM page
JOIN categorylinks cl1 ON cl1.cl_from = page_id AND cl1.cl_to='Valued_images_missing_SDC_Commons_quality_assessment'
WHERE
page_namespace = 6
limit 1000 | {"runningtime": "185.52", "resultsets": [{"rowcount": 62868, "headers": ["page_title"]}]} | null |
GA/FA and GAN/FAC linked from August 31 | GA/FA and GAN/FAC linked from [[August 31]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"runningtime": "0.11", "resultsets": [{"rowcount": 12, "headers": ["user", "img_count"]}]} | null |
Eintrag News:* in externallinks | null | USE dewiki_p;
SELECT el_to, page_title, page_len
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE "News%"
ORDER BY page_len;
| {"runningtime": "2.57", "resultsets": [{"rowcount": 95, "headers": ["Title", "user", "comment"]}]} | null |
GA/FA and GAN/FAC linked from September 8 | GA/FA and GAN/FAC linked from [[September 8]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"runningtime": "1.66", "resultsets": [{"rowcount": 1, "headers": ["page_title"]}]} | null |
Autoreviewer edits | prepat - was previous revision reviewed?
pat - review flag for current revision
bad = 1 - problems, should not happen | use ruwiki_p;
SELECT (prepat <> "no") AND (pat <> "auto") as bad, B.*
FROM
(SELECT CASE WHEN rev_parent_id = 0 THEN "new"
WHEN f1.fr_timestamp IS NULL THEN "no"
ELSE "yes"
END as prepat,
CASE WHEN f2.fr_flags IS NULL THEN "no"
WHEN f2.fr_flags LIKE "%auto%" THEN "auto"
ELSE "manual... | {"runningtime": "0.04", "resultsets": []} | null |
List of languages in wbt_text_in_lang | null | use wikidatawiki_p;
select distinct wbxl_language from wbt_text_in_lang; | {"runningtime": "0.20", "resultsets": [{"rowcount": 2, "headers": ["rev_id", "rev_parent_id"]}, {"rowcount": 0, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha... | null |
zhwiki rc | null | USE zhwiki_p;
SELECT *
FROM recentchanges
WHERE rc_type = 0 AND rc_timestamp > 20201003000000
ORDER BY rc_timestamp DESC
| {"runningtime": "3.18", "resultsets": [{"rowcount": 53, "headers": ["user", "img_count"]}]} | null |
Meta administrator removal | null | /**
* Admin name
* Count of edits
*
* Does not include log actions yet
* Timestamp of their 10th most recent **log entry** that requires admin rights, does not account for other admin actions
* DOES NOT ACCOUNT FOR STEWARD ACTIONS BEING LOGGED AS ADMIN ACTIONS
*
* Log entries that count:
* - abusefilter/*
* -... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "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_al... | null |
Lemma mit nur einem Zeichen | Siehe https://de.wikipedia.org/w/index.php?title=Wikipedia:Fragen_zur_Wikipedia&oldid=182254353#Suche_nach_Länge_des_Lemmas | USE etwiki_p;
SELECT CONCAT('[[', page_title, ']]') AS Lemma
FROM page
INNER JOIN pagelinks ON pl_from = page_id
WHERE page_namespace = 0
AND page_title IS NULL
AND LEFT(CONVERT(page_title USING utf8), 1) = CONVERT(page_title USING utf8)
LIMIT 3; | {"runningtime": "329.11", "resultsets": [{"rowcount": 299, "headers": ["cl_to", "count_cl_to"]}]} | null |
Cultural heritage monuments in Iran with no category file counter on Commons | null | use commonswiki_p;
select count(cl_from) as Counter, concat("{{/Template|!",cl_sortkey_prefix, "}}") as ID, concat("[[:File:", page_title, "]]") as Example, "" as "عنوان ثبتی", "" as توضیح
from categorylinks
join page
on page_id = cl_from
where cl_to = "Cultural_heritage_monuments_in_Iran_with_known_IDs"
and cl_type = ... | {"runningtime": "2.62", "resultsets": [{"rowcount": 737, "headers": ["file"]}]} | null |
Number of lexemes published a day | null | USE wikidatawiki_p;
SELECT count(page.page_title) AS pages, DATE_FORMAT(revision.rev_timestamp, '%Y-%m-%d') AS date
FROM page
JOIN revision ON page.page_id=revision.rev_page
WHERE page.page_namespace=146
AND revision.rev_parent_id=0 # No parent rev = page creation
GROUP BY date
ORDER BY revision.rev_timestamp | {"runningtime": "4.25", "resultsets": [{"rowcount": 1000, "headers": ["concat('# [[',REPLACE(page_title,'_',' '),']]')", "actor_name"]}]} | null |
Páginas donde no existen Controles de Autoridad | null | use eswiki_p;
SELECT DISTINCT page_title
FROM page, categorylinks
WHERE page_id = cl_from
AND page_namespace = 0
AND page_is_redirect = 0
AND cl_to != 'Personas'
AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_title IN ('Control_de_autoridades', 'NF', 'BD'))
AND NOT EXISTS (S... | {"runningtime": "1.87", "resultsets": [{"rowcount": 1, "headers": ["CURRENT_DATE"]}, {"rowcount": 4, "headers": ["Field", "Type", "Null", "Key", "Default", "Extra"]}, {"rowcount": 430, "headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"]}]} | null |
Inexistent Articles 2 | With and Without Articles in Arabic Wikipedia | USE enwiki_p;
SELECT page_title , COUNT(*), page_len, cl_to FROM langlinks
JOIN categorylinks ON ll_from = cl_from
JOIN page on ll_from = page_id
WHERE page_namespace = 0 AND page_is_redirect = 0
AND cl_to IN (SELECT cl_to FROM categorylinks
WHERE cl_to LIKE "Aviation in Ukraine"
OR cl_to LIKE "Airports in Ukra... | {"resultsets": [{"rowcount": 10, "headers": ["comment_text"]}], "runningtime": "0.11"} | null |
COVID-19 article editors with edit count | null | USE zhwiki_p;
SELECT user_name, user_editcount FROM user WHERE user_name IN
(SELECT DISTINCT actor_name FROM revision
JOIN `actor` ON rev_actor = actor_id
WHERE rev_page = 6861061);
| {"connection_id": 886565728} | null |
wikidata: days without edits | null | SELECT
SUBSTR(rev_timestamp, 1, 8) AS bucket,
COUNT(rev_id) AS cnt
FROM
revision_userindex JOIN actor_revision ON rev_actor=actor_id
WHERE
actor_name='MisterSynergy'
AND rev_timestamp>=20200101000000
GROUP BY
bucket
; | {"connection_id": 951461296} | wikidatawiki_p |
wikidata: company items created by User:Freebald | null | SELECT
page_title
FROM
page JOIN revision_userindex ON page_id=rev_page JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_parent_id=0
AND page_namespace=0
AND actor_name='Freebald'; | {"connection_id": 953101243} | wikidatawiki_p |
dewiki: account names ending with [Bb]ot | null | SELECT * FROM user WHERE user_name REGEXP '[Bb]ot$'; | {"resultsets": [{"rowcount": 750, "headers": ["page_namespace", "page_title", "name", "cat", "commas"]}], "runningtime": "187.82"} | dewiki_p |
Meta users with extra local autopatrol | null | USE metawiki_p;
/* blocked in user groups */
SELECT
u.user_name,
ug.*,
block.ipb_expiry,
blockreason.comment_text,
CASE
WHEN block.ipb_sitewide = 1 THEN 'sitewide'
ELSE (
SELECT GROUP_CONCAT(
CASE
WHEN restriction.ir_type = 1 THEN (
SELECT CONCAT( 'ns', page_namespace, '-', page_title ) F... | {"runningtime": "5.74", "resultsets": [{"rowcount": 1656, "headers": ["page_title"]}]} | metawiki_p |
Find earliest block for SPI | Using https://en.wikipedia.org/wiki/Wikipedia:Sockpuppet_investigations/Peter.hantz as a test case. | USE enwiki_p;
SELECT user_name, ipb_timestamp, ipb_expiry
FROM user
JOIN ipblocks ON ipb_user = user_id
WHERE user_name IN ('Peter.hantz', 'Physisc42', 'Cakeseed', 'Yksi11')
ORDER BY ipb_timestamp ASC
| {"resultsets": [{"headers": ["year", "month", "page_namespace", "count"], "rowcount": 16}], "runningtime": "3.59"} | enwiki_p |
Voci senza interlink e con un solo link in ingresso (>10 KB) | null | USE itwiki_p;
SELECT DISTINCT page_title
FROM page, revision
WHERE page_id = rev_page
AND rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect = 0
AND page_len > 10000
AND page_title IN (
SELECT pl_title
FROM pagelinks
WHERE pl_from_namespace = 0
AND pl_namespace = 0
AND pl_title = page_title
AND pl_fro... | {"resultsets": [{"rowcount": 82, "headers": ["wbit_item_id", "wbx_text"]}], "runningtime": "366.13"} | itwiki_p |
Missing Saudi_Arabia categories | null | USE enwiki_p;
SELECT
count(*) ll_count,
CONCAT("[[:Category:",page_title,"]]") title_pl,
(select ll_title from langlinks where ll_from = page_id and ll_lang = 'en') title_en,
(select pp_value from page_props where pp_page = page_id and pp_propname = 'wikibase_item') wb_item
FROM
page, langlinks... | {"runningtime": "139.25", "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", "comment_id", "comment_hash", "comment_text", "comment_data"], "rowcount": 10}]} | enwiki |
Authority control Properties but no local template at bnwiki | Authority control template without any data local or Properties | select p.page_title, p.page_len
#select CONCAT('[[',p.page_title,']]')
#select CONCAT('[[تصنيف:',p.page_title,']]')
FROM page as p, page_props as pp, wikidatawiki_p.page as wdp
WHERE p.page_namespace = 0
#and exists (select * from wikidatawiki_p.pagelinks wdpl where wdpl.pl_from = wdp.page_id AND
# (wdpl.pl... | {"runningtime": "8.47", "resultsets": [{"headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_... | bnwiki_p |
Cross-namespace redirects on English Wiktionary | null | SELECT page_title AS 'source', page_namespace AS 'source namespace', rd_title AS 'target', rd_namespace AS 'target namespace'
FROM redirect
INNER JOIN page ON page_id = rd_from
WHERE
page_namespace != rd_namespace
AND rd_interwiki = ''
ORDER BY
page_namespace,
page_title | {"runningtime": "5.92", "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": 3495}]} | enwiktionary_p |
KSA new articles by months | null | use arwiki_p;
SELECT left(t4.rev_timestamp,6) as Menesis, count(left(t4.rev_timestamp,6)) as Raksti
FROM revision AS t4
WHERE t4.rev_id IN (
Select min(t45.rev_id)
From revision t45
inner join page p on t45.rev_page=p.page_id
where p.page_namespace=0 and p.page_is_redirect=0
and t45.rev_page in (select cl_from from ... | {"runningtime": "166.04", "resultsets": [{"rowcount": 412, "headers": ["pages", "date"]}]} | arwiki |
Userboxok interwiki nélkül | A magyar Wikipédia userboxai, melyeknek nincs interwiki kapcsolatuk | #USE huwiki_p;
SELECT page_title FROM page
LEFT JOIN templatelinks ON tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Kat-redir'
LEFT JOIN langlinks ON ll_from = page_id
WHERE page_namespace = 10
AND page_title LIKE 'Userbox/%'
AND page_is_redirect = 0
AND tl_from IS NULL
AND ll_from IS NULL;
| {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["pi_property_id", "pi_type", "pi_info"]}]} | huwiki_p |
unknown_date @ Commons | null | SELECT CONCAT("Category:",page_title,"")
FROM page AS page
WHERE page_namespace = 14
AND page_title LIKE "%unknown_date%"
AND page_is_redirect = 0
#AND (page_title LIKE "%peopel%" OR page_title LIKE "%Peopel%")
LIMIT 100; | {"runningtime": "0.48", "resultsets": [{"rowcount": 9, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}]} | commonswiki_p |
Pdd d'articles existantes alors que l'article est une redirection sur WP:FR | Testé et validé le 5/10/2019. | SELECT
CONCAT("{{a-redir-simple|", REPLACE(page_article.page_title, '_', ' '), "}}") AS article,
CONCAT("\[\[Discussion:", REPLACE(page_pdd.page_title, '_', ' '), "\]\]") AS pdd
FROM
(SELECT page_title FROM page WHERE page_namespace = 1 and page_is_redirect = 0) AS page_pdd
INNER JOIN
(SELECT pa... | {"connection_id": 29401570} | frwiki |
أكثر مستخدم إضافة للموسوعة: | null | SELECT CONCAT("{{ويكيبيديا:إحصاءات العام/بطاقة جدول/عنصر|[[مستخدم:",rev_actor,"|",rev_actor,"]]") AS user_name
, count(rev_actor)
FROM revision
INNER JOIN page ON rev_page = page_id
WHERE page_namespace = 0
AND rev_parent_id = 0
#and rev_timestamp BETWEEN 20180101000000 AND 20190101000000
AND page.page_is_redirect = 0
... | {"runningtime": "0.07", "resultsets": [{"rowcount": 10, "headers": ["page_title"]}]} | ckbwiki_p |
GA/FA and GAN/FAC linked from October 11 | GA/FA and GAN/FAC linked from [[October 11]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"rowcount": 2, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang"]}], "runningtime": "0.67"} | enwiki |
GA/FA and GAN/FAC linked from October 7 | GA/FA and GAN/FAC linked from [[October 7]] | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND pg1.page_title IN ( #Where page is linked from a specified other page
SELECT
pl_title
FROM
pagelinks
WHERE
pl_from... | {"resultsets": [{"rowcount": 0, "headers": ["page_title"]}], "runningtime": "0.07"} | enwiki |
Users by Articles CKBwiki_p | null | USE ckbwiki_p;
SELECT actor.actor_name AS user_name,
COUNT(revision.rev_actor) AS creates
FROM revision
INNER JOIN page
ON page.page_id = revision.rev_page
JOIN actor
ON revision.rev_actor = actor.actor_id
WHERE page.page_is_redirect = 0
AND page.page_namespace = 0
AND revision.rev_parent_id = 0
GROUP BY revis... | {"resultsets": [{"headers": ["CONCAT(\"Q\",ips_item_id)", "Lml", "CONCAT('\"',ips_site_page,'\"')"], "rowcount": 81}], "runningtime": "168.80"} | ckbwiki_p |
zhwiki: imagelinks | null | SELECT *
FROM imagelinks
WHERE il_to
LIMIT 10 | {"resultsets": [{"headers": ["\u0b87\u0ba8\u0bcd\u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bcd \u0bae\u0bc6\u0baf\u0bcd\u0baa\u0bcd\u0baa\u0bc1\u0baa\u0bcd\u0baa\u0ba3\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b88\u0b9f\u0bc1\u0baa\u0b9f\u0bcd\u0b9f\u0bcb\u0bb0\u0bcd:<br/>"], "rowcount": 0}], "runningtime": "0.78"} | zhwiki_p |
Edits of Pages of a main category's depth2 subcategories | Year wise edits of pages in category with depth of 2 subcategories |
SELECT
LEFT(rev_timestamp,6) as yymm,
COUNT(*) as edits
from page
JOIN revision on rev_page=page_id
WHERE page_title in (
SELECT
page_title
from page
JOIN categorylinks cl
ON page_namespace = 0 -- main page
AND cl.cl_from = page_id
AND cl.cl_to in (
SELECT
page_title
FROM page p
JOIN category... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "actor_user", "actor_name"], "rowcount": 1267}], "runningtime": "6.29"} | tewiki_p |
Wikidata:Items with sitelinks to Creator pages on Commons | null | SELECT CONCAT('-Q', ips_item_id) AS item, 'Scommonswiki', CONCAT('"', ips_site_page,'"') AS link
FROM wb_items_per_site
WHERE ips_site_id='commonswiki' AND ips_site_page LIKE 'Creator:%'
ORDER BY ips_item_id ASC; | {"resultsets": [{"headers": ["rfn", "redirect", "article", "redirector", "rc_timestamp"], "rowcount": 3}], "runningtime": "0.24"} | wikidatawiki_p |
Wikidata:Artworks with Wikidata item missing image | null | SELECT REGEXP_SUBSTR(el_to, 'Q[0-9]*'), 'P18', CONCAT("\"", REPLACE(page_title, "_", " "), "\"")
FROM externallinks
JOIN page ON page_id = el_from
JOIN categorylinks ON cl_from = page_id
WHERE
page_namespace = 6 and
cl_to='Artworks_with_Wikidata_item_missing_image' AND
el_to LIKE 'https://tools.wmflabs.org/q... | {"resultsets": [{"headers": ["CONCAT('# [[Template:', tl_title, ']] (', COUNT(*), ' collegamenti)')"], "rowcount": 0}], "runningtime": "1.24"} | commonswiki_p |
Wikidata:Missing Commons category link on Wikidata | null | SELECT iwl_title, 'P373', CONCAT("\"", REPLACE(page_title, "_", " "), "\""), 'S143', 'Q24731821'
FROM page
JOIN categorylinks C1 ON C1.cl_from=page_id AND C1.cl_to='Creator_templates_with_Wikidata_link:_item_missing_homecat'
JOIN iwlinks ON iwl_from=page_id AND iwl_prefix='wikidata' AND iwl_title LIKE 'Q%'
WHERE
pag... | {"resultsets": [{"headers": ["CONCAT(\"# [[:Categoria:\", page_title, \"]]\")"], "rowcount": 0}], "runningtime": "0.05"} | commonswiki_p |
Wikidata:Missing Commons insitution templates on Wikidata | null | SELECT iwl_title, 'P1612', CONCAT("\"", REPLACE(page_title, "_", " "), "\"") FROM categorylinks
JOIN page ON cl_from=page_id AND page_namespace=106 AND page_is_redirect=0
JOIN iwlinks ON cl_from=iwl_from AND page_id=cl_from AND iwl_prefix='wikidata' AND iwl_title LIKE 'Q%'
WHERE cl_to='Institution_templates_with_Wikida... | {"resultsets": [{"headers": ["actor_name", "count(rev_actor)"], "rowcount": 335}], "runningtime": "3.85"} | commonswiki_p |
Human descriptions in Wikidata | ০১-০৯-২০১৯ | SELECT term_entity_type, term_entity_id FROM wb_terms
WHERE term_type = "description" AND term_language = "en" AND term_entity_type = "item" AND term_text IN ("human","Human"); | {"resultsets": [{"headers": ["concat(\"\u09aa\u09be\u09a4\u09be:\", b.tl_title)"], "rowcount": 21}], "runningtime": "0.42"} | wikidatawiki_p |
Pages in Creator namespace without Creator template | null | SELECT concat("*[[Creator:",page_title, "]]")
FROM page
WHERE page_namespace = 100 -- files only
AND page_is_redirect = 0 -- no redirects
AND NOT EXISTS (
SELECT *
FROM templatelinks
WHERE page_id = tl_from
AND tl_title in ('Creator')
AND tl_namespace = 10
)
LIMIT 100 | {"connection_id": 6724079} | commonwiki_p |
Pikad arutelulehed | null | USE etwiki_p;
SELECT
page_namespace,
page_title,
page_len
FROM page
WHERE page_len > 10000
AND page_namespace = 1
ORDER BY page_len DESC; | {"resultsets": [{"headers": ["ug_user", "ug_group", "ug_expiry", "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"... | etwiki_p |
Vorlagenweiterleitungen mit wenig Einbindungen | null | SELECT CONCAT('# [[Vorlage:', 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_is_redirect = 1
GROUP BY page_title
HAVING COUNT(tl_from) <= 3
ORDER BY COUNT(tl_from) ASC
| {"resultsets": [{"headers": ["page_title", "page length in kB", "CONCAT('https://en.wikipedia.org/wiki/User_talk:',page_title)", "user"], "rowcount": 100}], "runningtime": "0.36"} | dewiki_p |
Commons: Distribution of rc-categorize (Incorrect query) | For https://phabricator.wikimedia.org/T307328 | select count(*), 'categorize-hiddencat' as _query
from recentchanges
join page_props on pp_page = rc_cur_id
where rc_source = 'mw.categorize'
and pp_propname = 'hiddencat'
UNION ALL
select count(*), 'categorize-all' as _query
from recentchanges
where rc_source = 'mw.categorize'
| {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "1.66"} | commonswiki |
zhwp: querycache | null | SELECT *
FROM querycache
LIMIT 100 | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 0}], "runningtime": "0.05"} | zhwiki_p |
zhwp: querycache | null | SELECT *
FROM querycache
LIMIT 100 | {"resultsets": [{"headers": ["actor_id", "actor_user", "actor_name"], "rowcount": 0}], "runningtime": "0.06"} | zhwiki_p |
zhwiki protected_titles | null | SELECT *
FROM protected_titles
LIMIT 100 | {"resultsets": [{"headers": ["page_title"], "rowcount": 255}], "runningtime": "1.83"} | zhwiki_p |
Semi-protected pages in fawiki without {{pp-%}} templates | null | select distinct concat("[[:", page_title, "]]") as Title
from page
join page_restrictions
on pr_page = page_id
join templatelinks
on tl_from = page_id
where tl_from_namespace = 0
and page_namespace = 0
and tl_namespace = 10
and tl_title not like ("pp-%")
and tl_title not in ("pp", "temporarily protected", "permanently ... | {"resultsets": [{"headers": ["url", "pagename", "page_id", "page_is_redirect"], "rowcount": 0}], "runningtime": "97.26"} | fawiki_p |
Desde "ahí" al mundo... | Solo en cambios recientes | use eswiki_p;
SELECT rev_id, page_title, actor_name, rev_timestamp from revision
inner join actor on rev_actor = actor_id
inner join page on rev_page = page_id
where actor_user is null
and (
-- altos
INET_ATON(actor_name) between INET_ATON('181.30.1.32') and INET_ATON('181.30.1.47') OR -- 181.30.1.3... | {"resultsets": [{"headers": ["actor_user", "actor_name", "rev_id", "rev_timestamp", "page_id", "page_title", "rev_page", "rev_actor", "actor_id"], "rowcount": 6}], "runningtime": "0.06"} | eswiki |
Nagydomása hivatkozásai | null | select * from pagelinks
where pl_title='Zemplén' and pl_namespace=10 and pl_from_namespace=0;
select * from pagelinks
where pl_title='Nagydomása'
group by pl_from_namespace;
| {"resultsets": [{"headers": ["page_title"], "rowcount": 100}], "runningtime": "0.21"} | huwiki_p |
zhwiki: row count | null | SELECT COUNT(*)
FROM revision
LEFT JOIN page ON rev_page = page_id
WHERE rev_timestamp >= 20220601000000
AND rev_timestamp < 20220701000000
AND page_namespace = 0 | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 10}], "runningtime": "0.08"} | zhwiki_p |
Images in certain category by the date of upload | null | SELECT DISTINCT I.img_name, I.img_timestamp, U.user_name
FROM commonswiki_p.image I
LEFT JOIN commonswiki_p.page P ON I.img_name=P.page_title
LEFT JOIN commonswiki_p.categorylinks CL ON P.page_id=CL.cl_from
LEFT JOIN commonswiki_p.actor A ON I.img_actor=A.actor_id
LEFT JOIN commonswiki_p.user U ON A.actor_user=... | {"resultsets": [{"headers": ["oresm_name", "perc"], "rowcount": 2}], "runningtime": "2.11"} | commonswiki_p |
Tiempo que un artículo pertenece a {{en obras}} en Wikipedia | null | use eswiki_p;
SELECT distinct page_id, page_title, cl_timestamp, user_name, DATEDIFF(now(), cl_timestamp) as days FROM categorylinks
INNER JOIN page ON cl_from = page_id
INNER JOIN revision ON rev_page = page_id
INNER JOIN actor ON actor_id = rev_actor
INNER JOIN user ON actor_user = user_id
WHERE page_namespace = 0
... | {"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": 1}], "runningtime": "0.07"} | eswiki |
Wikirocznica 6000 edycji+15 lat | null | USE plwiki_p;
SELECT start, user_name
FROM (
SELECT MIN(rev_timestamp) AS start, rev_actor, user_name
FROM revision JOIN actor ON rev_actor = actor_id JOIN user ON actor_user = user_id
WHERE rev_actor IN (6, 7, 8, 10, 13, 18, 20, 23, 24, 26, 29, 31, 32, 38, 44, 45, 50, 55, 56, 65, 77, 85, 87, 94, 97, ... | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_expires"], "rowco... | plwiki_p |
Políticos de Perú editados en eswiki en RC | null | SELECT distinct clp.cl_from, page_title, rc_timestamp, rc_this_oldid, a.actor_name
from (SELECT clchild.cl_from cl_from
FROM categorylinks clparent
inner join page pparent on clparent.cl_from = pparent.page_id
inner join categorylinks clchild on clchild.cl_to = pparent.page_title
WHERE clparent.cl_to = 'Político... | {"resultsets": [], "runningtime": "0.04"} | eswiki_p |
Artículos más revertidos en el último día | null | select rc_title, count(distinct rc_actor) as users, count(1) as editions,
min(rc_timestamp) as first_revert, max(rc_timestamp) as last_revert
from recentchanges
inner join change_tag on ct_rc_id = rc_id
inner join change_tag_def on ctd_id = ct_tag_id
inner join page on rc_cur_id = page_id
where ctd_id in (5,6)
and... | {"resultsets": [{"headers": ["user", "patrol_cnt"], "rowcount": 10}], "runningtime": "0.90"} | eswiki |
Page titles containing “video” on huwiki | null | SELECT * FROM pagelinks
where pl_title like '%558398%';
| {"resultsets": [{"headers": ["page_id", "page_title", "page_len"], "rowcount": 100}], "runningtime": "0.12"} | enwiki_p |
My edit summaries for fixing links | null | SELECT COUNT(*) AS freq, REGEXP_REPLACE(comment_text, "/\\*.*\\*/ *", "") AS summary
FROM actor
JOIN revision_userindex ON rev_actor=actor_id
JOIN `comment` ON comment_id=rev_comment_id AND comment_text LIKE "%improve link%"
WHERE actor_name = "Certes"
GROUP BY summary
HAVING freq > 1
ORDER BY summary | {"resultsets": [{"headers": ["Page title"], "rowcount": 4204}], "runningtime": "2.00"} | enwiki_p |
IP user pages on bnwiki | null | SELECT CONCAT('User:',page_title) FROM page
WHERE page_namespace = 2
AND page_title LIKE '%.%.%.%'
AND page_title REGEXP '^(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 2542}], "runningtime": "855.15"} | bnwiki_p |
bnwiki inactive special users | null | SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', GROUP_CONCAT(ug1.ug_group) AS 'user_groups'
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop', 'bureaucrat', 'checkuser', 'oversight', 'interface-admin', 'autopatrolled', 'filemover', 'reviewer'... | {"resultsets": [{"headers": ["user_name", "user_registration", "time", "user_editcount"], "rowcount": 48}], "runningtime": "40.79"} | bnwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.