title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "12.56", "resultsets": [{"rowcount": 1, "headers": ["page_id", "page_title", "page_len"]}]} | null |
This week new user sandboxs (arwiki) | null | USE arwiki_p;
SELECT
CONCAT('# [[مستخدم:',article.page_title,']]') as "الصفحة", MIN(revision.rev_id) as "النسخة", actor.actor_name as "المستخدم", revision.rev_actor as "معرف المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len as "حجم الصفحة"
FROM revision
inner join actor
on actor_id = rev_actor... | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["page_id", "page_title", "page_len"]}]} | null |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"runningtime": "0.56", "resultsets": [{"rowcount": 0, "headers": ["user", "language", "Centralauth"]}]} | null |
Test | null | USE ptwiki_p; | {"runningtime": "24.45", "resultsets": [{"rowcount": 0, "headers": ["user", "language", "Centralauth"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "590.17", "resultsets": [{"rowcount": 690, "headers": ["page_id", "REPLACE(article.page_title,'_',' ')", "page_len", "oenem"]}]} | null |
T103836 | null | USE wikidatawiki_p;
SELECT CONCAT('Q', wbit_item_id) AS full_entity_id, wbxl_language, wbx_text
FROM wbt_item_terms
JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id
JOIN wbt_text_in_lang ON wbxl_id = wbtl_text_in_lang_id
JOIN wbt_type ON wby_id = wbtl_type_id
JOIN wbt_text ON wbx_id = wbxl_text_id
WHERE wby_name... | {"runningtime": "98.62", "resultsets": [{"rowcount": 39, "headers": ["CONCAT(\"# [[\",REPLACE(ll_title,\"_\",\" \"),\"]] ([[:en:\",REPLACE(article.page_title,\"_\",\" \"),\"|en]])\")", "oenem"]}]} | null |
Select actor_id and actor_user | null | use tewiki_p;
SELECT * from actor
where
actor_name = "Chaduvari"
| {"runningtime": "338.11", "resultsets": [{"rowcount": 1, "headers": ["COUNT(rev_id)"]}]} | null |
Non-redirect Article Pages created by a user in 2020 in tewiki | null | use tewiki_p;
SELECT
rev_timestamp,
page.page_title
FROM
revision,
page,
actor
where
revision.rev_page = page.page_id and
page.page_is_redirect=0 and
rev_actor = actor.actor_id and
actor.actor_name = "Chaduvari" and
page_namespace = 0 and
rev_parent_id = 0 and
rev_timestamp > ... | {"runningtime": "150.80", "resultsets": [{"rowcount": 1, "headers": ["COUNT(rev_id)"]}]} | 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... | {"runningtime": "1496.58", "resultsets": [{"rowcount": 299, "headers": ["page_namespace", "page_title", "rc_timestamp", "rc_this_oldid", "comment_text"]}]} | 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... | {"runningtime": "1235.56", "resultsets": [{"rowcount": 100, "headers": ["ct_id", "ctd_name", "comment_text", "rev_id", "rev_minor_edit", "page_namespace", "page_title", "rev_timestamp", "actor_name"]}]} | 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... | {"connection_id": 634033877} | 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... | {"connection_id": 634058143} | 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... | {"runningtime": "0.27", "resultsets": [{"rowcount": 5, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | 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... | {"runningtime": "0.70", "resultsets": [{"rowcount": 10, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "6.57", "resultsets": [{"rowcount": 2592, "headers": ["pi_property_id"]}]} | 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... | {"runningtime": "1291.33", "resultsets": [{"rowcount": 487858, "headers": ["CONCAT('Q',wbit_item_id)", "concat(\"Darz\")", "CONCAT('\"','\u0642\u0627\u0644\u0628 \u0628\u062a\u0627\u0639 \u0648\u064a\u0643\u064a\u0645\u064a\u062f\u064a\u0627','\"')"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.20", "resultsets": [{"rowcount": 1, "headers": ["page_title"]}]} | null |
Templates in French Wikisource | null | USE frwikisource_p;
SELECT page_title
FROM page
WHERE page_namespace = 10
AND page_title NOT LIKE "%/documentation"
AND page_is_redirect = 0; | {"runningtime": "100.25", "resultsets": [{"rowcount": 1857, "headers": ["actor_user", "count(revactor_rev)"]}]} | null |
External links to Wikipedia in navboxes | null | SELECT DISTINCT page.page_title
FROM page
INNER JOIN templatelinks ON templatelinks.tl_from = page.page_id
INNER JOIN externallinks ON externallinks.el_from = page.page_id
WHERE page.page_namespace = 10
AND templatelinks.tl_title = "Navbox" AND templatelinks.tl_namespace = 10
AND externallinks.el_to LIKE '%wikipedia%'
... | {"runningtime": "7.04", "resultsets": [{"rowcount": 30, "headers": ["CONCAT(\"*[[\",page_title,\"]]\")"]}]} | null |
Deleted Articles in Tewiki in 2020 | null | USE tewiki_p;
select log_title,log_timestamp, actor_name
from
logging,
actor
where
actor_id = log_actor and
log_type = 'delete' and
log_action = 'delete' and
log_namespace = 0 and
log_timestamp>=20200100000000
order by log_timestamp
limit 100 | {"runningtime": "2.63", "resultsets": [{"rowcount": 1000, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"]}]} | null |
Find pages linking to disambiguation-pages on nowiki | Ordered by number of incoming links so that it can be easily exported as a wikitable without further massaging. | USE nowiki_p;
SELECT page_namespace,page_title,page_is_redirect,COUNT(pl_from) CountPlFrom FROM page_props LEFT JOIN page ON pp_page=page_id LEFT JOIN pagelinks ON pl_namespace=page_namespace AND pl_title=page_title AND pl_from_namespace=pl_namespace WHERE pp_propname = "disambiguation" AND pl_from IS NOT NULL GROUP BY... | {"runningtime": "0.33", "resultsets": [{"rowcount": 1, "headers": ["cnt"]}]} | null |
DPLA uploads | null | USE commonswiki_p;
SELECT COUNT(img_name) AS Count,
ROUND(SUM(img_size/(1<<30))) AS Size_GB,
img_media_type AS Type
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "DPLA bot"
GROUP BY Type; | {"connection_id": 91134936} | null |
Find Username of male Users (bnwiki) | null | USE bnwiki_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 'male') as male ON male.up_user=user_id
ORDER BY user_editcount DESC | {"runningtime": "0.36", "resultsets": [{"rowcount": 100, "headers": ["Tables_in_commonswiki_p"]}, {"rowcount": 10, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_... | null |
Size of uploads by Fæ | This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects. | USE commonswiki_p;
SELECT COUNT(img_name) AS Count,
ROUND(SUM(img_size/(1<<30))) AS Size_GB
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "TheImaCow"; | {"runningtime": "0.36", "resultsets": [{"rowcount": 100, "headers": ["Tables_in_commonswiki_p"]}, {"rowcount": 1, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_e... | null |
WP Croatia BLP + citation needed by year | null | use enwiki_p;
select pa.page_title, min(substr(cl_cn.cl_to, -4, 4)) as year
from page pa
inner join categorylinks cl_cn on cl_cn.cl_from = pa.page_id and
(cl_cn.cl_to like "Articles_with_unsourced_statements_from_%" or cl_cn.cl_to like "BLP_articles_lacking_sources_from%")
inner join categorylinks cl_blp on cl_blp.c... | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["img_name"]}]} | null |
Articles in one language but not the other | null | use bnwiki_p;
select count(*)
from page
where page_namespace = 0 and page_is_redirect = 0
and page_id not in (select ll_from from langlinks where ll_lang='de')
| {"runningtime": "2.00", "resultsets": [{"rowcount": 77, "headers": ["CONCAT(\"# [[\",ll_title,\"]] ([[:fr:\",REPLACE(page_title,\"_\",\" \"),\"|fr]])\")"]}]} | null |
Tewiki: Articles with only 1 edit | null | Use tewiki_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
| {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["namespace", "title", "last_edited", "is_redirect"]}]} | null |
enwiki inactive admin users | null | use test2wiki_p;
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', log_timestamp AS 'Last log', ug1.ug_group AS 'user_group'
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop')
JOIN actor
ON actor_user = user_id
JOIN revision_userindex
ON re... | {"runningtime": "74.86", "resultsets": [{"rowcount": 5000, "headers": ["namespace", "title", "url", "last_edited", "rd_interwiki", "rd_namespace", "rd_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "1.07", "resultsets": [{"rowcount": 216, "headers": ["left(rev_timestamp, 6)", "mentor", "count(*)"]}]} | null |
Find files with lat=lon on commons | null | #use dewiki_p; set @ns:=0;
use commonswiki_p;set @ns:=6;
set @iso1:='DE';
#set @iso2:='' or code
set @iso2:='';
select distinct gt_lat, gt_lon, gt_page_id, gt_name,
p1.page_is_redirect as redir,
gt_country,gt_region,
p1.page_namespace as ns,
p1.page_title as title
FROM geo_tags AS g... | {"runningtime": "0.38", "resultsets": [{"rowcount": 144, "headers": ["left(rev_timestamp, 6)", "mentor", "count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "389.90", "resultsets": [{"rowcount": 358, "headers": ["page_namespace", "page_title", "rc_timestamp", "rc_this_oldid", "comment_text"]}]} | null |
Pages and subcategories directly on a specific category, Database management systems | null | use enwiki_p;
SELECT IF(page_namespace = 14, 'category', 'article') as type, page_title FROM categorylinks JOIN page ON page_id = cl_from WHERE cl_to = 'Major_League_Baseball_players_by_team' | {"runningtime": "0.73", "resultsets": [{"rowcount": 77, "headers": ["CONCAT(\"# [[\",tr.ll_title,\"]] ([[:fr:\",REPLACE(page_title,\"_\",\" \"),\"|fr]])\")", "imp", "(CASE WHEN en.ll_title IS NOT NULL THEN CONCAT(\"([[:en:\",en.ll_title,\"]])\") END)"]}]} | null |
Discard2 | null | use tewiki_p;
SELECT ar_actor, actor_name, count(ar_actor) FROM
archive,
page,
actor
WHERE
actor_id=ar_actor and
page.page_title = ar_title and
page.page_is_redirect = 0 and
ar_namespace= 0 and
page_namespace=0 and
ar_parent_id = 0
group by ar_actor
order by count(ar_actor) desc | {"runningtime": "251.40", "resultsets": [{"rowcount": 10, "headers": ["tl_title", "transclusions"]}]} | null |
Discard1 | null | use tewiki_p;
SELECT ar_actor, actor_name, count(ar_actor) FROM
archive,
page,
actor
WHERE
actor_id=ar_actor and
page.page_title = ar_title and
ar_namespace= 0 and
page_namespace=0 and
ar_parent_id = 0
group by ar_actor
order by count(ar_actor) desc | {"runningtime": "5.85", "resultsets": [{"rowcount": 3, "headers": ["tl_title", "transclusions"]}]} | null |
Longest baseball player articles | 100 longest articles of Major League baseball players | #1
SELECT page_title, page_len
#2
FROM enwiki_p.page p
#3
INNER JOIN enwiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN enwiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 0
#6
AND cl.cl_to IN ("Altoona_Mountain_Citys_players","Arizona_Diamondbacks_players","Atlanta_Braves_player... | {"runningtime": "2.41", "resultsets": [{"rowcount": 3, "headers": ["tl_title", "transclusions"]}]} | null |
Tewiki:Recently absent wikipedians - 1 year | null | use tewiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count,
substr(user_registration, 1, 8) as registration_date
from
revision,
actor,
user
where
actor_user = user_id and
user_registration < 20200100000000 and
rev_timestamp < 20200100000000 and
rev_actor = actor_id and
rev... | {"connection_id": 100264190} | null |
Get mainspace revisions to arwiki | null | use arwiki_p;
SELECT *#actor_name,rc_title,SUM(CAST(rc_new_len as signed)-CAST(rc_old_len as signed)) AS byte_count
FROM recentchanges
LEFT JOIN actor ON rc_actor = actor_id
WHERE rc_type = 0
AND rc_namespace = 0
#AND rc_timestamp BETWEEN 20201201000000 AND 20210101000000
AND actor_name in ('Mr. Ibrahem'... | {"runningtime": "990.44", "resultsets": [{"rowcount": 12787, "headers": ["Artikelchen", "event\u00fcll karpotter Link", "Vorschlag"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "34.51", "resultsets": [{"rowcount": 11923, "headers": ["img_name"]}]} | null |
Inter-project category intersection | [11:51] Nadzik: Chciałbym, żeby wyciągnął mi artykuły z en.wiki z jednej kategorii, które nie mają swojego odpowiednika na pl.wiki
[12:27] Nadzik: Weźmy przykład
[12:27] Nadzik: 1.
[12:27] Nadzik: https://pl.wikipedia.org/wiki/Kategoria:Gminy_w_kantonie_Berno
[12:27] Nadzik: 2.
[12:27] Nadzik: https://en.wikipedia.org/... | set @plcat = "Gminy_w_kantonie_Berno";
set @encat = "Municipalities_of_the_canton_of_Bern";
select
page_title
from
enwiki_p.page inner join enwiki_p.categorylinks on cl_from = page_id
where
cl_to = @encat and not page_title in (
select page_title from plwiki_p.page inner join plwiki_p.categorylinks on cl_from = p... | {"runningtime": "35.32", "resultsets": [{"rowcount": 96, "headers": ["page_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "8.95", "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"]}]} | null |
Get nlwiki page schema | null | SHOW tables FROM viwiki_p; | {"runningtime": "0.32", "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"]}]} | null |
Pages in viwiki by size | Pages in viwiki by size | -- Danh sách các bài từ nhỏ đến lớn trong không gian chính.
USE viwiki_p;
SELECT page_namespace AS không_gian,
page_title AS tựa,
page_len AS kích_cỡ
FROM page
WHERE page_namespace = 0 -- Chỉ tính không gian chính
AND page_is_redirect = 0 -- Không tính trang đổi hướng
-- Xếp theo thứ tự từ nhỏ đến lớn theo kích ... | {"runningtime": "0.44", "resultsets": [{"rowcount": 100, "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",... | null |
Tewiki: recently absent Wikipedians - 2 years | null | useuse tewiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count,
substr(user_registration, 1, 8) as registration_date
from
revision,
actor,
user
where
actor_user = user_id and
user_registration < 20190100000000 and
rev_timestamp < 20190100000000 and
rev_actor = actor_id andandand... | {"runningtime": "1.98", "resultsets": [{"rowcount": 1, "headers": ["page_id", "page_title", "page_len", "COUNT(ll_title)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.15", "resultsets": [{"rowcount": 19, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_ti... | null |
All files in Commons's Category:Xeno-canto in one place | (If you expected the contents of a different category after having visited this query before, too bad!) | use commonswiki_p;
SELECT current_date;
SELECT
page_title
FROM page
JOIN categorylinks
ON cl_from = page_id
WHERE cl_to = "Xeno-canto"
AND page_namespace = 6
LIMIT 7600; | {"runningtime": "1.80", "resultsets": [{"rowcount": 0, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_tim... | null |
Lengths of audio files powering Wikiradio stations | Note that any files whose lengths could not be determined by Commons on upload are excluded from the overall lengths printed. | select r.page_title, sum(if((p.pl_title like '%.oga') or (p.pl_title like '%.ogg') or (p.pl_title like '%.opus') or (p.pl_title like '%.OGG'),
substring_index(substring_index(substring_index(q.img_metadata,'"length";',-1),";",1),":",-1),
substring_index(substring_index(substring_index(q.img_metadata,'"playtim... | {"runningtime": "2.05", "resultsets": [{"rowcount": 4, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_tim... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.12", "resultsets": [{"rowcount": 1, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace", "rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | null |
أكثر المستخدمين تعديلًا ضمن مقالات مشروع ويكي طب | null | USE arwiki_p;
select rev_user_text, count(rev_user_text)
from revision
where rev_timestamp between 20200101000000 AND 20201231235959
and rev_page in (select cl_from from categorylinks where cl_from = rev_page and cl_to = "بوابة_طب/مقالات_متعلقة")
group by rev_user_text
ORDER BY count(rev_user_text) desc
limit 100; | {"runningtime": "56.60", "resultsets": [{"rowcount": 20650, "headers": ["cl_from", "page_title"]}]} | null |
Eniten artikkeleita luoneet käyttäjät (fiwiki) | Muokattu By erdo canin tekemästä Quarry-kyselystä ( https://quarry.wmflabs.org/query/14712 ).
Kysely ei laske mukaan ohjaus- eikä täsmennyssivuja. | USE fiwiki_p;
SELECT
COUNT(revision.rev_actor) as cnt,
actor.actor_name
FROM page
JOIN revision
ON page.page_id=revision.rev_page
JOIN actor
ON revision.rev_actor=actor.actor_id
WHERE
page.page_namespace=0
AND page.page_is_redirect=0
AND page.page_id NOT IN (SELECT pp_page FROM page_props WHERE pp_... | {"runningtime": "4.45", "resultsets": [{"rowcount": 0, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_tim... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.11", "resultsets": [{"rowcount": 0, "headers": ["title"]}]} | null |
Categories without interwiki | https://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Interwiki_n%C3%A9lk%C3%BCli_kateg%C3%B3ri%C3%A1k | 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 = 14
AND NOT page_title LIKE 'Csonkok_%'
AND NOT page_title LIKE 'Figyelmet_igénylő_lapok_%'
AND page_is_redirec... | {"runningtime": "765.54", "resultsets": [{"rowcount": 1, "headers": ["Artikelchen", "event\u00fcll karpotter Link", "Vorschlag"]}]} | null |
Dab pairs with titles differing only in case | Find dab pairs with titles differing only in case, such as Can and CAN | SET STATEMENT max_statement_time = 1000 FOR
SELECT UPPER(CONVERT(REPLACE(page_title, "_(disambiguation)", "") USING latin1)) AS canonical, MIN(page_title), MAX(page_title), COUNT(*) as "count"
FROM page
JOIN categorylinks ON cl_from = page_id AND cl_type = 'page' AND cl_to = "All_disambiguation_pages"
WHERE page_namesp... | {"runningtime": "0.68", "resultsets": [{"rowcount": 5, "headers": ["comment_text"]}]} | null |
Unused Templates first 5000 | null | SELECT page_title, r.rev_timestamp
FROM page
LEFT JOIN revision r
on r.rev_page = page.page_id
AND r.rev_timestamp = (
SELECT min(rev_timestamp) from revision
where rev_page = page_id
)
LEFT JOIN templatelinks t1
ON t1.tl_namespace=10 AND t1.tl_title=page_title
WHERE page_namespace=10
AND r.re... | {"runningtime": "261.98", "resultsets": [{"rowcount": 84, "headers": ["page_title", "cl_to"]}]} | null |
Unused Templates first 5000 | null | SELECT page_title, r.rev_timestamp
FROM page
LEFT JOIN revision r
on r.rev_page = page.page_id
AND r.rev_timestamp = (
SELECT min(rev_timestamp) from revision
where rev_page = page_id
)
LEFT JOIN templatelinks t1
ON t1.tl_namespace=10 AND t1.tl_title=page_title
WHERE page_namespace=10
AND r.re... | {"runningtime": "113.52", "resultsets": [{"rowcount": 1, "headers": ["COUNT(DISTINCT page_id)"]}]} | null |
query | null | USE enwiki_p;
SELECT p.page_title
FROM page p
INNER JOIN pagelinks pl ON p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace
INNER JOIN page p2 ON p2.page_id = pl.pl_from
AND pl.pl_from_namespace = 0 and p2.page_is_redirect=0
GROUP BY p.page_title
ORDER BY COUNT(pl.pl_from) DESC; | {"runningtime": "27.98", "resultsets": [{"rowcount": 31, "headers": ["page_namespace", "page_title"]}]} | null |
query2 | null | USE enwiki_p;
SELECT p.page_title
FROM page p
INNER JOIN pagelinks pl ON p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace
INNER JOIN page p2 ON p2.page_id = pl.pl_from
AND pl.pl_from_namespace = 0 and p2.page_is_redirect=0
GROUP BY p.page_title
ORDER BY COUNT(pl.pl_from) DESC;
FETCH FIRST 50 ROWS ONLY | {"runningtime": "0.10", "resultsets": [{"rowcount": 6, "headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | null |
All tables in the enwiki_p database | All of the queriable tables in the public English Wikipedia database. | use enwiki_p
SHOW COLUMNS FROM page; | {"runningtime": "0.09", "resultsets": [{"rowcount": 6, "headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | null |
/Comments redirects (WP:DCS); without R from comment subpage rcat | null | SELECT page_title FROM page
WHERE page_namespace = 1
AND page_is_redirect = 1
AND page_title LIKE "%/Comments"
AND page_id NOT IN (SELECT cl_from FROM categorylinks
WHERE cl_to = "Redirects_from_comment_subpages");
#2432 2382 | {"runningtime": "257.81", "resultsets": [{"rowcount": 46449, "headers": ["page_title"]}]} | null |
Checking for duplicates in vglist | null | USE `wikidatawiki_p`;
SELECT `page_title`, `page_is_redirect`
FROM `page`
WHERE `page_namespace` = 0
AND `page_is_redirect` = 1
AND `page_title` IN (
'Q7486228',
'Q11315618',
'Q11291416',
'Q54317',
'Q24071',
'Q17452',
'Q37229',
'Q44896',
'Q2258213',
'Q53362',
'Q31332',
'Q44373',
'Q2387',
'Q... | {"runningtime": "47.06", "resultsets": [{"rowcount": 1, "headers": ["now()"]}, {"rowcount": 60, "headers": ["rev_id", "rc_timestamp", "actor_name", "rc_title", "comment_text"]}]} | null |
query2 | null | USE enwiki_p;
#DESCRIBE pagelinks;
SELECT p.page_title
FROM page p
#ORDER BY page_title DESC
#INNER JOIN pagelinks pl ON p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace
#INNER JOIN page p2 ON p2.page_id = pl.pl_from
#AND pl.pl_from_namespace = 0 and p2.page_is_redirect=0
#GROUP BY p.page_title
#ORDER ... | {"runningtime": "0.24", "resultsets": [{"rowcount": 2, "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"]}, {"rowcount": 4, "headers": ["ar_id", "ar_namespace"... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.08", "resultsets": [{"rowcount": 1, "headers": ["actor_name", "actor_id"]}]} | null |
ruwiki: Convenient Discussions script usage: number of edits by user (edits with tag) | 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 | {"runningtime": "0.08", "resultsets": [{"rowcount": 6, "headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | null |
Asian-month-2020 in ukwiki | null | 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... | {"runningtime": "0.60", "resultsets": [{"rowcount": 135, "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"]}]} | null |
Android app SuggestedEdits: depicts only, last 30 days | null | use commonswiki_p;
select
count(distinct(rc_id)) as edits,
sum(ctd2.ctd_name="android app edit") as android_app_edits, -- checksum to see that we seeing right ting
sum(ctd2.ctd_name="mw-reverted") as reverted_edits,
sum(ctd2.ctd_name="mw-manual-revert") as reverts,
ctd1.ctd_name, rc_comment,
... | {"runningtime": "0.63", "resultsets": [{"rowcount": 1, "headers": ["Title"]}]} | null |
Android app SuggestedEdits: captions only, last 30 days | null | use commonswiki_p;
select
count(distinct(rc_id)) as edits,
sum(ctd2.ctd_name="android app edit") as android_app_edits, -- checksum to see that we seeing right ting
sum(ctd2.ctd_name="mw-reverted") as reverted_edits,
sum(ctd2.ctd_name="mw-manual-revert") as reverts,
ctd1.ctd_name, rc_comment,
... | {"runningtime": "0.27", "resultsets": [{"rowcount": 90, "headers": ["Tables_in_frwiktionary_p"]}]} | null |
Android app SuggestedEdits examples: depicts only, last 30 days | null | use commonswiki_p;
select
user_name,
user_editcount,
DATEDIFF(STR_TO_DATE(rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc_timestamp/1000000) as rc_day,
substring(rc_title, 1, 40) as title_cut,
rc_comment
from
change_ta... | {"runningtime": "190.74", "resultsets": [{"rowcount": 59300, "headers": ["page_id", "page_title", "page_len"]}]} | null |
Android app SuggestedEdits examples: captions only, last 30 days | null | use commonswiki_p;
select
user_name,
user_editcount,
DATEDIFF(STR_TO_DATE(rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc_timestamp/1000000) as rc_day,
substring(rc_title, 1, 40) as title_cut,
rc_comment
from
change_ta... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_tim... | null |
Tewiki: Users registered in 2019 and made >20 edits | null | use tewiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count,
substr(user_registration, 1, 8) as registration_date
from
revision,
actor,
user
where
actor_user = user_id and
user_registration >= 20190100000000 and
user_registration < 20200100000000 and
rev_timestamp >= 20190100000... | {"runningtime": "105.36", "resultsets": [{"rowcount": 100, "headers": ["actor_name", "articles"]}]} | null |
New Users registered - own registrations only | null | use tewiki_p;
SELECT
`log_actor` AS user_id,
`log_timestamp` AS user_registration
FROM
logging
WHERE
`log_type` = 'newusers' /* exclude proxy registrations */
AND
`log_action` = 'create' /* only include self-created users, exclude attached and proxy-registered users */
AND
`log_timestamp` >= '20200100000000... | {"runningtime": "276.36", "resultsets": [{"rowcount": 100, "headers": ["actor_name", "articles"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "3.66", "resultsets": [{"rowcount": 1143, "headers": ["page_title", "eu_entity_id"]}, {"rowcount": 219, "headers": ["Page not connected to Wikidata"]}]} | null |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
ORDER BY COUNT(*) DESC; | {"runningtime": "0.13", "resultsets": [{"rowcount": 0, "headers": ["linter_id", "linter_page", "linter_cat", "linter_start", "linter_end", "linter_params"]}]} | null |
TOP reviewers pl 2020 | null | USE plwiki_p;
-- Re-format wikitable: `(\d+)\.0\|\|(\S[^|]+)`
-- Replace: `$1 || [[User:$2|$2]] `
SELECT actor_name, review_count
, review_count_i as review_count_intial
, (review_count + review_count_i) as review_count_total
FROM
-- next reviews
(
SELECT actor_name, review_count, IFNULL(review_count_i, 0) as revie... | {"runningtime": "0.07", "resultsets": [{"rowcount": 0, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'כימיה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'כימיה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page inner join ca... | {"runningtime": "208.70", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Tewiki:Month-wsie article creations | null | use tewiki_p;
SELECT
substr(ar_timestamp,1,6),count(substr(ar_timestamp,1,6))
FROM
archive
WHERE
archive.ar_parent_id = 0 AND
ar_namespace = 0
GROUP BY substr(ar_timestamp,1,6)
ORDER BY substr(ar_timestamp,1,6) | {"runningtime": "104.56", "resultsets": [{"rowcount": 0, "headers": ["page_title", "rev_timestamp"]}]} | null |
Android app SuggestedEdits examples: captions only, last 30 days | null | use commonswiki_p;
select
-- user_name,
-- user_editcount,
-- DATEDIFF(STR_TO_DATE(rc1.rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc1.rc_timestamp/1000000) as rc_day,
substring(rc1.rc_title, 1, 40) as title_cut,
REGEXP_SUBST... | {"runningtime": "10.47", "resultsets": [{"rowcount": 3836, "headers": ["il_from", "il_to"]}]} | null |
Android app SuggestedEdits examples: captions edited, last 30 days | captions edited after suggested edits | use commonswiki_p;
select
-- user_name,
-- user_editcount,
-- DATEDIFF(STR_TO_DATE(rc1.rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc1.rc_timestamp/1000000) as rc_day,
substring(rc1.rc_title, 1, 40) as title_cut,
rc1.rc_user_... | {"runningtime": "0.10", "resultsets": [{"rowcount": 2, "headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_tim... | null |
Android app SuggestedEdits examples: captions only, last 30 days | null | use commonswiki_p;
select
ct2.ct_tag_id,
user_name,
user_editcount,
DATEDIFF(STR_TO_DATE(rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc_timestamp/1000000) as rc_day,
substring(rc_title, 1, 40) as title_cut,
rc_comment
... | {"runningtime": "56.57", "resultsets": [{"rowcount": 500, "headers": ["rc_id", "rc_timestamp", "actor_name", "rc_title", "comment_text"]}]} | null |
Android app SuggestedEdits examples: captions edited, last 30 days | - captions edited after suggested edits.
- Reverted edits from suggested edits are filtered out so this is just for showing what are left out from revertion detection | use commonswiki_p;
select
-- user_name,
-- user_editcount,
-- DATEDIFF(STR_TO_DATE(rc1.rc_timestamp, "%Y%m%d%H%i%s"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%s")) as user_age, -- user age in days
floor(rc1.rc_timestamp/1000000) as rc_day,
substring(rc1.rc_title, 1, 40) as title_cut,
rc1.rc_use... | {"runningtime": "54.31", "resultsets": [{"rowcount": 5, "headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]} | null |
Cat link updates | null | select page_id, page_title, page_touched, page_links_updated, cat_pages, cat_subcats from page
join category on (category.cat_title = page.page_title)
where page_namespace = 14 AND page_title LIKE "Use_Irish_English_from_%" | {"runningtime": "0.12", "resultsets": [{"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}]} | null |
Users thanked the most on rowiki – 2020 | null | USE rowiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks" AND log_timestamp >= "20200101000000" AND log_timestamp < "20210101000000"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 20; | {"runningtime": "0.10", "resultsets": [{"rowcount": 3, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | null |
Long-term indef IP hardblocks | null | SET STATEMENT max_statement_time = 100 FOR
SELECT ipb_timestamp, ipb_address, ipb_range_start, ipb_range_end, comment_text
FROM ipblocks
JOIN `comment` ON comment_id = ipb_reason_id
WHERE ipb_anon_only = 0
AND ipb_timestamp < '2020' AND ipb_expiry = 'infinity' AND ipb_user = 0
ORDER BY ipb_timestamp | {"runningtime": "48.57", "resultsets": [{"rowcount": 183, "headers": ["page_namespace", "page_title", "page_is_redirect"]}]} | null |
Tewiki: User-wise File uploads count | null | USE tewiki_p;
SELECT actor_name, count(actor_name) as uploads FROM image,actor
where actor_id=img_actor
group by actor_name
order by count(actor_name) desc | {"resultsets": [{"rowcount": 40, "headers": ["Suspicious_file_title"]}], "runningtime": "18.39"} | null |
Selecting all articles having more than 10 JPG images | null | use frwiki_p;
select page_title, il_from as page_id, count(il_to) as numimages
from imagelinks il
left join page
on page_id=il_from
where il_from_namespace=0
and il_to LIKE ('%.jpg') OR il_to LIKE ('%.JPG') OR il_to LIKE ('%.jpeg') or il_to LIKE ('%.JPEG')
group by il_from
having numimages>10 | {"resultsets": [{"rowcount": 6, "headers": ["page_title", "page_namespace", "page_id"]}], "runningtime": "0.09"} | null |
All first level subcategories of a certain category | null | SELECT P.page_title
FROM euwiki_p.categorylinks CL
JOIN euwiki_p.page P ON CL.cl_from = P.page_id
WHERE P.page_namespace = 14
AND CL.cl_to = 'Txantiloietan_erabiltzeko_txantiloiak' | {"resultsets": [{"rowcount": 3, "headers": ["page_title", "cl_timestamp", "page_namespace"]}], "runningtime": "0.18"} | null |
Images at pt.wiki with old versions and less 500px height | null | USE ptwiki_p;
select
img_name AS "img name",
img_height AS "img height",
oi_name AS "file name",
oi_archive_name AS "version name"
from
image,
oldimage
WHERE img_name = oi_name AND img_height < 501 AND img_height != 0
ORDER BY img_name ASC | {"connection_id": 680868547} | null |
Discarded | null | USE tewiki_p;
SELECT actor_name,
count(actor_name) as Edit_count,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS user_name,
SUM(abs(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed))) AS Gross_byte_count,
SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS nett_byte_count
F... | {"resultsets": [{"rowcount": 9, "headers": ["page_title"]}], "runningtime": "0.09"} | null |
Tewiki: Top 100 users by bytes added in 2020 | null | USE tewiki_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... | {"connection_id": 682320914} | null |
Number of it.wiki pages with external links to Treccani | Just for the sake of curiosity with this query you discover how much pages are citing Treccani as source.
I've done this research just to discover how much "thanks" Treccani should give to Wikipedia while the community is improving their pagerank and visibility :)
Also some credits to iopensa who has lot of ideas abou... | USE itwiki_p;
SELECT
-- number of pages linking Treccani
(
SELECT COUNT(*)
FROM (
SELECT * FROM externallinks
WHERE el_index
LIKE
-- note: this is actually 'https://treccani.it' but it's reverse indexed
'https://it.treccani.%'
OR 'http://it.treccan... | {"resultsets": [{"rowcount": 1, "headers": ["COUNT(DISTINCT page_id)"]}], "runningtime": "141.71"} | null |
991001 mp1 # of direct links to DAB pages (pages) | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM pagelinks JOIN page
WHERE page_is_redirect=0
AND page_namespace=0
AND page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0
)
AND pl_title=page_title
AND pl_namespace ... | {"resultsets": [{"rowcount": 38, "headers": ["user_name", "last edit", "status"]}], "runningtime": "73.74"} | null |
991001 mp1 # of DAB pages | null | USE fawiki_p;
SELECT COUNT(page_title)
FROM page
WHERE page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'); | {"resultsets": [{"rowcount": 28, "headers": ["user_name", "last edit"]}], "runningtime": "76.87"} | null |
991001 # of fa articles | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0; | {"resultsets": [{"rowcount": 27, "headers": ["user_name", "last edit"]}], "runningtime": "122.07"} | null |
991001 mp1 # of redirected links to DAB pages (pages) | null | USE fawiki_p;
SELECT COUNT(pl_title)
FROM pagelinks
LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title
LEFT JOIN redirect ON page_id = rd_from
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_namespace = 0
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0
AND ... | {"resultsets": [{"rowcount": 47, "headers": ["actor_name", "cou", "rev_comment_id", "page_title", "rev_timestamp"]}], "runningtime": "12.14"} | null |
991001 mp1 # of DAB pages with redirected link (pages) | null | USE fawiki_p;
SELECT COUNT(DISTINCT(page_title))
FROM pagelinks
LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title
LEFT JOIN redirect ON page_id = rd_from
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_namespace = 0
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redir... | {"resultsets": [{"rowcount": 47, "headers": ["actor_name", "cou", "rev_comment_id", "page_title", "rev_timestamp"]}], "runningtime": "10.88"} | null |
Users by number of distinct non-redirect articles they have edited | null | use fawiki_p;
select
actor_name,
count(distinct page_id)
from page
join revision_userindex
on rev_page = page_id
join actor_revision
on rev_actor = actor_id
where
page_namespace = 0
and page_is_redirect = 0
and rev_actor not in (
select actor_id
from actor
join user_groups
on ug_user = a... | {"resultsets": [{"rowcount": 207, "headers": ["rev_timestamp", "CONCAT((CASE\n\tWHEN page_namespace = 10 THEN '\u0428\u0430\u0431\u043b\u043e\u043d:'\n\tWHEN page_namespace = 828 THEN '\u041c\u043e\u0434\u0443\u043b\u044c:'\n\tEND), page_title)", "cmnt"]}], "runningtime": "0.81"} | null |
Tewiki testing | null | USE tewiki_p;
set @allNewPages = (select count(substr(rev_timestamp,1,8)) as All_NS_new_pages
from page,revision
where page_id=rev_page
and substr(rev_timestamp,1,6)="202101"
and rev_parent_id=0
and page_is_redirect=0
group by substr(rev_timestamp,1,8));
set @NS0NewPages = (select count(su... | {"resultsets": [{"rowcount": 100, "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", "ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"]... | null |
Poszukiwanie haseł bez linków wewnętrznych | Artykuły polskojęzycznej Wikipedii (niebędące przekierowaniami ani stronami ujednoznaczniającymi), które zawierają najwyżej pięć różnych linków wewnętrznych do innych stron z przestrzeni głównej.
https://pl.wikipedia.org/w/index.php?title=Wikipedia:Kawiarenka/Kwestie_techniczne&diff=61928485&oldid=61927978 | use plwiki_p;
set @max_links = 5;
select page_title, count(distinct pl_title) as n_links
from page inner join pagelinks on pl_from = page_id and pl_from_namespace = 0 and pl_namespace = 0 and page_is_redirect = 0
group by page_id
having n_links <= @max_links and page_id not in (
select page_id
from page inner join... | {"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.71"} | null |
Page 997M history | null | Select ar_title,ar_rev_id,ar_timestamp,ar_deleted,ar_len
from archive
where
ar_rev_id = 997000000
limit 10
| {"resultsets": [{"rowcount": 1001, "headers": ["page_title", "COUNT(*)"]}], "runningtime": "4.92"} | null |
Reply Tool usage/user [before Nov-2020] | null | select actor_name, count(*) as total
from (
select ct.ct_id, ct.ct_rev_id, actor_user, actor_name
from enwiki_p.change_tag ct
inner join enwiki_p.revision_actor_temp rat
on ct.ct_rev_id = rat.revactor_rev
inner join enwiki_p.actor act
on rat.revactor_actor = act.actor_id
inner join enwiki_p.change_tag_def
on ct_tag_id... | {"resultsets": [{"rowcount": 20, "headers": ["user_name"]}], "runningtime": "0.32"} | null |
Reply Tool usage/user [before Nov-2020] | null | select actor_name, count(*) as total
from (
select ct.ct_id, ct.ct_rev_id, actor_user, actor_name
from enwiki_p.change_tag ct
inner join enwiki_p.revision_actor_temp rat
on ct.ct_rev_id = rat.revactor_rev
inner join enwiki_p.actor act
on rat.revactor_actor = act.actor_id
inner join enwiki_p.change_tag_def
on ct_tag_id... | {"resultsets": [{"rowcount": 100, "headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"]}], "runningtime": "14.37"} | null |
Reply Tool usage/user [before Nov-2020] | null | select actor_name, count(*) as total
from (
select ct.ct_id, ct.ct_rev_id, actor_user, actor_name
from enwiki_p.change_tag ct
inner join enwiki_p.revision_actor_temp rat
on ct.ct_rev_id = rat.revactor_rev
inner join enwiki_p.actor act
on rat.revactor_actor = act.actor_id
inner join enwiki_p.change_tag_def
on ct_tag_id... | {"resultsets": [], "runningtime": "0.04"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.