title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
IdeaLab endorsers per month | null | SELECT COUNT(rev_user_text) AS participants, EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`
FROM metawiki_p.page AS p
JOIN metawiki_p.categorylinks AS cl
ON p.page_id = cl.cl_from
JOIN metawiki_p.revision AS r
ON p.pag... | {"resultsets": [{"headers": ["participants", "year", "month"], "rowcount": 7}]} | null |
WLM France 2014 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_France")
... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 795}]} | null |
LPL Unique Users | null | #unique editors to the idealab by WMF
SELECT DISTINCT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
r.rev_user_text AS editors FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
WHERE p.page_namespace IN (200, 201) #Grants and Grants_talk namespaces
AND r.re... | {"resultsets": [{"headers": ["year", "editors"], "rowcount": 17}]} | null |
IdeaLab ideas per month | null | SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`, COUNT(rev_id)
FROM metawiki_p.page AS p
JOIN metawiki_p.categorylinks AS cl
ON p.page_id = cl.cl_from
JOIN metawiki_p.revision AS r
ON p.page_id = r.rev_page
WHERE... | {"resultsets": [{"headers": ["year", "month", "COUNT(rev_id)"], "rowcount": 20}]} | null |
All IdeaLab ideas | with creator, creation date and edit comment | SELECT page_title, rev_user_text, EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`, rev_comment
FROM metawiki_p.page AS p
JOIN metawiki_p.categorylinks AS cl
ON p.page_id = cl.cl_from
JOIN metawiki_p.revision AS r
ON p.p... | {"resultsets": [{"headers": ["page_title", "rev_user_text", "year", "month", "rev_comment"], "rowcount": 130}]} | null |
Learning patterns created per month | no WMF | SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`, COUNT(rev_id)
FROM metawiki_p.page AS p
JOIN metawiki_p.categorylinks AS cl
ON p.page_id = cl.cl_from
JOIN metawiki_p.revision AS r
ON p.page_id = r.rev_page
WHERE... | {"resultsets": [{"headers": ["year", "month", "COUNT(rev_id)"], "rowcount": 15}]} | null |
PEG draft submissions | with creator, create date and edit comment | SELECT page_title, rev_user_text, EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`, rev_comment
FROM metawiki_p.page AS p
JOIN metawiki_p.categorylinks AS cl
ON p.page_id = cl.cl_from
JOIN metawiki_p.revision AS r
ON p.p... | {"resultsets": [{"headers": ["page_title", "rev_user_text", "year", "month", "rev_comment"], "rowcount": 25}]} | null |
IdeaLab editors by month | including distinct ips | #unique editors to the idealab namespace
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(distinct rev_user_text) AS editors FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_i... | {"resultsets": [{"headers": ["year", "month", "editors"], "rowcount": 16}]} | null |
First 100 users of dewiki by id | These are the 100 'oldest' users of German Wikipedia. | USE dewiki_p;
SELECT user_id, user_name, user_editcount
FROM user
LIMIT 100; | {"resultsets": [{"headers": ["user_id", "user_name", "user_editcount"], "rowcount": 100}]} | null |
Number of articles in other languages | null | USE cewiki_p;
SELECT ll_lang, COUNT(*) as total FROM langlinks LEFT JOIN page
ON page_id = ll_from
WHERE page_namespace = 0
GROUP BY ll_lang; | {"resultsets": [{"headers": ["ll_lang", "total"], "rowcount": 283}]} | null |
WLM Thailand 2013 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_Argentina... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 142}]} | null |
Redirect a potenziali disambigue | null | USE itwiki_p;
SELECT CONCAT('# [[', page_title, ']]')
FROM page, pagelinks
WHERE page_namespace = 0
AND page_is_redirect = 1
AND page_id = pl_from
AND pl_namespace = 0
AND pl_title IN
(SELECT page_title
FROM page, templatelinks
WHERE page_id = tl_from
AND tl_namespace = 10
AND page_namespace = 0
AND tl_title = 'Nota_di... | {"resultsets": [{"headers": ["CONCAT('# [[', page_title, ']]')"], "rowcount": 33103}]} | null |
Adição de ESR com FastButtons por usuário por dia | considerando apenas edições que não foram eliminadas, do dia 19/12/2014 a 18/1/2015 | USE ptwiki_p;
SELECT
rc_user_text USUÁRIO,
SUBSTR(rc_timestamp, 1, 8) DIA,
COUNT(*)
FROM recentchanges
WHERE rc_comment = 'Página proposta para [[WP:ESR|eliminação semirrápida]], usando [[WP:FastButtons|FastButtons]]'
GROUP BY rc_user, DIA; | {"resultsets": [{"headers": ["USU\u00c1RIO", "DIA", "COUNT(*)"], "rowcount": 69}]} | null |
Articles with red link images(missing) in Telugu Wikipedia | null | USE tewiki_p;
SELECT
page_title,
il_to
FROM page
JOIN imagelinks
ON page_id = il_from
WHERE (NOT EXISTS(
SELECT
1
FROM image
WHERE img_name = il_to))
AND (NOT EXISTS(
SELECT
1
FROM commonswiki_p.page
WHERE page_title = il_to
AND page_namespace = 6))
AND page_namespace = 0; | {"resultsets": [{"headers": ["page_title", "il_to"], "rowcount": 2328}]} | null |
Namespace - page count Tewikisource | null | USE tewikisource_p;
SELECT
page_namespace,
MAX(notredir),
MAX(redir)
FROM (
SELECT page.page_namespace,
IF( page_is_redirect, COUNT(page.page_namespace), 0 ) AS redir,
IF( page_is_redirect, 0, COUNT(page.page_namespace)) AS notredir
FROM page
GROUP BY page_is_redirect, page_namespace
ORD... | {"resultsets": [{"headers": ["page_namespace", "MAX(notredir)", "MAX(redir)"], "rowcount": 23}]} | null |
Musical instruments on fawiki | null | USE fawiki_p;
SELECT `page_title` FROM `page` WHERE `page_is_redirect` = 0 AND `page_namespace` = 0 AND ((`page_title` LIKE 'ساز%' OR `page_title` LIKE '%(ساز%)') AND `page_title` NOT LIKE 'سازی%' AND `page_title` NOT LIKE 'سازش%' AND `page_title` NOT LIKE 'سازگار%' AND `page_title` NOT LIKE 'سازه%' AND `page_title` NO... | {"resultsets": [{"headers": ["page_title"], "rowcount": 42}]} | null |
List of PSM article titles | null | USE enwikisource_p;
SELECT enwikisource_p.page.*
FROM page
WHERE page.page_title
LIKE ('Popular_Science_Monthly_Volume%')
AND page.page_namespace = 0;
| {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model"], "rowcount": 8932}]} | null |
Feature articles that appeared on the mainpage in English Wikipedia | Gathers a list of articles whose talk pages appear in the hidden category "Featured_articles_that_have_appeared_on_the_main_page" along with their categorization date. | SELECT
article.page_id,
article.page_title,
cl_timestamp
FROM categorylinks
INNER JOIN page talk_page ON
talk_page.page_namespace = 1 AND
cl_from = talk_page.page_id
INNER JOIN page article ON
article.page_namespace = 0 AND
article.page_title = talk_page.page_title
WHERE cl_to = "Featured_articles_that_have_... | {"resultsets": [{"headers": ["page_id", "page_title", "cl_timestamp"], "rowcount": 4002}]} | null |
WLM Thailand 2013 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_Thailand"... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 180}]} | null |
Grants unique editors by quarter | null | #WMF EDITORS - GRANTS NAMESPACE
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(distinct rev_user) AS Grants_WMF_editors FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
... | {"resultsets": [{"headers": ["year", "month", "Grants_WMF_editors"], "rowcount": 1}, {"headers": ["year", "month", "Grants_Community_editors"], "rowcount": 1}, {"headers": ["year", "month", "Evaluation_WMF_editors"], "rowcount": 1}, {"headers": ["year", "month", "Evaluation_Community_editors"], "rowcount": 1}, {"header... | null |
WLM Serbia 2014 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_Serbia")
... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 81}]} | null |
Wikidata - overview of properties with Dutch label | null | use wikidatawiki_p;
SELECT CONCAT('P', term_entity_id) as eigenschapnaam, term_text as eigenschaplabel
from wb_terms
WHERE term_entity_type = 'property' AND term_language = 'nl' and term_type = 'label'
ORDER bY term_entity_id
| {"resultsets": [{"headers": ["eigenschapnaam", "eigenschaplabel"], "rowcount": 1329}]} | null |
PSM article titles and their categories | null | USE enwikisource_p;
SELECT page.page_title, categorylinks.cl_to
FROM categorylinks INNER JOIN page
ON page.page_id = categorylinks.cl_from WHERE page.page_title LIKE
('Popular_Science_Monthly_Volume%') AND page.page_namespace = 0;
| {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 27111}]} | null |
Summer of Monuments WMDC cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wikipedia_Summer_of_Monuments")
AND r.... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 1206}]} | null |
WLM UK 2013 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_the_Unite... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 572}]} | null |
WLM Ukraine 2013 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_Ukraine")... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 585}]} | null |
WLM Thailand 2014 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_Thailand"... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 122}]} | null |
WLM Switzerland 2013 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_Switzerla... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 193}]} | null |
WLM Switzerland 2013 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2013_in_Switzerla... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 193}]} | null |
WLM Switzerland 2014 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_Switzerla... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 97}]} | null |
WLM Serbia 2014 | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_Israel")
... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 383}]} | null |
WikiProject Medicine articles | null | select page_title from page where page_id in (select pl_from from pagelinks where pl_from_namespace=1 and pl_namespace=10 and pl_title="WikiProject_Medicine") order by rand() limit 300; | {"resultsets": [{"headers": ["page_title"], "rowcount": 300}]} | null |
Top 100 dewiki discussion pages by size | These pages are in namespace 1 and ordered by size. | USE dewiki_p;
SELECT page_title, page_len FROM page
WHERE page_namespace = 1
ORDER BY page_len DESC
LIMIT 100; | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 100}]} | null |
Quarry scheint nicht sortieren zu können! | null | USE dewiki_p;
SELECT user_id, user_name, user_editcount
FROM user
ORDER BY user_editcount DESC
LIMIT 100; | {"resultsets": [{"headers": ["user_id", "user_name", "user_editcount"], "rowcount": 100}]} | null |
Meisteditierte Artikel der letzten drei Tage | null | USE dewiki_p;
SELECT rc_title, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 3 DAY),'%Y%m%d%H%i%s')
GROUP BY rc_title ORDER BY num_edits DESC
LIMIT 100; | {"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 100}]} | null |
Īsākās diskusiju lapas | null | #pielikt "no redirect"
USE lvwiki_p;
SELECT page_namespace,page_title,page_len FROM page
WHERE
#page_namespace = 1
(page_namespace <> 3) and
page_namespace % 2 =1
# AND LOWER(page_title) NOT LIKE "%/archive%"
# AND LOWER(page_title) NOT LIKE "%/Arhīvs%"
# AND LOWER(page_title) NOT LIKE "%/arhīvs%"
# AND LOWER(page_tit... | {"resultsets": [{"headers": ["page_namespace", "page_title", "page_len"], "rowcount": 74}]} | null |
Subcategries info | null | USE enwiki_p;
SELECT * FROM categorylinks
WHERE cl_type = "subcat"
limit 100; | {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"], "rowcount": 100}]} | null |
Hourly activity breakdown (since arbitrary date) | null | SELECT CONCAT(Hour, ':00-', Hour+1, ':00') AS Hours
, COUNT(rc_timestamp) AS `usage`
FROM recentchanges
RIGHT JOIN (
SELECT 0 AS Hour
UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3
UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6
UNIO... | {"resultsets": [{"headers": ["Hours", "usage"], "rowcount": 24}]} | null |
Hourly anonymous article edit breakdown (since arbitrary date) | null | SELECT CONCAT(Hour, ':00-', Hour+1, ':00') AS Hours
, COUNT(rc_timestamp) AS `usage`
FROM itwiki_p.recentchanges
RIGHT JOIN (
SELECT 0 AS Hour
UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3
UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6
... | {"resultsets": [{"headers": ["Hours", "usage"], "rowcount": 24}]} | null |
Most edited English Wikipedia articles by links in past 3 days | null | USE enwiki_p;
SELECT rc_title, COUNT(*) AS num_edits -- ,
-- COUNT(DISTINCT pl.pl_from) as inbound_wikilinks
FROM recentchanges
-- JOIN pagelinks AS pl ON rc_title = pl.pl_title
-- AND pl.pl_namespace = 0
WHERE rc_namespace = 0
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 3 DAY),'%Y%m%d%H%i%s')
GROUP B... | {"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 250}]} | null |
WLM Russia 2014 Cohort | null | #1
SELECT DISTINCT rev_user_text, rev_user, cl_to
#2
FROM commonswiki_p.page p
#3
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
#4
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
#5
WHERE p.page_namespace = 6
#6
AND cl.cl_to IN ("Images_from_Wiki_Loves_Monuments_2014_in_Russia")
... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 407}]} | null |
Most edited 50 nlwiki articles over the past week | null | USE nlwiki_p;
SELECT rc_title AS article, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 7 DAY), '%Y%m%d%H%i%s')
GROUP BY article ORDER BY num_edits DESC
LIMIT 50; | {"resultsets": [{"headers": ["article", "num_edits"], "rowcount": 50}]} | null |
Revision info | null | USE hewiki_p;
#SELECT page_id, page_title, rev_id, rev_comment, rev_user_text, rev_user, rev_timestamp, rev_parent_id
#FROM
#(SELECT * From page
# WHERE page_namespace = 0
# AND page_len > 1000
# AND page_is_redirect = 0) as page
#Inner Join
Select * From revision
WHERE rev_minor_edit = 0
AND rev_deleted = 0
AND r... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format"], "rowcount": 100}]} | null |
Find first edits for articles with langlinks | null | SELECT page_id, page_title, rev_page, rev_id , rev_timestamp, rev_user_text, ll_title
FROM
(SELECT ll_from, ll_title FROM hewiki_p.langlinks
WHERE ll_lang ='en'
AND ll_title != "") as helinks
INNER JOIN
(SELECT * From hewiki_p.page
WHERE page_namespace = 0
AND page_len > 1000
AND page_is_redirect = 0) as page
ON... | {"resultsets": [{"headers": ["page_id", "page_title", "rev_page", "rev_id", "rev_timestamp", "rev_user_text", "ll_title"], "rowcount": 100}]} | null |
recent changes to books in user space | null | SELECT rc_title AS title,
rc_id AS id,
rc_user AS user,
rc_timestamp as timestamp,
rc_comment
FROM recentchanges
WHERE rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 DAY), '%Y%m%d%H%i%s')
AND rc_title like "%/Books/%"
AND rc_comment not like "%Created page %" | {"resultsets": [{"headers": ["title", "id", "user", "timestamp", "rc_comment"], "rowcount": 1250}]} | null |
Hebrew articles that are candidates to be a translation | Returns the "candidates" details - page id, page title, first revision in hebrew and in english | SELECT hepage_id, hepage_title, herev_id, he_timestamp, enpage_id, enpage_title,
revision2.rev_id as enrev_id, max_en_timestamp as en_timestamp FROM (
SELECT hepage_id, hepage_title, herev_id, he_timestamp, enpage_id, enpage_title, MAX(enrev_timestamp) as max_en_timestamp
FROM
(SELECT page_id as hepage_id, ... | {"resultsets": [{"headers": ["hepage_id", "hepage_title", "herev_id", "he_timestamp", "enpage_id", "enpage_title", "enrev_id", "en_timestamp"], "rowcount": 85}]} | null |
Ümbersuunamiste arutelulehed | Redirects with standalone talkpages | USE etwiki_p;
SELECT CONCAT('* [[Arutelu:', talk.page_title, ']]') as talkpage, talk.page_len
FROM page AS talk
JOIN page AS art
ON talk.page_title = art.page_title
WHERE
art.page_is_redirect = 1
AND art.page_namespace = 0
AND talk.page_namespace = 1
AND talk.page_is_redirect = 0
ORDER BY talk.page_len ASC; | {"resultsets": [{"headers": ["talkpage", "page_len"], "rowcount": 1597}]} | null |
Hewiki redirections to disambiguations | null | use hewiki_p;
select p1.page_title as 'הפניה', p2.page_title as 'פירושון' from page as p1 join redirect join page as p2 join page_props
on rd_namespace = 0 and p1.page_id = rd_from and p1.page_namespace = 0 and rd_title = p2.page_title and p2.page_id = pp_page
and pp_propname = "disambiguation";
SELECT DISTINCT pp_prop... | {"resultsets": [{"headers": ["\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05e4\u05d9\u05e8\u05d5\u05e9\u05d5\u05df"], "rowcount": 2376}, {"headers": ["pp_propname"], "rowcount": 18}]} | null |
Feeling guilty | List own Commons uploads missing infobox template | USE commonswiki_p;
SELECT distinct(concat("*[[:File:",img_name,"]]")) as img_name, concat("<nowiki>",img_description,"</nowiki>") as img_description FROM image i
INNER JOIN page p ON p.page_title = i.img_name
INNER JOIN categorylinks c2 ON p.page_id = c2.cl_from AND (c2.cl_to = "Media_missing_infobox_template" OR c2.cl... | {"resultsets": [{"headers": ["img_name", "img_description"], "rowcount": 22}]} | null |
Most edited 20 enwiki articles over the past week | Copy this into a new query if it is out of date. Last run: 4 February 2015 | USE enwiki_p;
SELECT rc_title AS article, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 7 DAY), '%Y%m%d%H%i%s')
GROUP BY article ORDER BY num_edits DESC
LIMIT 20; | {"resultsets": [{"headers": ["article", "num_edits"], "rowcount": 20}]} | null |
Top 20 enwiki articles by distinct editors in past week | see https://en.wikipedia.org/wiki/Wikipedia_talk:Wikipedia_Signpost/2015-01-28/From_the_editor
Copy to a new query if this one is out of date. Last run: 4 February 2015 | USE enwiki_p;
SELECT rc_title AS article, COUNT(DISTINCT rc_user) AS num_editors
FROM recentchanges
WHERE rc_namespace = 0
AND rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 7 DAY), '%Y%m%d%H%i%s')
GROUP BY article ORDER BY num_editors DESC
LIMIT 20; | {"resultsets": [{"headers": ["article", "num_editors"], "rowcount": 20}]} | null |
Namespaces | null | USE hewiki_p;
SELECT page_title AS 'from',
CASE page_namespace WHEN -2 THEN "מדיה" WHEN -1 THEN "מיוחד" WHEN 0 THEN ":" WHEN 1 THEN "שיחה" WHEN 2 THEN "משתמש"
WHEN 3 THEN "שיחת משתמש" WHEN 4 THEN "ויקיפדיה" WHEN 5 THEN "שיחת ויקיפדיה" WHEN 6 THEN "קובץ" WHEN 7 THEN "שיחת קובץ"
WHEN 8 THEN "מדיה ויקי" WHEN 9 ... | {"resultsets": [{"headers": ["from", "from ns", "to", "to ns"], "rowcount": 62}]} | null |
From template to anothers | null | USE hewiki_p;
SELECT page_title AS 'from',
CASE page_namespace WHEN -2 THEN "מדיה" WHEN -1 THEN "מיוחד" WHEN 0 THEN ":" WHEN 1 THEN "שיחה" WHEN 2 THEN "משתמש"
WHEN 3 THEN "שיחת משתמש" WHEN 4 THEN "ויקיפדיה" WHEN 5 THEN "שיחת ויקיפדיה" WHEN 6 THEN "קובץ" WHEN 7 THEN "שיחת קובץ"
WHEN 8 THEN "מדיה ויקי" WHEN 9 ... | {"resultsets": [{"headers": ["from", "from ns", "to", "to ns"], "rowcount": 588}]} | null |
Grants Namespace edits WMF | null | #edits to the evaluation portal
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(rev_id) AS edits FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
WHERE p.page_namespace I... | {"resultsets": [{"headers": ["year", "month", "edits"], "rowcount": 17}, {"headers": ["year", "month", "editors"], "rowcount": 17}]} | null |
Grants namespace edits and editors (non-WMF) | null | #edits to the grants namespace by non-WMF
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(rev_id) AS edits FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
WHERE p.page_n... | {"resultsets": [{"headers": ["year", "month", "edits"], "rowcount": 17}, {"headers": ["year", "month", "editors"], "rowcount": 17}, {"headers": ["year", "month", "edits"], "rowcount": 17}, {"headers": ["year", "month", "editors"], "rowcount": 17}]} | null |
Grants:Evaluation edits | null | #edits to the evaluation portal community
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(rev_id) AS edits FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
WHERE p.page_n... | {"resultsets": [{"headers": ["year", "month", "edits"], "rowcount": 17}, {"headers": ["year", "month", "editors"], "rowcount": 17}, {"headers": ["year", "month", "editsWMF"], "rowcount": 17}, {"headers": ["year", "month", "editorsWMF"], "rowcount": 17}]} | null |
IdeaLab ideas by month | null | #count IdeaLab ideas created per month by Community
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS ideas_created
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page... | {"resultsets": [{"headers": ["year", "month", "ideas_created"], "rowcount": 24}, {"headers": ["year", "month", "ideas_created_WMF"], "rowcount": 9}]} | null |
Idea lab ideas created per month | null | #count IdeaLab ideas created per month by community
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS ideas_created_by_Community
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_... | {"resultsets": [{"headers": ["year", "month", "ideas_created_by_Community"], "rowcount": 24}, {"headers": ["year", "month", "ideas_created_WMF"], "rowcount": 9}, {"headers": ["year", "month", "edits_community"], "rowcount": 17}, {"headers": ["year", "month", "edits_WMF"], "rowcount": 17}, {"headers": ["year", "month", ... | null |
Learning Patterns by WMF and non-WMF | null | #count Learning patterns created per month by non-WMF
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS learning_patterns_by_Community
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r... | {"resultsets": [{"headers": ["year", "month", "learning_patterns_by_Community"], "rowcount": 15}, {"headers": ["year", "month", "learning_patterns_by_WMF"], "rowcount": 17}]} | null |
IEG proposals | null | #count IdeaLab ideas created per month
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS grant_proposals
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
INNER ... | {"resultsets": [{"headers": ["year", "month", "grant_proposals"], "rowcount": 14}]} | null |
PEG | null | #count PEG submissions created per month
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS grant_proposals
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
INNE... | {"resultsets": [{"headers": ["year", "month", "grant_proposals"], "rowcount": 45}]} | null |
APG proposals | null | #count PEG submissions created per month
SELECT EXTRACT(YEAR FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `year`,
EXTRACT(MONTH FROM DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) AS `month`,
COUNT(rev_id) AS grant_proposals
FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p.page_id
INNE... | {"resultsets": [{"headers": ["year", "month", "grant_proposals"], "rowcount": 7}]} | null |
Exemple of query for the size of a Category | Size of a category | -- Selecting Wikimedia Commons Database
USE commonswiki_p;
-- Parameter of the query (Category to look for)
SET @cat = "Images_by_PierreSelim";
SELECT /* SLOW_OK */
SUM(image.img_height*image.img_width) AS total_size
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.pag... | {"resultsets": [{"headers": ["total_size"], "rowcount": 1}]} | null |
Enwiki accounts by age and editcount | null | USE enwiki_p;
SELECT
user.user_id, user.user_registration, user.user_editcount, recentchanges.rc_user, recentchanges.rc_timestamp
FROM
user INNER JOIN recentchanges
ON recentchanges.rc_user = user.user_id
WHERE
user.user_registration < 20141001000000
AND user.user_editcount >= 1000
; | {"resultsets": [{"headers": ["user_id", "user_registration", "user_editcount", "rc_user", "rc_timestamp"], "rowcount": 2802483}]} | null |
en wiki accounts created after July 2014 w/> 2000 edits | null | SELECT * FROM user where user_registration > 20140700000000 AND user_editcount > 2000; | {"resultsets": [{"headers": ["user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registration", "user_newpass_time", "user_editcount", "user_password_e... | null |
QI supported by WMFR (2013-2014) | Quality images supported by Wikimedia France (2013-2014) | USE commonswiki_p;
SELECT /* SLOW_OK */ COUNT(*)
FROM
(SELECT /* SLOW_OK */ page.page_title
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
CROSS JOIN categorylinks c2 ON page.page_id = c2.cl_from
LEFT JOIN old... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}]} | null |
Featured pictures from Wiki Loves Monuments 2014 in France | null | USE commonswiki_p;
SELECT /* SLOW_OK */ COUNT(image.img_name)
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
CROSS JOIN categorylinks c2 ON page.page_id = c2.cl_from
WHERE
categorylinks.cl_to = "Images_from_Wiki_Loves_Monuments_2014_i... | {"resultsets": [{"headers": ["COUNT(image.img_name)"], "rowcount": 1}]} | null |
Valued Images from Wiki Loves Monuments 2014 in France | null | USE commonswiki_p;
SELECT /* SLOW_OK */ COUNT(image.img_name)
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
CROSS JOIN categorylinks c2 ON page.page_id = c2.cl_from
WHERE
categorylinks.cl_to = "Images_from_Wiki_Loves_Monuments_2014_i... | {"resultsets": [{"headers": ["COUNT(image.img_name)"], "rowcount": 1}]} | null |
False articles in tewiki | null | SELECT concat("# [[",page_title,"]]") AS page_title, page_len
FROM tewiki_p.page
WHERE page_is_redirect=1 AND page_namespace=0 AND page_len > 200; | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 257}]} | null |
List of rowiktionary users by number of edits (excl. bots) | null | USE rowiktionary_p;
SELECT user_name,
user_editcount
FROM user
WHERE user_id NOT IN /* Exclude local bots. */
(SELECT ug_user
FROM user_groups
WHERE ug_group="bot")
AND user_name NOT IN
(SELECT gu_name
FROM centralauth_p.globaluser JOIN centralauth_p.localuser ON lu_name=gu_name AND lu... | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 100}]} | null |
Files with meaningless names on rowiki | null | USE rowiki_p;
SELECT CONCAT('#[[:File:',page.page_title,']]')
AS Filename FROM page
WHERE page.page_title
REGEXP '^[0-9_-]+.jp[e]?g' LIMIT 100; | {"resultsets": [{"headers": ["Filename"], "rowcount": 14}]} | null |
wikimedia stewards election eligibility stats - editors who have > 600 edits on en | based on SQL from PiRSquared17 | USE enwiki_p;
SELECT COUNT(*)
FROM user
WHERE user_editcount > 600
AND user_id NOT IN /* Exclude local bots. */
(SELECT ug_user
FROM user_groups
WHERE ug_group="bot")
AND user_name NOT IN
(SELECT gu_name
FROM centralauth_p.globaluser JOIN centralauth_p.localuser ON lu_name=gu_name AND lu_wi... | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}]} | null |
Byte Change | null | SELECT page_title, Rev1.`rev_len` as NewRev, Rev2.`rev_len` as OldRev from enwiki_p.revision as Rev1
JOIN enwiki_p.`revision` as Rev2 on Rev2.rev_id = Rev1.rev_parent_id
JOIN enwiki_p.page on `page_id` = Rev1.rev_page
WHERE page_title = "Water"; | {"resultsets": [{"headers": ["page_title", "NewRev", "OldRev"], "rowcount": 8628}]} | null |
recent edits for user 24902 | null | SELECT COUNT(*)
FROM enwiki_p.revision_userindex
WHERE rev_user = 24902
AND rev_timestamp >= 20140801000000;
| {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}]} | null |
Patrollers on Wikidata | Wikidata users per number of patrol edits since 2015/1/1 | USE wikidatawiki_p;
SELECT log_user_text, COUNT(*)
FROM logging
WHERE
log_action='patrol'
AND log_params LIKE '%\"6::auto\";i:0%'
AND log_timestamp>20150101000000
GROUP BY log_user_text; | {"resultsets": [{"headers": ["log_user_text", "COUNT(*)"], "rowcount": 126}]} | null |
Random sample of recent ptwiki edits | null | USE ptwiki_p;
SELECT rc_this_oldid AS rev_id, rc_cur_id AS page_id
FROM recentchanges
WHERE
rc_timestamp < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), "%Y%m%d%H%I%S") AND
rc_type IN (0,1)
ORDER BY RAND()
LIMIT 20000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 20000}]} | null |
Double file extensions on rowiki | null | USE rowiki_p;
SELECT CONCAT("# {{/link|File:", REPLACE(REPLACE(page_title, "_", " "), "=", "="), "}}") AS Filename
FROM page
WHERE page_namespace=6 AND page_is_redirect=0
AND CONVERT(page_title USING utf8) REGEXP "\\.(djvu|gif|jpeg|jpg|flac|mid|wav|ogg|oga|ogv|pdf|png|svg|tif[^f]|tiff|xcf|webm)."
AND CONVERT(page_t... | {"resultsets": [{"headers": ["Filename"], "rowcount": 72}]} | null |
Quality images from Wiki Loves Monuments 2014 in France | null | USE commonswiki_p;
SELECT /* SLOW_OK */ COUNT(image.img_name)
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
CROSS JOIN categorylinks c2 ON page.page_id = c2.cl_from
WHERE
categorylinks.cl_to = "Images_from_Wiki_Loves_Monuments_2014_i... | {"resultsets": [{"headers": ["COUNT(image.img_name)"], "rowcount": 1}]} | null |
Sleeping users | null | SELECT count(DISTINCT u.user_id) as TotalUsers FROM svwiki_p.user u
JOIN svwiki_p.user_groups ug ON u.user_id=ug.ug_user
JOIN svwiki_p.user_properties up ON u.user_id=up.up_user
WHERE u.user_id IN (SELECT r.rev_user FROM svwiki_p.revision r WHERE r.rev_timestamp>20141030000000)
AND up.up_property="gender" AND up.up_val... | {"resultsets": [{"headers": ["TotalUsers"], "rowcount": 1}]} | null |
Remaining interwikilinks dewiki | null | USE dewiki_p;
SELECT page.page_title, CONCAT(iwlinks.iwl_prefix, ":", iwlinks.iwl_title)
FROM page, iwlinks
WHERE iwlinks.iwl_from = page.page_id
AND iwlinks.iwl_title <> ""
AND iwlinks.iwl_prefix NOT IN ("als", "ar", "ang")
AND page.page_namespace = 0
LIMIT 100; | {"resultsets": [{"headers": ["page_title", "CONCAT(iwlinks.iwl_prefix, \":\", iwlinks.iwl_title)"], "rowcount": 100}]} | null |
Block logs of 2014 in FaWP | null | USE fawiki_p;
SELECT log_user_text, log_title, log_params
FROM logging
WHERE log_type='block' AND log_params <> ''
AND log_timestamp > '20140101' AND log_timestamp < '20150101'
AND log_params NOT LIKE 'in%nit%' -- I don't care about infinite/indefinite blocks
AND log_user <> 427882 -- I don't care about blocks by Abuse... | {"resultsets": [{"headers": ["log_user_text", "log_title", "log_params"], "rowcount": 344}]} | null |
Commons DjVu in use coming from archive.org | A query by Dispenser | USE commonswiki_p;
SELECT /*SLOW_OK*/
CONCAT("[[:File:", REPLACE(img_name, "_", " "), "]]") AS "File",
el_from,
img_size,
REPLACE(img_user_text, "_", " ") AS "Uploader",
img_timestamp AS "Timestamp",
el_to,
(SELECT COUNT(*) FROM globalimagelinks WHERE gil_to=page_title) AS "Usage",
(SELECT COUNT(*) FROM... | {"resultsets": [{"headers": ["File", "el_from", "img_size", "Uploader", "Timestamp", "el_to", "Usage", "Reuploads", "Archive_Name"], "rowcount": 15438}]} | null |
Page Links | null | SELECT * from cawiki_p.pagelinks as pl
WHERE pl.pl_from = 1111934
AND pl.pl_from_namespace = 102
; | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 1386}]} | null |
Active image reviewers who are not in OTRS | Image reviewers who are not in OTRS.
Derived from https://quarry.wmflabs.org/query/1941 | USE commonswiki_p;
SELECT user_name, user_editcount, count(*) as num_reviews_in_RC
FROM user
JOIN recentchanges_userindex ON user_id = rc_user
WHERE user_editcount > 10
AND user_id IN /* Include local non-bot image reviewers only. */
(SELECT ug_user
FROM user_groups
WHERE ug_group="Image-reviewer" OR ... | {"resultsets": [{"headers": ["user_name", "user_editcount", "num_reviews_in_RC"], "rowcount": 38}]} | null |
Page namespace pages created in Telugu Wikisource in given month | Page namespace pages created in Telugu Wikisource in given month | use orwikisource_p;
select count(*) as Oct14 from page, revision where rev_page = page_id and rev_parent_id = 0 and page_namespace = 250 and rev_timestamp <= 20141100000000 and rev_timestamp > 20141000000000;
select count(*) as Nov14 from page, revision where rev_page = page_id and rev_parent_id = 0 and page_namespace ... | {"resultsets": [{"headers": ["Oct14"], "rowcount": 1}, {"headers": ["Nov14"], "rowcount": 1}, {"headers": ["Dec14"], "rowcount": 1}]} | null |
ردههایی که «غیر» به واژه پس از خود چسبیده است | null | USE fawiki_p;
SELECT `page_title` FROM `page` WHERE `page_namespace` = 14 AND `page_title` REGEXP '[^\w]غیر[^_]' AND `page_is_redirect` = 0; | {"resultsets": [{"headers": ["page_title"], "rowcount": 106}]} | null |
Editor gender on English Wikipedia | Declared gender of en:wiki users. | SELECT count(user_name) AS Masc, (SELECT count(user_name) FROM enwiki_p.user
JOIN enwiki_p.user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'female') AS Femin
FROM enwiki_p.user
JOIN enwiki_p.user_properties ON up_user = user_id
WHERE up_property = 'gender' AND up_value = 'male'
# derive... | {"resultsets": [{"headers": ["Masc", "Femin"], "rowcount": 1}]} | null |
نوشتارهای «ایالات متحده» که باید به «ایالات متحده آمریکا» منتقل شوند. | null | USE fawiki_p;
SELECT `page_title` FROM `page` WHERE `page_namespace` = 10 AND (`page_title` LIKE '%ایالات_متحده%' AND `page_title` NOT LIKE '%ایالات_متحده_آمریکا%') AND `page_is_redirect` = 0; | {"resultsets": [{"headers": ["page_title"], "rowcount": 59}]} | null |
Alevi draft | null | use hewiki_p;
select page_namespace, page_title, el_to, el_index from page join externallinks
on page_id = el_id
and exists
(select * from templatelinks
where tl_from = page_id
and (tl_title="בבלי" or tl_title="" or tl_title="זוהר" or tl_title="טור" or tl_title="ירושלמי"
or tl_title="משנה" or tl_title='רמב"ם' o... | {"resultsets": [{"headers": ["page_namespace", "page_title", "el_to", "el_index"], "rowcount": 2545}]} | null |
large user talk pages | 1358 | use rowiki_p;
SELECT
page_title, page_touched, page_len
FROM
page
WHERE
page_len > 200000
AND page_namespace=3
AND page_title NOT LIKE '%/%'; | {"resultsets": [{"headers": ["page_title", "page_touched", "page_len"], "rowcount": 11}]} | null |
Hewiki articles without category | null | use hewiki_p;
select page_title from page
where page_namespace = 0
and page_is_redirect = 0
and page_id not in
(select distinct cl_from from categorylinks
where not cl_to like "קצרמר%"
and not (cl_to like "ויקיפדיה:%" and not cl_to = "ויקיפדיה:_ערכים_בעבודה"))
and page_id < 1245567;
select * from page where page_namesp... | {"resultsets": [{"headers": ["page_title"], "rowcount": 172}, {"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model"], "r... | null |
All enwiki users with "example" in username | null | use enwiki_p;
SELECT
user_name
FROM
user
WHERE
user_name LIKE '%example%'
OR user_name LIKE '%Example%' ; | {"resultsets": [{"headers": ["user_name"], "rowcount": 225}]} | null |
New Users | null | SELECT count(*)
FROM commonswiki_p.revision
JOIN commonswiki_p.page
ON rev_page = page_id
WHERE rev_parent_id = 0
AND revision.rev_timestamp > 20121022000000
AND revision.rev_timestamp <= 20121022010000
LIMIT 10 | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | null |
Number of redirects in main namespace on rowiki | null | use rowiki_p;
select COUNT(*) from page
where page_namespace = 0
and page_is_redirect = 1; | {"resultsets": [{"headers": ["COUNT(*)"], "rowcount": 1}]} | null |
Test query | null | SELECT CONCAT("* [[", REPLACE(page.page_title, "_", " "), "]]") AS pages
FROM templatelinks
JOIN page ON page.page_id=tl_from AND page.page_namespace=0
JOIN pagelinks ON pl_from=tl_from
JOIN page AS pl ON pl.page_namespace=pl_namespace AND pl.page_title=pl_title
LEFT JOIN redirect ON rd_from=pl.page_id
LEFT JOIN page A... | {"resultsets": [{"headers": ["pages"], "rowcount": 1517}]} | null |
Users who used AFCH in February 2015 | null | select distinct concat("# [[User:",rev_user_text,"]]") as `username` from revision where
(select page_namespace from page where page_id=revision.rev_page) in (118,5) -- Draft: and Wikipedia talk:
and rev_comment regexp 'AFCH' -- AFCH
and rev_timestamp > 20150200000000 -- February 2015
order by rev_timestamp desc limit ... | {"resultsets": [{"headers": ["username"], "rowcount": 100}]} | null |
Hewiki suspicious redirections | null | USE hewiki_p;
# page - from, rd - to
SELECT
CASE page_namespace WHEN -2 THEN "מדיה" WHEN -1 THEN "מיוחד" WHEN 0 THEN ":" WHEN 1 THEN "שיחה" WHEN 2 THEN "משתמש"
WHEN 3 THEN "שיחת משתמש" WHEN 4 THEN "ויקיפדיה" WHEN 5 THEN "שיחת ויקיפדיה" WHEN 6 THEN "קובץ" WHEN 7 THEN "שיחת קובץ"
WHEN 8 THEN "מדיה ויקי" WHEN 9... | {"resultsets": [{"headers": ["\u05de\u05e8\u05d7\u05d1 \u05d4\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05de\u05e8\u05d7\u05d1 \u05d4\u05d9\u05e2\u05d3"], "rowcount": 25}, {"headers": ["\u05de\u05e8\u05d7\u05d1 \u05d4\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05e9\u05dd \u05d4\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05de\u05e8\u05d7\u05d... | null |
page_id | null | SELECT * from enwiki_p.pagelinks as pl WHERE pl.pl_from = 10261194 AND pl.pl_from_namespace = 4 AND (pl.pl_namespace = 0 OR pl.pl_namespace = 1); | {"resultsets": [{"headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"], "rowcount": 867}]} | null |
Daily anonymous mobile edits from Italian Wikipedia | See http://quarry.wmflabs.org/query/1242 and https://meta.wikimedia.org/wiki/Research:Anonymous_mobile_editing_in_Italian_Wikipedia | /* Forked from http://quarry.wmflabs.org/query/948 */
USE itwiki_p;
SELECT
LEFT(rev_timestamp, 8) AS date,
COUNT(*)
FROM revision_userindex
INNER JOIN tag_summary ON
ts_rev_id = rev_id AND
ts_tags LIKE "%mobile web edit%"
WHERE
rev_timestamp BETWEEN "20141101" AND "20150225" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 105}]} | null |
Users with >5 edits in December 2014 on Swedish Wikipedia | Incl anonymous edits | USE svwiki_p;
SELECT distinct r.rev_user, count(r.rev_id) FROM revision r JOIN page p ON r.rev_page=p.page_id
WHERE r.rev_timestamp BETWEEN 20141201000000 AND 20150100000000 AND p.page_namespace=0 AND r.rev_id<>0
AND r.rev_user NOT IN (
SELECT ug.ug_user from user_groups ug
where ug.ug_group='bot'
)
GROUP BY r.re... | {"resultsets": [{"headers": ["rev_user", "count(r.rev_id)"], "rowcount": 649}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.