title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
enwp articles without wikidata | null | SELECT page_title FROM page WHERE page_namespace=0 AND page_is_redirect=0 AND page_id NOT IN (SELECT page_id FROM page JOIN page_props ON page_id=pp_page WHERE page_namespace=0 AND pp_propname='wikibase_item'); | {"resultsets": [{"rowcount": 561, "headers": ["concat( \"*[https://en.wikipedia.org/w/index.php?title=Talk:{{urlencode:\",\n p.page_title, \"}}&redirect=no Talk:\", p.page_title, \"] redirects to [[:\", r.rd_title, \"]]\" )"]}], "runningtime": "270.26"} | null |
Users on en-wiki with more than 10,000 edits | null | SELECT user_name
FROM user
WHERE user_editcount >= 10000
ORDER BY user_editcount DESC; | {"resultsets": [{"rowcount": 1358, "headers": ["page_title", "edits"]}], "runningtime": "4.90"} | null |
List of en-wiki users with 10k+ edits | null | SELECT user_name, user_editcount
FROM user
WHERE user_editcount >= 10000
ORDER BY user_editcount DESC; | {"resultsets": [{"rowcount": 0, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}], "runningtime": "0.07"} | null |
Draft | List of articles created for the She Did It Challenge on UkWiki | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT(actor_name) as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
GROUP_CONCAT(
DI... | {"resultsets": [{"rowcount": 12, "headers": ["page_title", "rev_timestamp", "rev_id", "actor_name", "rev_len", "old_len"]}], "runningtime": "67.55"} | null |
Orphaned fair use images (ar) | Returns the list of fair use images that are not presently used in any articles | USE arwiki_p;
SELECT p.page_title FROM page p
INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from
LEFT JOIN imagelinks i ON p.page_title = i.il_to AND (i.il_from_namespace in (0, 1, 2, 3, 4, 5, 11, 12, 100, 118))
LEFT JOIN categorylinks c2 ON p.page_id = c2.cl_from AND c2.cl_to = "ملفات_غير_حرة_يتيمة"
LEFT JOIN redir... | {"resultsets": [{"rowcount": 1, "headers": ["page_title", "rev_timestamp", "rev_id", "actor_name", "new_len", "old_len"]}], "runningtime": "6.85"} | null |
Невідпатрульовані статті в період Вікімарафону 2021 | null | SELECT P.page_title, A.actor_name, R.rev_timestamp
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P ON R.rev_page = P.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P.page_namespace = 0
AND R.rev_timestamp>=20210127220000
AND R.rev_timestamp< 20210128220000
AND P.page_is_redi... | {"connection_id": 770309174} | null |
Get nlwiki page schema | null | DESCRIBE dewiki_p.page; | {"resultsets": [{"rowcount": 1, "headers": ["page_title", "rev_timestamp", "rev_id", "actor_name", "new_len", "old_len"]}], "runningtime": "0.11"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 3, "headers": ["page_title", "rev_timestamp", "rev_id", "actor_name", "new_len", "old_len"]}], "runningtime": "63.07"} | null |
Images and page length ratio in hewiki | רשימה של ערכים לפי מספר תמונות עבור ערכים באורך של 25 אלף ומעלה | use hewiki_p;
select page_title,page_len ,count(*) as ImageCount
from page
inner join imagelinks on il_from=page_id
where page_len>25000 # limit to long pages of length >25K
and page_namespace=0 # limit to main namespace
group by page_id
order by count(*) desc; # order the list by number of images
| {"resultsets": [{"rowcount": 0, "headers": ["time", "user", "namespace", "page", "comment"]}], "runningtime": "0.08"} | null |
wiki edits 2020 (mobile/all) | Based on queries #50040 and #50065. Template used to get percentage in various languages by changing the wiki used. | use zh-hanswiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
substring(rev_timestamp, 1, 4) as year,
sum(ct_rev_id is not null) as mobile_revisions,
count(rev_id) as revisions,
concat(
if(
count(rev_id) = 0,
0,
f... | {"resultsets": [{"rowcount": 31, "headers": ["date", "reviews", "accepts", "declines", "rejects"]}], "runningtime": "32.53"} | null |
Sürüm kontrolü | null | USE trwiki_p;
SELECT CONCAT('[[Kullanıcı:',actor_name,'|',actor_name,']]') AS "Kullanıcı", COUNT(log_actor) AS "Approve" FROM actor
JOIN logging ON (actor.actor_id=logging.log_actor)
WHERE log_timestamp BETWEEN 20210101000000 AND 20210131000000
AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i')
GRO... | {"resultsets": [{"rowcount": 1, "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.10"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 2000, "headers": ["page_id", "page_title", "cl_to"]}], "runningtime": "94.91"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 1, "headers": ["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"]}], "runningtime": "0.09"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 0, "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"]}], "runningtime": "0.08"} | null |
Male vs Female editors (arwiki) | null | SELECT count(user_name) AS "ذكر", (SELECT count(user_name) FROM arwiki_p.user
JOIN arwiki_p.user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'female') AS "أنثى"
FROM arwiki_p.user
JOIN arwiki_p.user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'male' | {"resultsets": [{"rowcount": 0, "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.36"} | null |
Female editors by edits (arwiki) | null | USE arwiki_p;
SELECT user_name, user_editcount
FROM user
RIGHT JOIN (SELECT up_user
FROM user_properties
WHERE up_property LIKE 'gender'
AND up_value LIKE 'female') as female ON female.up_user=user_id
ORDER BY user_editcount DESC | {"resultsets": [{"rowcount": 162, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}], "runningtime": "110.44"} | null |
RedWarn users | null | USE enwiki_p;
SELECT
actor_name as `Username`,
user_editcount as `Edit count`,
user_registration as `Registration date`,
NOT(ug_group IS NULL) as `30/500`,
COUNT(*) as `RedWarn edits`,
COUNT(*)/user_editcount*100 as `RedWarn %`,
ipb_sitewide as `Currently blocked`
FROM revision_userindex
... | {"resultsets": [{"rowcount": 7, "headers": ["page_title"]}], "runningtime": "0.13"} | null |
zhwp: Templates used in interface | null | USE zhwiki_p;
SELECT tl_namespace, tl_title, tl_from
FROM templatelinks
WHERE tl_from_namespace = 8 AND tl_namespace != 8 # AND tl_namespace % 2 = 0
#AND tl_from NOT IN (6709868, 6743456, 5545686, 5733059, 6486575, 3073030) | {"resultsets": [{"rowcount": 1662, "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": "5.34"} | null |
টিটোর কমন্স আপলোড তালিকা, ১৬ জানুয়ারি থেকে ৩১ জানুয়ারি (২০২১) | Titodutta Commons upload between 15 January and 31 January (UTC) | USE commonswiki_p;
SELECT img_name
FROM image
WHERE img_actor = 5449 AND
img_timestamp BETWEEN "20210116000000" AND "20210131235959"
ORDER BY img_timestamp; | {"resultsets": [{"rowcount": 1, "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": "3.83"} | null |
Namespace-0-Vorlageneinbindungen in BKS | null | USE dewiki_p;
SELECT CONCAT("[[", REPLACE(page_title, "_", " "), "]]") AS "BKL-Seite",
GROUP_CONCAT(Kandidaten.tl_title SEPARATOR ", ") AS "eingebundene Namespace-0-Vorlagen"
FROM page as BKS, templatelinks AS BKL, templatelinks AS Kandidaten
WHERE page_namespace = 0
AND Kandidaten.tl_from_namespace = 0
... | {"connection_id": 237405074} | null |
Manually extended confirmed users | null | use enwiki_p;
SELECT user_name, user_editcount, user_registration, ug1.ug_group, ug1.ug_expiry
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('extendedconfirmed')
WHERE ug1.ug_group IS NOT NULL
AND user.user_editcount < 500
AND ug1.ug_expiry IS NULL
; | {"resultsets": [{"rowcount": 0, "headers": ["actor_name", "page_title", "Time_of_Creation"]}], "runningtime": "0.18"} | null |
Articles, created in certain period whose talk pages do not belong to certain category | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp >= 20210128000000
AND R.rev_timestamp < 20210129000000... | {"resultsets": [{"rowcount": 6, "headers": ["page_title"]}], "runningtime": "1.23"} | null |
wiki edits 2020 (mobile/all) | Based on queries #50040 and #50065. Template used to get percentage in various languages by changing the wiki used. | use zh_yuewiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
substring(rev_timestamp, 1, 4) as year,
sum(ct_rev_id is not null) as mobile_revisions,
count(rev_id) as revisions,
concat(
if(
count(rev_id) = 0,
0,
fo... | {"resultsets": [{"rowcount": 1, "headers": ["@dbname", "New CX articles", "New non-CX articles", "Deleted CX articles", "Deleted non-CX articles", "Deleted CX %", "Deleted non-CX %", "Deletion % difference"]}], "runningtime": "0.13"} | null |
Administrators with under one thousand edits | null | use enwiki_p;
SELECT user_name, user_editcount, user_registration, ug1.ug_group, ug1.ug_expiry
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop')
WHERE ug1.ug_group IS NOT NULL
AND user.user_editcount < 1000
AND ug1.ug_expiry IS NULL
; | {"resultsets": [{"rowcount": 7, "headers": ["File name", "Date", "Size", "Uploader's name"]}], "runningtime": "1017.11"} | null |
JJPMaster's test query | I use this for testing literally anything. | SELECT log.log_timestamp AS `time`, user_name AS `user`, log.log_namespace AS `Namespace`, log.log_title AS `page`, log.log_comment AS `comment`
FROM logging AS log
LEFT JOIN user ON log.log_user = user_id
WHERE log.log_type = 'delete'
AND log.log_comment RLIKE "Deleted to make way for move"
ORDER BY log.log_time... | {"connection_id": 240425989} | null |
A contribs | null | use dewiki_p;
select count(distinct rev_page) from revision_userindex where rev_actor=(select actor_id from actor where actor_name='Aka'); | {"resultsets": [{"rowcount": 247, "headers": ["prefix", "count"]}], "runningtime": "0.78"} | null |
Articles, created in certain period whose talk pages do not belong to certain category | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp >= 20210128000000
AND R.rev_timestamp < 20210131000000... | {"resultsets": [{"rowcount": 247, "headers": ["prefix", "count"]}], "runningtime": "1.12"} | null |
Files uploaded in 2021 on jawiki | null | USE jawiki_p;
SELECT actor.actor_name, image.img_name FROM image
JOIN actor on actor_id = image.img_actor
WHERE substr(image.img_timestamp,1,4)="2021"
ORDER BY actor.actor_name, image.img_name | {"resultsets": [{"rowcount": 7, "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", "il_from", "il_to", "il_from_namespace"]}], "runningtime": "53... | null |
Koronaviruspandemia 2019 muokkaukset | null | use fiwiki_p;
select
rev_user_text,
count(distinct(rev_id)) as edits,
count(distinct(floor(rev_timestamp/100000000))) as yearmonth,
min(floor(rev_timestamp/100000000)) as min_yearmonth,
max(floor(rev_timestamp/100000000)) as max_yearmonth
from
page,
categorylinks,
revision_... | {"resultsets": [{"rowcount": 3, "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", "il_from", "il_to", "il_from_namespace"]}], "runningtime": "0.... | null |
Koronaviruspandemia 2019 muokkaukset | null | use fiwiki_p;
select
rev_user_text,
count(distinct(rev_id)) as edits,
count(distinct(floor(rev_timestamp/100000000))) as yearmonth,
min(floor(rev_timestamp/100000000)) as min_yearmonth,
max(floor(rev_timestamp/100000000)) as max_yearmonth
from
page,
categorylinks,
revision_... | {"resultsets": [{"rowcount": 11, "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"]}], "runningtime": "0.13"} | null |
Who deleted my CSDs? | null | SELECT COUNT(*), log.log_user_text, log.log_action, log.log_comment FROM archive_userindex aui
JOIN logging_logindex log ON aui.ar_page_id=log.log_page
WHERE aui.ar_user_text = "Dylsss" AND log_action = "delete"
GROUP BY log.log_action, log.log_user_text
ORDER BY COUNT(*) DESC
LIMIT 50; | {"resultsets": [{"rowcount": 1, "headers": ["actor_name", "page_title", "Time_of_Creation"]}], "runningtime": "0.12"} | null |
Files uploaded in 2003 on jawiki | null | USE jawiki_p;
SELECT actor.actor_name, image.img_name FROM image
JOIN actor on actor_id = image.img_actor
WHERE substr(image.img_timestamp,1,4)="2003"
ORDER BY actor.actor_name, image.img_name | {"resultsets": [{"rowcount": 1, "headers": ["actor_name", "page_title", "Time_of_Creation"]}], "runningtime": "0.10"} | null |
WP Croatia tagged as stub, but not assessed as stub | null | use enwiki_p;
# A redirect, but is not a Redirect-Class WP Croatia article
select *
from page pa
where pa.page_namespace = 0 and pa.page_is_redirect = 0 and
pa.page_title in
(
select pt.page_title
from page pt
inner join categorylinks cl on cl.cl_from = pt.page_id
where pt.page_namespace = 1 and cl.cl_to = "W... | {"resultsets": [{"rowcount": 5056, "headers": ["gt_lat", "gt_lon", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"]}], "runningtime": "99.69"} | null |
wiki edits 2020 (mobile/all) | Based on queries #50040 and #50065. Template used to get percentage in various languages by changing the wiki used. | use zh_hanswiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
substring(rev_timestamp, 1, 4) as year,
sum(ct_rev_id is not null) as mobile_revisions,
count(rev_id) as revisions,
concat(
if(
count(rev_id) = 0,
0,
f... | {"resultsets": [{"rowcount": 18, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 6, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 5, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.29"} | null |
PageRevisionsDetailsByTimeSpan | null | USE enwiki_p;
SELECT revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id, page.page_title, revision.rev_minor_edit,
revision.rev_deleted
FROM revision
JOIN page ON revision.rev_page=page.page_id
WHERE (
page.page_namespace = 0 # main / articles
#AND revision.rev_minor_edit = 0 # o... | {"resultsets": [{"rowcount": 1, "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.10"} | null |
Articles, created in certain period whose talk pages do not belong to certain category | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp >= 20210127000000
AND R.rev_timestamp < 20210128000000... | {"resultsets": [{"rowcount": 112, "headers": ["page_namespace", "page_title", "tl_title"]}], "runningtime": "4.27"} | null |
[BROKEN] nlwiki_p featured-hotlist fr | null | SELECT q.pp_value, page_namespace, page_title
FROM (
SELECT pp_page
FROM frwiki_p.page_props
WHERE
pp_propname='wikibase-badge-Q17437796' AND
pp_value=1
) b, frwiki_p.page_props q, frwiki_p.page
WHERE
b.pp_page=q.pp_page AND
q.pp_propname='wikibase_item' AND
page_id=q.pp_page AND
NOT EXISTS (
SELECT *
... | {"resultsets": [{"rowcount": 1, "headers": ["current_date"]}, {"rowcount": 3, "headers": ["Username", "Number_of_labels_added"]}], "runningtime": "29.37"} | null |
commonswiki: file coordinates by user | null | USE commonswiki_p;
SELECT
gt_lat,
gt_lon,
gt_primary,
gt_dim,
gt_type,
gt_country,
gt_region,
page_title
FROM
geo_tags
JOIN page ON gt_page_id=page_id
JOIN revision_userindex ON gt_page_id=rev_page
JOIN actor_revision ON rev_actor=actor_id
WHERE
rev_parent_id=0
AND actor_name='MisterS... | {"resultsets": [{"rowcount": 909, "headers": ["img_name"]}], "runningtime": "2.56"} | null |
Bengali Wikipedia mobile editors sorted by number of edits since Jan2020 | null | use bnwiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
change_tag,
actor
where
rev_timestamp > 20200100000000 and
ct_rev_id = rev_id and
ct_tag_id = @m... | {"resultsets": [{"rowcount": 11, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 5, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 5, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.79"} | null |
List pages with Info | null | select *
from page p
where
p.page_id = 68253
limit 5
| {"resultsets": [{"rowcount": 8, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.54"} | null |
Template links from 'Member states of the United Nations' | null | select *
from templatelinks
where tl_from_namespace = 0 and
tl_from = 68253
LIMIT 100 | {"resultsets": [{"rowcount": 9, "headers": ["CONCAT('File:', REPLACE(page_title,'_',' '))"]}], "runningtime": "4.94"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}], "runningtime": "10.96"} | null |
#/mainspace pages in Category:Living people 210202 | Number of pages in the enwiki main namespace that are in [[Category:Living people]] and transclude {{Infobox football biography}}. For [[w:en:User:Levivich/Footy AfDs]]. | SELECT COUNT(*)
FROM categorylinks
JOIN page
ON page_id = cl_from
WHERE page_namespace = 0
AND cl_to = 'Living_people'; | {"resultsets": [{"rowcount": 1, "headers": ["Huggle", "Huggle RPM", "STiki", "STiki RPM", "RedWarn", "RedWarn RPM", "Twinkle", "Twinkle RPM"]}], "runningtime": "288.84"} | null |
#/living footballers in main namespace 210202 | Number of pages in the enwiki main namespace that are in [[Category:Living people]] and transclude {{Infobox football biography}}. For [[w:en:User:Levivich/Footy AfDs]]. | SELECT COUNT(*)
FROM page
JOIN templatelinks
ON page_id = tl_from
JOIN categorylinks
ON page_id = cl_from
WHERE page_namespace = 0
AND cl_to = 'Living_people'
AND tl_namespace = 10
AND tl_title = 'Infobox_football_biography'; | {"resultsets": [{"rowcount": 2, "headers": ["user_name", "user_editcount", "user_registration", "ug_group", "ug_expiry"]}], "runningtime": "0.24"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 27, "headers": ["user_name", "user_editcount", "user_registration", "Last edit", "user_groups"]}], "runningtime": "4.64"} | null |
ruwiki: Convenient Discussions script usage: number of edits by user (edits with tag) (2) | null | use ruwiki_p;
select count(*) c, actor_name
from revision
join actor on rev_actor = actor_id
join change_tag on rev_id = ct_rev_id
where
rev_timestamp > "20201118000000" and # new version release
ct_tag_id = 79
group by actor_name
order by c desc | {"resultsets": [{"rowcount": 0, "headers": ["user_name"]}], "runningtime": "0.07"} | null |
Αριθμός κατηγοριών στην elwiki | null | USE elwiki_p;
SELECT COUNT(*)
FROM category | {"resultsets": [{"rowcount": 1, "headers": ["user_id", "user_real_name", "user_email"]}], "runningtime": "0.09"} | null |
Articles, created in certain period whose talk pages do not belong to certain category | null | SELECT P1.page_title, A.actor_name
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P1 ON R.rev_page = P1.page_id
JOIN ukwiki_p.actor A ON R.rev_actor = A.actor_id
WHERE R.rev_parent_id = 0
AND P1.page_namespace = 0
AND P1.page_is_redirect = 0
AND R.rev_timestamp >= 20210128000000
AND R.rev_timestamp < 20210129000000... | {"resultsets": [{"rowcount": 6, "headers": ["pl_from", "pl_title"]}], "runningtime": "41.77"} | null |
Country flag Filenames | null | -- 361082 = Gallery_of_sovereign_state_flags and namespace = 0
-- Country and flag_file_names
SELECT
REGEXP_REPLACE( il.il_to, '^Flag_of_(the_)?(.*?)(_\\([a-zA-Z_]+\\))?\.svg', '\\2' ) as country,
il.il_to as flag_file_names
FROM page p
INNER JOIN imagelinks il on p.page_id = il.il_from and p.page_namespace = il.il... | {"resultsets": [{"rowcount": 100, "headers": ["paged", "rev_len", "max(revision.rev_timestamp)"]}], "runningtime": "9.60"} | null |
wiki edits 2020 (mobile/all) | Based on queries #50040 and #50065. Template used to get percentage in various languages by changing the wiki used. | use bnwiki_p;
set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
substring(rev_timestamp, 1, 4) as year,
sum(ct_rev_id is not null) as mobile_revisions,
count(rev_id) as revisions,
concat(
if(
count(rev_id) = 0,
0,
format... | {"resultsets": [{"rowcount": 100, "headers": ["revid", "rev_len", "rev_timestamp"]}], "runningtime": "137.85"} | null |
PageRevisionsByCategory | Fetches revision details of all pages in a given category, within a given timespan | USE enwiki_p;
SELECT
revision.rev_id, revision.rev_actor, revision.rev_timestamp, revision.rev_parent_id,
pages_by_catrgory_query.page_title, revision.rev_minor_edit, revision.rev_deleted
FROM revision
JOIN (
SELECT
page.page_title, page.page_id, page.page_namespace, page.page_is_redirect,
categorylinks.c... | {"resultsets": [{"rowcount": 1, "headers": ["cl_to", "count"]}], "runningtime": "99.50"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 0, "headers": ["revid", "rev_len", "rev_timestamp", "page_title"]}], "runningtime": "22.14"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 146, "headers": ["User", "Properties created", "Group"]}], "runningtime": "79.60"} | null |
Sin control de autoridades y sin personas | null | use eswiki_p;
SELECT page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 0
AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_title IN ('Control_de_autoridades', 'NF', 'BD'))
AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to IN ('Hombres', 'M... | {"resultsets": [{"rowcount": 34, "headers": ["User", "Properties created", "Group"]}], "runningtime": "70.39"} | null |
Wikisource credits | null | SELECT
actor_name,
COUNT(rev_id) AS count,
(
SELECT 1
FROM enwikisource_p.user_groups
WHERE ug_user = user_id
AND ug_group = 'bot'
) AS bot
FROM
enwikisource_p.revision_userindex
JOIN enwikisource_p.page ON page_id = rev_page
JOIN enwikisource_p.actor_revision ON actor_id = rev_actor
J... | {"resultsets": [{"rowcount": 0, "headers": ["term_row_id", "term_entity_id", "term_full_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"]}], "runningtime": "0.08"} | null |
উইকিভ্রমণ সম্পাদকদের সম্পাদনা সংখ্যা অনুযায়ী তালিকা | নিচের তালিকাটি উইকিভ্রমণের সম্পাদকদের সম্পাদনার ধারাবাহিকতা অনুযায়ী করা হয়েছে। | USE bnwikivoyage_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_editcoun... | {"connection_id": 249182067} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 4, "headers": ["wikitext"]}], "runningtime": "257.05"} | null |
Have BLP but Dead | null | SELECT
pg1.page_title
FROM page AS pg1
JOIN templatelinks
ON pg1.page_id = tl_from
WHERE pg1.page_namespace = 0
AND tl_namespace = 10
AND tl_title = 'BLP_unsourced'
AND NOT EXISTS (SELECT
1
FROM page AS pg2
JOIN categorylinks
ON pg2.page_id = cl_from
... | {"resultsets": [{"rowcount": 434, "headers": ["log_title", "log_timestamp", "actor_name", "comment_text", "mfd_time"]}], "runningtime": "2.00"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 2045, "headers": ["img_name"]}], "runningtime": "5.81"} | null |
Files speedily deleted as F7 in 2020 | null | USE enwiki_p;
SELECT log_id, actor_name AS Deleter, DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS Timestamp, CONCAT('File:', log_title) AS Filename, comment_text AS Reason
FROM logging
JOIN comment_logging ON comment_id = log_comment_id
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'delete'
AND log... | {"resultsets": [{"rowcount": 2220, "headers": ["img_name"]}], "runningtime": "10.25"} | null |
Non-free files in PDF format on enwiki | null | USE enwiki_p;
SELECT page_id, CONCAT('File:', page_title) AS Filename
FROM page
JOIN categorylinks ON cl_from = page_id
WHERE page_title LIKE '%pdf'
AND page_namespace=6
AND page_is_redirect=0
AND cl_to = 'All_non-free_media'
ORDER BY page_id DESC | {"resultsets": [{"rowcount": 2313, "headers": ["img_name"]}], "runningtime": "6.63"} | null |
Categories of each English article | null | select page_id, page_title, cl_to from categorylinks inner join page p1 on cl_from = p1.page_id and p1.page_namespace = 0; | {"resultsets": [{"rowcount": 2376, "headers": ["img_name"]}], "runningtime": "6.74"} | null |
* | null | use jawiki_p;
select *
from ipblocks BK, actor A
where
BK.ipb_by_actor = A.actor_id; | {"resultsets": [{"rowcount": 10, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}], "runningtime": "0.15"} | null |
Využití neexistujících podšablon šablony Data státu | null | use cswiki_p;
select pl_title, count(*) from pagelinks where pl_from_namespace%2 like 0 and pl_from_namespace not like 2 and pl_from not like 661530 and pl_namespace like 10 and pl_title like 'Data_státu/%' and pl_title not in (select page_title from page where page_namespace like 10) and pl_title not like 'Data_státu/... | {"resultsets": [{"rowcount": 100, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}], "runningtime": "0.37"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 72, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "actor_id", "actor_user", "actor_name"]}], "runningtime": "1.60"} | null |
bad XNRs (ruwiki) | null | Use ruwiki_p;
Select page_title, rd_title, rd_namespace from page join redirect on page_id = rd_from
Where page_namespace = 0
And rd_namespace != 0 and rd_namespace != 4 and rd_namespace != 10 and rd_namespace != 12 and rd_namespace != 14 and rd_namespace != 100;
Use ruwiki_p;
Select page_title, rd_title, rd_namespace... | {"resultsets": [{"rowcount": 65, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "comment_id", "comment_hash", "comment_text", "comment_data"]}], "runningtime": "23.47"} | null |
Pages whose item has an image | null | select count(distinct(ips_site_page))
from wikidatawiki_p.wb_items_per_site
left join commonswiki_p.globalimagelinks
on ips_item_id = cast(substring(gil_page_title, 2) as int)
where ips_site_id = 'euwiki'
and gil_page_namespace_id = 0
and gil_wiki='wikidatawiki'
and (gil_to like '%.jpg' or gil_to like '%.jpeg' o... | {"resultsets": [{"rowcount": 509, "headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"]}], "runningtime": "53.50"} | null |
Pages adopting a wikidata image | null | select count(distinct a.ips_site_page)
from (
select ips_site_page, gil_page_title, gil_to
from wikidatawiki_p.wb_items_per_site
left join commonswiki_p.globalimagelinks
on ips_item_id = cast(substring(gil_page_title, 2) as int)
where ips_site_id = 'euwiki'
and gil_page_namespace_id = 0
and gil_wi... | {"resultsets": [{"rowcount": 509, "headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "ns", "title", "gt_country", "gt_region"]}], "runningtime": "166.33"} | null |
Pages of each category | null | select cat_id, cat_title, page_title from category, categorylinks, page where category.cat_title = categorylinks.cl_to and categorylinks.cl_from = page.page_id and page.page_namespace = 0; | {"resultsets": [{"rowcount": 92, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}], "runningtime": "85.33"} | null |
Tewiki: Stubs create din 2020 | null | use tewiki_p;
select DISTINCT
actor_name,
p.page_title,
p.page_len,
rev_timestamp as creation_date
-- concat(mid(rev_timestamp,1,4),"-",mid(rev_timestamp,5,2),"-",mid(rev_timestamp,7,2)) as creation_date
from
revision r,
page p,
actor,
page_props
where
page_id=rev_page
and r.rev_pare... | {"resultsets": [{"rowcount": 2477, "headers": ["img_name"]}], "runningtime": "7.02"} | null |
jawiki: Rxyによるブロック行使 | null | use jawiki_p;
select ipb_id, ipb_address, ipb_timestamp, ipb_expiry, actor_name, comment_text
from ipblocks BK, actor A, `comment` C
where
BK.ipb_by_actor = A.actor_id
and ipb_user <> 0
and ipb_reason_id = comment_id
and actor_name = "Rxy"
-- limit 100
;
select count(*)
from ipblocks; | {"resultsets": [{"rowcount": 0, "headers": ["concat('\u054d\u0587\u0561\u0563\u056b\u0580:', page_title)"]}], "runningtime": "0.09"} | null |
Global lock status of metawiki special users | null | use metawiki_p;
SELECT user_name, gu_locked
FROM user
JOIN user_groups
ON user_id = ug_user
LEFT JOIN centralauth_p.globaluser
ON user_name = gu_name
WHERE ug_group = 'sysop'
AND ug_group = 'bureaucrat'
AND ug_group = 'checkuser'
AND ug_group = 'oversight'
AND ug_group = 'interface-admin'
AND ug_group = 'autopa... | {"resultsets": [{"rowcount": 0, "headers": ["ug_user", "ug_expiry", "user_id", "user_name", "user_registration", "user_editcount"]}], "runningtime": "0.08"} | null |
T215397 | 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 fiwiki_p;
set @dbname = 'fiwiki';
set @ct_tag_id = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
set @created_total = (
select
count(rev_id)
from
page,
revision
where
page_id = rev_page and
page_namespace = 0 and
rev_timestamp like '... | {"resultsets": [{"rowcount": 0, "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": "15.09"} | null |
XNRs (all but main and project space), not rcatted | null | Use enwiki_p;
Select page_namespace, page_title, rd_title from page join redirect on page_id = rd_from
Where page_namespace != 14 and rd_namespace = 14
And page_id not in (Select cl_from from categorylinks where cl_to = "Redirects_to_category_space"); #category space
Select page_namespace, page_title, rd_title from pag... | {"resultsets": [{"rowcount": 1, "headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"]}], "runningtime": "0.13"} | null |
XNRs (all but main and project space), not rcatted | null | Use enwiki_p;
Select page_namespace, page_title, rd_title from page join redirect on page_id = rd_from
Where page_namespace != 14 and rd_namespace = 14
And page_id not in (Select cl_from from categorylinks where cl_to = "Redirects_to_category_space"); #category space
Select page_namespace, page_title, rd_title from pag... | {"resultsets": [{"rowcount": 1, "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.09"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 35, "headers": ["title", "page_len"]}], "runningtime": "11.99"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 1, "headers": ["comment_text", "actor_name", "count(*)"]}], "runningtime": "1.55"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",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... | {"resultsets": [{"rowcount": 31, "headers": ["comment_text", "actor_name", "count(*)"]}], "runningtime": "0.34"} | null |
Bengali Wikipedia Content Translation edits | null | use bnwiki_p;
-- When appropriate, change 'contenttranslation' to 'sectiontranslation'
set @cx_edit_tag = (
select
ctd_id
edit_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
select
date_format(rev_timestamp, "%Y-%m-%d %H:%i:%s") as 'Time',
actor_name as 'Username',
repla... | {"resultsets": [{"rowcount": 35, "headers": ["Madde", "Liste"]}], "runningtime": "1.08"} | null |
Bengali Wikipedia Content Translation edits | null | use bnwiki_p;
-- When appropriate, change 'contenttranslation' to 'sectiontranslation'
set @cx_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
select
date_format(rev_timestamp, "%Y-%m-%d %H:%i:%s") as 'Time',
rev_id as 'Revision ID',
actor_name as 'Us... | {"resultsets": [{"rowcount": 3099, "headers": ["img_name"]}], "runningtime": "8.83"} | null |
SDC edits by user and edit summary | null | USE commonswiki_p;
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 comment_text LIKE '%#WMSE-... | {"resultsets": [{"rowcount": 3780, "headers": ["base_id", "id", "page_title"]}], "runningtime": "12.31"} | null |
SDC edits by user and edit summary | null | USE commonswiki_p;
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 ('AndreCosta... | {"resultsets": [{"rowcount": 22539, "headers": ["page_title"]}], "runningtime": "87.85"} | null |
All articles published on enwn | null | USE enwikinews_p;
SELECT DISTINCT p.page_title, published.cl_timestamp
FROM page p
JOIN categorylinks category ON p.page_id = category.cl_from
JOIN categorylinks published ON p.page_id = published.cl_from
WHERE p.page_namespace = 0
AND published.cl_to = "Published"
ORDER BY published.cl_timestamp DESC
; | {"resultsets": [{"rowcount": 3129, "headers": ["img_name"]}], "runningtime": "8.79"} | null |
Female editors by edits in last 30 days (arwiki) | null | USE arwiki_p;
SELECT concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", count(rev_actor) As "عدد التعديلات في آخر شهر"
FROM revision
JOIN actor ON actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page
AND article.page_namespace = 0 # Add # to count all namespaces
LEFT JOIN use... | {"resultsets": [{"rowcount": 0, "headers": ["CONCAT('# [[:File:', page_title, ']]')"]}], "runningtime": "18.35"} | null |
Male editors by edits in last 30 days (arwiki) | null | USE arwiki_p;
SELECT concat('[[مستخدم:',actor_name,'|',actor_name,']]') AS "المستخدم", count(rev_actor) As "عدد التعديلات في آخر شهر"
FROM revision
JOIN actor ON actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page
AND article.page_namespace = 0 # Add # to count all namespaces
LEFT JOIN use... | {"resultsets": [{"rowcount": 616, "headers": ["page_title"]}], "runningtime": "35.36"} | null |
School Contest 2020 UkWiki | List of articles created for the School Contest 2020 UkWiki | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as... | {"resultsets": [{"rowcount": 31, "headers": ["page_title"]}], "runningtime": "17.29"} | null |
Hrwiki articles by Kubura with only initial edit | null | use hrwiki_p;
select page_title, page_len, actor_name
from page as p
join revision_userindex on rev_page = page_id
join actor_revision on rev_actor = actor_id
where
page_namespace = 0
and page_is_new = 1
and page_is_redirect = 0
and actor_name = "Kubura"
and page_id not in
(
select cl_from
from catego... | {"resultsets": [{"rowcount": 595, "headers": ["page_title"]}], "runningtime": "37.18"} | null |
Top 100 users by bytes added in 2020 - bnwiki | null | USE bnwiki_p;
SELECT actor_name, actor_user,
count(actor_name) as Edit_count,
SUM(abs(CAST(rev.rev_len as signed)-if(rev.rev_parent_id=0,0,CAST(parent.rev_len as signed)))) AS Gross_byte_count,
SUM(CAST(rev.rev_len as signed)-if(rev.rev_parent_id=0,0,CAST(parent.rev_len as signed))) AS nett_byte_count
FROM r... | {"resultsets": [{"rowcount": 100, "headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i", "tag_s"]}], "runningtime": "0.40"} | null |
Most active users by articles on bnwiki | null | USE bnwiki_p;
SELECT
CONCAT("#") AS number,
actor_user AS user_id,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS user_name,
COUNT(rev_id) AS user_editcount
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_... | {"resultsets": [{"rowcount": 100, "headers": ["page_title", "page_count"]}], "runningtime": "0.68"} | null |
Articles with only 1 edit - bnwiki | null | Use bnwiki_p;
SELECT p.page_id, p.page_title, count(r.rev_id)
FROM page AS p
LEFT JOIN revision r ON r.rev_page = p.page_id
WHERE p.page_namespace = 0
and p.page_is_redirect = 0
GROUP BY p.page_id
having count(r.rev_id) = 1
ORDER BY count(r.rev_id) ASC
| {"resultsets": [{"rowcount": 100, "headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i", "tag_s"]}], "runningtime": "0.49"} | null |
Top Patrol bnwiki | null | USE bnwiki_p;
SELECT act.actor_name, count(log_actor)
FROM logging a
LEFT JOIN actor act ON a.log_actor = act.actor_id
WHERE log_action = 'patrol'
GROUP BY log_actor
ORDER BY count(log_actor) DESC
LIMIT 500 | {"resultsets": [{"rowcount": 100, "headers": ["page_title", "page_count", "tag_center", "tag_small", "tag_span", "tag_div", "tag_b", "tag_i", "tag_s"]}], "runningtime": "1.83"} | null |
talk page with no articles bnwiki | null | SET @ns = 1; # Talk namespace number to search
SET @prefix = ''; # Namespace prefix for links (prepended to 'talk:')
USE bnwiki_p;
SELECT CONCAT( '# [[', @prefix, 'আলাপ:', pg.page_title, ']]') AS 'Title'
FROM page pg
WHERE pg.page_is_redirect = 0
AND pg.page_namespace = @ns
AND pg.page_title NOT IN (SELECT pg2.page_ti... | {"resultsets": [{"rowcount": 55, "headers": ["rc_timestamp", "rc_title", "actor_name", "comment_text"]}, {"rowcount": 2, "headers": ["user_name", "ipb_expiry", "comment_text", "Restrictions"]}, {"rowcount": 0, "headers": ["user_name", "gu_locked"]}, {"rowcount": 0, "headers": ["user_name", "groups"]}], "runningtime": "... | null |
Vikikaynak teşekkürleri | null | USE trwikisource_p;
SELECT COUNT(*) AS "Toplam teşekkür", COUNT(DISTINCT actor_name) AS "Toplam teşekkür eden", COUNT(DISTINCT log_title) AS "Toplam teşekkür edilen"
FROM actor
JOIN logging ON (actor.actor_id=logging.log_actor)
WHERE log_action = "thank"
/*AND log_timestamp > DATE_ADD(NOW(), INTERVAL -1 MONTH)*/;
SE... | {"resultsets": [{"rowcount": 1, "headers": ["pages"]}], "runningtime": "448.01"} | null |
Vikigezgin teşekkürleri | null | USE trwikivoyage_p;
SELECT COUNT(*) AS "Toplam teşekkür", COUNT(DISTINCT actor_name) AS "Toplam teşekkür eden", COUNT(DISTINCT log_title) AS "Toplam teşekkür edilen"
FROM actor
JOIN logging ON (actor.actor_id=logging.log_actor)
WHERE log_action = "thank"
/*AND log_timestamp > DATE_ADD(NOW(), INTERVAL -1 MONTH)*/;
SE... | {"resultsets": [{"rowcount": 1, "headers": ["current_date"]}, {"rowcount": 4, "headers": ["Username", "Number_of_labels_added"]}], "runningtime": "52.04"} | null |
Boston Public Library files in Wikimedia Commons (grouped by unique DPLA ID) | null | SELECT COUNT(P.page_title) AS Files, REGEXP_REPLACE(REGEXP_REPLACE(P.page_title, '^.*DPLA_-_', ''), '[\.|_].*$', '') AS DPLA_id
FROM commonswiki_p.page P
JOIN commonswiki_p.categorylinks CL ON P.page_id = CL.cl_from
WHERE CL.cl_to = "Media_contributed_by_Duke_University_Libraries"
GROUP BY DPLA_id
ORDER BY Files DESC | {"resultsets": [{"rowcount": 134, "headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_actor"]}], "runningtime": "1073.87"} | null |
উইকিভ্রমণ সম্পাদকদের সম্পাদনা সংখ্যা অনুযায়ী তালিকা | নিচের তালিকাটি উইকিভ্রমণের সম্পাদকদের সম্পাদনার ধারাবাহিকতা অনুযায়ী করা হয়েছে। | USE bnwikivoyage_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_editcoun... | {"resultsets": [{"rowcount": 8, "headers": ["page_namespace", "page_title"]}], "runningtime": "0.55"} | null |
Most active pending changes reviewers (all time) | null | SELECT logging.log_actor, logging.log_type, COUNT(logging.log_actor) AS accept_count
FROM logging
GROUP BY logging.log_actor
LIMIT 10 | {"resultsets": [{"rowcount": 0, "headers": ["rd_title"]}], "runningtime": "0.82"} | null |
Female editors by edits in last 6 months (plwiki) | null | USE plwiki_p;
SELECT actor_name, count(rev_actor)
FROM revision
JOIN actor ON actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page
AND article.page_namespace = 0 # Add # to count all namespaces
LEFT JOIN user_properties ON
up_user = actor_user
WHERE
rev_timestamp > DATE_SUB(NOW(), INTE... | {"resultsets": [{"rowcount": 2, "headers": ["rd_title"]}], "runningtime": "0.36"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 100, "headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"]}, {"rowcount": 4, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment", "ar_comment_id", "ar_user", "ar_user_text", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_... | null |
صفحات_بها_وصلات_إنترويكي_للإزالة | null | use arwiki_p;
select CONCAT('',page_title,'') AS "موجود في", cl_sortkey_prefix AS " الصفحة ", COUNT(*) AS "عدد الاستخدامات",page_namespace
#page_namespace, page_title, cl_sortkey_prefix, COUNT(*)
from categorylinks join page
on cl_from = page_id
where cl_to = "صفحات_بها_وصلات_إنترويكي_للإزالة"
#and cl_sortkey_prefix ... | {"resultsets": [{"rowcount": 5, "headers": ["concat (\"\u0646\u0642\u0627\u0634:\",page_title)"]}], "runningtime": "16.65"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.