title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Bora draft | null | use enwiki_p;
select page_title as "ערך", page_is_redirect as "הפניה", page_len as "גודל", ll_title as "שם בעברית"
from page join langlinks
on
(exists (select * from categorylinks
where cl_to = "Mayors_of_places_in_the_United_States"
and cl_from = page_id)
or exists (select * from categorylinks
where cl_from = page_... | {"resultsets": [{"headers": ["\u05e2\u05e8\u05da", "\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05d2\u05d5\u05d3\u05dc", "\u05e9\u05dd \u05d1\u05e2\u05d1\u05e8\u05d9\u05ea"], "rowcount": 52}]} | null |
Bora draft | null | set @en = "Mayors of places in the United_States";
set @he = "ראשי ערים בארצות הברית";
use enwiki_p;
set @s = replace(@en, " ", "_");
set @t = replace(@he, " ", "_");
select ll_title as "שם" from page inner join langlinks
on page_namespace = 0
and exists
(select * from categorylinks
where cl_from = page_id
and (cl_t... | {"resultsets": [{"headers": ["\u05e9\u05dd"], "rowcount": 35}]} | null |
קטגוריה:צרפת: בתי כנסת | מוהלים | select page_title as "ערך", page_is_redirect as "הפניה", page_len as "גודל", ll_title as "שם בעברית"
from hewiki_p.page join hewiki_p.categorylinks join hewiki_p.langlinks
on cl_to = "מוהלים"
and cl_from = page_id
and page_namespace = 0
and page_id = ll_from
and ll_lang = "en"
| {"resultsets": [{"headers": ["\u05e2\u05e8\u05da", "\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05d2\u05d5\u05d3\u05dc", "\u05e9\u05dd \u05d1\u05e2\u05d1\u05e8\u05d9\u05ea"], "rowcount": 5}]} | null |
شمار ویرایشهای وظیفه ۸ DbBot | ویکیپدیا:سیاست_رباترانی/درخواست_مجوز/dbBot/وظیفه_۸ | USE fawiki_p;
SELECT count(*)
FROM revision
WHERE rev_user = 264911
AND rev_comment LIKE "%ویکیپدیا:سیاست_رباترانی/درخواست_مجوز/dbBot/وظیفه_۸%"; | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | null |
Persone che appongono i template "Tradotto da" dal 2014 | null | USE itwiki_p;
SELECT rev_user_text, COUNT(*)
FROM revision
WHERE rev_page IN (
SELECT tl_from
FROM templatelinks
WHERE tl_title = 'Tradotto_da'
AND tl_namespace = 10
AND tl_from_namespace = 1)
AND rev_parent_id = 0
AND rev_timestamp > 20140000000000
GROUP BY rev_user_text
HAVING COUNT(*) >= 10
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["rev_user_text", "COUNT(*)"], "rowcount": 120}]} | null |
Global renames (count) | null | USE metawiki_p;
SELECT
user_name AS user,
COUNT(log_timestamp) AS renames
FROM logging
JOIN user
ON user_id = log_user
WHERE log_type = 'gblrename'
#AND log_action = '?'
GROUP BY log_user
ORDER by renames DESC; | {"resultsets": [{"headers": ["user", "renames"], "rowcount": 98}]} | null |
Wikidata - given names - frequency of names (en + other lang) | runtime > 3 min | # Frequency of given name items linked from page [[User:Jura1/first names/items (P31: ok, label: tbd)]]
#
# See also https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg
#
use wikidatawiki_p;
#
SELECT
page_title AS item,
term_type,
GROUP_CONCAT(DISTINCT term_language ORDER BY ... | {"resultsets": [{"headers": ["item", "term_type", "lang", "name", "table_output_in_one_cell", "freq", "CURRENT_DATE"], "rowcount": 2595}]} | null |
Persone che appongono i template "Tradotto da" dal 2007 | null | USE itwiki_p;
SELECT rev_user_text, COUNT(*)
FROM revision
WHERE rev_page IN (
SELECT tl_from
FROM templatelinks
WHERE tl_title = 'Tradotto_da'
AND tl_namespace = 10
AND tl_from_namespace = 1)
AND rev_parent_id = 0
AND rev_timestamp > 20070000000000
GROUP BY rev_user_text
HAVING COUNT(*) >= 10
ORDER BY COUNT(*) DESC | {"resultsets": [{"headers": ["rev_user_text", "COUNT(*)"], "rowcount": 618}]} | null |
Zion draft | null | set @category = "People from Dublin (city)";
select page_title as "ערך", page_is_redirect as "הפניה", page_len as "גודל", ll_title as "שם בעברית"
from enwiki_p.page join enwiki_p.categorylinks join enwiki_p.langlinks
on cl_to = replace(@category, " ", "_")
and cl_from = page_id
and page_namespace = 0
and page_id = ll_... | {"resultsets": [{"headers": ["\u05e2\u05e8\u05da", "\u05d4\u05e4\u05e0\u05d9\u05d4", "\u05d2\u05d5\u05d3\u05dc", "\u05e9\u05dd \u05d1\u05e2\u05d1\u05e8\u05d9\u05ea"], "rowcount": 25}]} | null |
Hewiki articles with maybe unexisting pictures | null | use hewiki_p;
select
CASE p1.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 THEN "שיחת מדיה ויק... | {"resultsets": [{"headers": ["\u05de\u05e8\u05d7\u05d1 \u05d4\u05e9\u05dd", "\u05e9\u05dd \u05d4\u05e2\u05e8\u05da"], "rowcount": 4044}]} | null |
Hewiki short articles | null | USE hewiki_p;
SELECT page_len, page_title FROM page
WHERE page_namespace = 0
AND page_len < 1500
AND page_is_redirect = 0
AND NOT page_title REGEXP ".*[0-9].*"
AND NOT EXISTS
(SELECT * FROM templatelinks
WHERE page_id = tl_from
AND tl_title in ("פירושונים", "בעבודה", "בעבודה_אקדמית", "הפרת_זכויות_יוצרים"))
| {"resultsets": [{"headers": ["page_len", "page_title"], "rowcount": 8383}]} | null |
Uncategorized Wikipedia and Wikipedia talk pages on huwiki | null | use huwiki_p;
SELECT concat('# [[Wikipédia:', page_title, ']]') as 'Wikipédia'
FROM page LEFT JOIN categorylinks ON cl_from = page_id
WHERE cl_from IS NULL and page_namespace = 4 and page_is_redirect = 0;
SELECT concat('# [[Wikipédia-vita:', page_title, ']]') as 'Wikipédia-vita'
FROM page LEFT JOIN categorylinks ON c... | {"resultsets": [{"headers": ["Wikip\u00e9dia"], "rowcount": 678}, {"headers": ["Wikip\u00e9dia-vita"], "rowcount": 1246}]} | null |
مقالههای شهرستانهای ایران با تغییرمسیر از بخش | مقالههایی از شهرستانهای ایران که از عنوانی «بخش...» تغییرمسیر دارند. ایرانی بودن از روی داشتن الگویی با عنوان ایران تشخیص داده شده. |
USE fawiki_p;
SELECT DISTINCT rd_title AS 'عنوان مقاله',
rd_source.page_title AS 'عنوان صفحهٔ تغییرمسیر'
FROM redirect
LEFT JOIN page rd_target ON rd_title = page_title
LEFT JOIN page rd_source ON rd_source.page_id = rd_from
WHERE rd_namespace = 0
AND rd_source.page_title LIKE 'بخش%'
AND rd_target.page_t... | {"resultsets": [{"headers": ["\u0639\u0646\u0648\u0627\u0646 \u0645\u0642\u0627\u0644\u0647", "\u0639\u0646\u0648\u0627\u0646 \u0635\u0641\u062d\u0647\u0654 \u062a\u063a\u06cc\u06cc\u0631\u0645\u0633\u06cc\u0631"], "rowcount": 24}]} | null |
Daily anonymous mobile edits, German Wikipedia | see
http://quarry.wmflabs.org/query/1242 ,
http://quarry.wmflabs.org/query/2256
http://quarry.wmflabs.org/query/2634
http://www.gossamer-threads.com/lists/wiki/wikitech/582998
https://meta.wikimedia.org/wiki/Research:Mobile_anonymous_apocalypse | /* Forked from http://quarry.wmflabs.org/query/948 */
USE dewiki_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 "20150101" AND "20150428" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 42}]} | null |
Daily anonymous mobile edits, Italian Wikipedia | see
http://quarry.wmflabs.org/query/1242 ,
http://quarry.wmflabs.org/query/2256
http://quarry.wmflabs.org/query/2634
http://quarry.wmflabs.org/query/3376
http://www.gossamer-threads.com/lists/wiki/wikitech/582998
https://meta.wikimedia.org/wiki/Research:Mobile_anonymous_apocalypse | /* 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 "20150101" AND "20150429" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 107}]} | null |
Women scientists of contested notability (enwiki) | Articles tagged by WikiProject Women Scientists that are also in the category "All articles with topics of unclear notability" | use enwiki_p;
select page.page_title from page
inner join categorylinks on page.page_id=categorylinks.cl_from
where page_namespace = 0
and cl_to = "All_articles_with_topics_of_unclear_notability"
and page_title in (select distinct page.page_title from categorylinks
inner join page on categorylinks.cl_from = page.page_i... | {"resultsets": [{"headers": ["page_title"], "rowcount": 41}]} | null |
daily wikidata edits "new editor removing sitelink" | daily wikidata edits "new editor removing sitelink" 2015-01-01 to 2015-04-29
http://quarry.wmflabs.org/query/3376
https://www.wikidata.org/wiki/Special:Tags | USE wikidatawiki_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 "%new editor removing sitelink%"
WHERE
rev_timestamp BETWEEN "20150101" AND "20150429" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 118}]} | null |
Ogen draft | null | use hewiki_p;
select tl_from, tl_from_namespace from templatelinks where tl_title = "עוגן";
select tl_from, tl_from_namespace from templatelinks where tl_title = "עוגן2" | {"resultsets": [{"headers": ["tl_from", "tl_from_namespace"], "rowcount": 479}, {"headers": ["tl_from", "tl_from_namespace"], "rowcount": 148}]} | null |
Bora wikidata | null | use wikidatawiki_p;
SELECT term_entity_id, term_text
from wb_terms
WHERE term_entity_type = 'property' AND term_language = 'he' and term_type = 'label'
ORDER bY term_entity_id; | {"resultsets": [{"headers": ["term_entity_id", "term_text"], "rowcount": 498}]} | null |
itwiki articles with {{Link V}} or {{Link VdQ}} | null | USE itwiki_p;
SELECT COUNT(DISTINCT(page_title)) FROM page
INNER JOIN templatelinks ON tl_from = page_id AND tl_namespace = 10 AND tl_title IN ('Link_V', 'Link_VdQ')
WHERE page_namespace = 0 | {"resultsets": [{"headers": ["COUNT(DISTINCT(page_title))"], "rowcount": 1}]} | null |
פעיל | null | set @category = "Burials at Père Lachaise Cemetery";
select page_title as "ערך", ll_title as "שם בעברית"
from enwiki_p.page join enwiki_p.categorylinks join enwiki_p.langlinks
on cl_to = replace(@category, " ", "_")
and cl_from = page_id
and page_namespace = 0
and page_id = ll_from
and ll_lang = "he" | {"resultsets": [{"headers": ["\u05e2\u05e8\u05da", "\u05e9\u05dd \u05d1\u05e2\u05d1\u05e8\u05d9\u05ea"], "rowcount": 171}]} | null |
Google Translation Project(2009-2011) Articles | Gives a listing of pages from the category:'గూగుల్_అనువాద_వ్యాసాలు' on tewiki_p | use tewiki_p;
SELECT page_title
FROM page
LEFT JOIN categorylinks ON categorylinks.cl_from = page.page_id
WHERE (page.page_namespace = 0 AND categorylinks.cl_to= 'గూగుల్_అనువాద_వ్యాసాలు')
ORDER BY page_title
| {"resultsets": [{"headers": ["page_title"], "rowcount": 979}]} | null |
itwiki Articles vs Edit count | null | use svwiki_p;
SELECT rev_user_text, min(rev_timestamp), count(*) e_c, count(distinct rev_page) a_c, count(*)/count(distinct rev_page),rev_user from revision_userindex group by rev_user_text;
/*select count(case when rev_deleted>0 then 1 else null end) from revision_userindex where rev_user_text="Chobot";*/ | {"resultsets": [{"headers": ["rev_user_text", "min(rev_timestamp)", "e_c", "a_c", "count(*)/count(distinct rev_page)", "rev_user"], "rowcount": 842748}]} | null |
lvwiki invalid navbar links | null | use lvwiki_p;
SELECT CONCAT('Veidne:', replace(page.page_title, '_', ' ')) AS template, tp.param_value
FROM s51454__tmpl_params_p.lvwiki as tp, page
WHERE tp.template_name = 'Navbox' AND tp.param_name = 'name' AND tp.page_id = page.page_id
AND replace(tp.param_value, '_', ' ') <> replace(page.page_title, '_', ' ') | {"resultsets": [{"headers": ["template", "param_value"], "rowcount": 26}]} | null |
Editor Activity on pl | null | use plwiki_p;
select rev_user_text,max(rev_timestamp), min(rev_timestamp), count(*) from revision join page on revision.rev_page=page.page_id where page_namespace=0 and page_is_redirect=0 group by rev_user; | {"resultsets": [{"headers": ["rev_user_text", "max(rev_timestamp)", "min(rev_timestamp)", "count(*)"], "rowcount": 140234}]} | null |
WikiProject article quality categories (enwiki) | Wikipedia articles, sorted by WikiProject, further sorted by quality. Discover the wonder. | select page_title from page
where page_namespace = 14
and (page_title like "%-Class_%_articles"
or page_title like "Unassessed_%_articles"
or page_title like "WikiProject_%_articles")
and page_title not like "%-importance_%"
and page_title not like "Wikipedia_%"
and page_title not like "Template-%"
and page_t... | {"resultsets": [{"headers": ["page_title"], "rowcount": 24065}]} | null |
Categories on English Wikipedia that are soft redirects | null | use enwiki_p;
select page.page_title from page
join categorylinks on page.page_id = categorylinks.cl_from
where cl_to = "Wikipedia_soft_redirected_categories"
and page_namespace = 14; | {"resultsets": [{"headers": ["page_title"], "rowcount": 27363}]} | null |
Registered users and edits | null | select * from user where user_registration >'20150401000000' and user_registration < '20150402000000' and (select count(*) from revision_userindex where rev_user = user_id) = user_editcount; | {"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 |
Stub articles created in January | null | use knwiki_p;
#desc revision;
#desc page;
select p.page_title,r.rev_user_text,p.page_len from revision r, page p where r.rev_parent_id = 0 and r.rev_len < 2048 and p.page_len < 2048 and p.page_namespace = 0 and p.page_is_redirect = 0 and rev_timestamp < '20140200000000' and rev_timestamp > '20131231235959' and r.rev_pa... | {"resultsets": [{"headers": ["page_title", "rev_user_text", "page_len"], "rowcount": 171}]} | null |
WikiTrends-1 Top Contributors | Top contributors for one month of first phase of wikitrends project on tewiki | use tewiki_p;
SELECT
user_name,
COUNT(*) As Edits
FROM user
LEFT JOIN revision
ON rev_user = user_id
LEFT JOIN page
ON page_id = rev_page
WHERE rev_timestamp >= '20140201000000'
AND rev_timestamp <= '20140301000000'
AND page_namespace = 0
AND page_title IN (SELECT page_title
FROM page
... | {"resultsets": [{"headers": ["user_name", "Edits"], "rowcount": 19}]} | null |
List of articles tagged by WikiProject African Diaspora (enwiki) | A list of articles (technically, article talk pages and draft talk pages) tagged as part of WikiProject African Diaspora. May not be perfect. | use enwiki_p;
select distinct page.page_title,page.page_namespace from categorylinks
inner join page on categorylinks.cl_from=page.page_id
where (page_namespace = 1 or page_namespace = 119)
and cl_to in ("A-Class_African_diaspora_articles",
"B-Class_African_diaspora_articles",
"C-Class_Afr... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 3631}]} | null |
WikiProject red-link assessment categories (enwiki) | These assessment categories are in use throughout English Wikipedia but do not have corresponding category pages. | use enwiki_p;
select distinct cl_to from categorylinks
left join page on cl_to = page_title and page_namespace = 14
where (cl_to like "%-Class_%_articles"
or cl_to like "Unassessed_%_articles"
or cl_to like "%-importance_%_articles"
or cl_to like "%-priority_%_articles")
and page_title is null; | {"resultsets": [{"headers": ["cl_to"], "rowcount": 310}]} | null |
All Editors | null | use hewiki_p;
select rev_user, rev_user_text, max(rev_timestamp), min(rev_timestamp) from revision where rev_user !=0 and lower(CONVERT(rev_user_text USING latin1)) not like '%bot%' group by rev_user having count(*)>4; | {"resultsets": [{"headers": ["rev_user", "rev_user_text", "max(rev_timestamp)", "min(rev_timestamp)"], "rowcount": 30701}]} | null |
Active Editors | null | use mrwiki_p;
select rev_user, rev_user_text, max(rev_timestamp),min(rev_timestamp), rev_timestamp, count(*) from revision where lower(CONVERT(rev_user_text USING latin1)) not like '%bot%' and rev_user !=0 group by YEAR(rev_timestamp), MONTH(rev_timestamp), rev_user having count(*)>4; | {"resultsets": [{"headers": ["rev_user", "rev_user_text", "max(rev_timestamp)", "min(rev_timestamp)", "rev_timestamp", "count(*)"], "rowcount": 3783}]} | null |
Edit quality (20k random sample, 2015) [ptwiki] | null | USE ptwiki_p;
SELECT rc_this_oldid AS rev_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"], "rowcount": 20000}]} | null |
Edit quality (20k random sample, 2015) [fawiki] | null | USE fawiki_p;
SELECT rc_this_oldid AS rev_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"], "rowcount": 20000}]} | null |
New discussions in the MILHIST-sphere, 24 hour period (enwiki) | From 2015-05-06, 16:45:00 to 2015-05-07, 16:45:00 (UTC) | select distinct recentchanges.rc_title,recentchanges.rc_comment,recentchanges.rc_timestamp,page.page_namespace
from recentchanges
join page on recentchanges.rc_namespace = page.page_namespace
and recentchanges.rc_title = page.page_title
join categorylinks on page.page_id=categorylinks.cl_from
where rc_timestamp >= 2015... | {"resultsets": [{"headers": ["rc_title", "rc_comment", "rc_timestamp", "page_namespace"], "rowcount": 38}]} | null |
Edit quality (20k random sample, 2015) [trwiki] | null | USE trwiki_p;
SELECT rc_this_oldid AS rev_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"], "rowcount": 20000}]} | null |
Edit quality (20k random sample, 2015) [azwiki] | null | USE azwiki_p;
SELECT rc_this_oldid AS rev_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"], "rowcount": 20000}]} | null |
Active Articles | null | use zhwiki_p;
select page_title,page_id, rev_timestamp, count(*) from page join revision on page.page_id = revision.rev_page where page_namespace=0 and page_is_redirect=0 and rev_user !=0 and lower(CONVERT(rev_user_text USING latin1)) not like '%bot%' group by YEAR(rev_timestamp), MONTH(rev_timestamp), rev_page having... | {"resultsets": [{"headers": ["page_title", "page_id", "rev_timestamp", "count(*)"], "rowcount": 576625}]} | null |
External links in redirects, redux | Code from Dispenser | SELECT page_id, page_namespace, page_title, el_to, COUNT(*)
FROM page
JOIN externallinks ON el_from=page_id
WHERE page_is_redirect=1 AND page_namespace=0
GROUP BY page_id
ORDER BY CEIL(LOG10(COUNT(*))), el_index | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "el_to", "COUNT(*)"], "rowcount": 750}]} | null |
صفحههای دارای بیشترین تراگنجانش با آرگومان تکراری در الگو | Most transcluded pages that use duplicate arguments in template calls | USE fawiki_p;
SELECT page_namespace, page_title,
count(*)
FROM categorylinks
LEFT JOIN page ON page_id = cl_from
RIGHT JOIN templatelinks ON tl_namespace = page_namespace
AND tl_title = page_title
WHERE cl_to = 'صفحههای_دارای_آرگومان_تکراری_در_فراخوانی_الگو'
GROUP BY cl_from
ORDER BY COUNT(*) DESC limit 500; | {"resultsets": [{"headers": ["page_namespace", "page_title", "count(*)"], "rowcount": 500}]} | null |
Wikitrends-1 top edited pages | Wikitrend project statistics for phase 1,https://te.wikipedia.org/wiki/%E0%B0%B5%E0%B0%BF%E0%B0%95%E0%B1%80%E0%B0%AA%E0%B1%80%E0%B0%A1%E0%B0%BF%E0%B0%AF%E0%B0%BE_%E0%B0%9A%E0%B0%B0%E0%B1%8D%E0%B0%9A:%E0%B0%B5%E0%B0%BF%E0%B0%95%E0%B1%80%E0%B0%AA%E0%B1%8D%E0%B0%B0%E0%B0%BE%E0%B0%9C%E0%B1%86%E0%B0%95%E0%B1%8D%E0%B0%9F%E0%... | use tewiki_p;
SELECT page_title,
COUNT(*) As Edits
FROM page
LEFT JOIN revision
ON revision.rev_page = page.page_id
WHERE rev_timestamp >= '20140201000000'
AND rev_timestamp <'20140301000000'
AND page_namespace = 0
AND page_title in (SELECT page_title
FROM page
JOIN categorylinks ON categorylinks.cl_... | {"resultsets": [{"headers": ["page_title", "Edits"], "rowcount": 19}]} | null |
Featured articles from talk page template | Year wise list of featured articles on tewiki, as given by the template on talk pages | use tewiki_p;
SELECT
SUBSTRING(categorylinks.cl_to,LENGTH('ఈ_వారం_వ్యాసాల_చర్చలు_-_Y')+1,4) AS featured_year,
page_title
FROM page
LEFT JOIN categorylinks ON categorylinks.cl_from = page.page_id
WHERE page.page_namespace = 1 AND categorylinks.cl_to LIKE 'ఈ_వారం_వ్యాసాల_చర్చలు_-_Y%'
ORDER BY featured_year,pa... | {"resultsets": [{"headers": ["featured_year", "page_title"], "rowcount": 389}]} | null |
All Articles | null | use fiwiki_p;
select page_title,page_id, min(rev_timestamp), count(*) from page join revision on page.page_id = revision.rev_page where page_namespace=0 and page_is_redirect=0 and lower(CONVERT(rev_user_text USING latin1)) not like '%bot%' group by rev_page having count(*)>4; | {"resultsets": [{"headers": ["page_title", "page_id", "min(rev_timestamp)", "count(*)"], "rowcount": 268810}]} | null |
#artandfeminism hashtag usage | Props to @Slaporte, too! | SELECT rc_timestamp, rc_title, rc_user_text, rc_comment, rc_old_len, rc_new_len, rc_last_oldid, rc_this_oldid
FROM recentchanges
WHERE rc_type = 0
AND rc_timestamp < DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%m%d%H%i%s')
AND rc_timestamp > DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 2 DAY), '%m%d%H%i%s')
ORDER BY ... | {"resultsets": [{"headers": ["rc_timestamp", "rc_title", "rc_user_text", "rc_comment", "rc_old_len", "rc_new_len", "rc_last_oldid", "rc_this_oldid"], "rowcount": 0}]} | null |
Oluremi Oyo | null | null | {"resultsets": []} | null |
Wikidata - given names - en labels for missing nb labels | run time > 5 min | # For given names, set missing labels in language "nb" based on label in "en" (if available)
#
# See also https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg
#
use wikidatawiki_p;
SELECT
# output for Quickstatement tool
CONCAT('Q', term_entity_id) AS item,
"Lnb", # "Lnb" ... | {"resultsets": [{"headers": ["item", "Lnb", "NewLabel", "CURRENT_DATE"], "rowcount": 3384}]} | null |
Featured article title,size,revisions of tewiki | null | use tewiki_p;
SELECT page_title, page_len,
count(*) AS num_of_revisions
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
WHERE page.page_namespace = 0 AND page_title in
(SELECT page_title
FROM page
LEFT JOIN categorylinks ON categorylinks.cl_from = page.page_id
WHERE (page_... | {"resultsets": [{"headers": ["page_title", "page_len", "num_of_revisions"], "rowcount": 395}]} | null |
Top 1000 -Article Pages with most revisions(tewiki) | null | use tewiki_p;
SELECT page_title, page_len,
count(*) AS num_of_revisions
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
WHERE page_namespace=0
GROUP BY page_title
ORDER BY page_title, num_of_revisions DESC LIMIT 1000 | {"resultsets": [{"headers": ["page_title", "page_len", "num_of_revisions"], "rowcount": 1000}]} | null |
Find commons pages unable to access templates after SUL user renames | Query by User:Bawolff. It finds pages which are using user namespace templates which were recently renamed (without redirects) by [[User:Keegan (WMF)]] as part of SUL finalization. See https://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2015/04#230k_SUL_user_renames_by_User:Maintenance_script for discussi... | use commonswiki_p;
select p1.page_namespace, p1.page_title, tl_title
from templatelinks
inner join page p1
on tl_from = p1.page_id -- p1 will transclude moved template
left outer join page p2
on (p2.page_namespace = 2 -- user namespace template
and p2.page_title = tl_title)
inner join... | {"resultsets": [{"headers": ["page_namespace", "page_title", "tl_title"], "rowcount": 14}]} | null |
Pages incorrectly marked as GTP? | null | use tewiki_p;
SELECT
page_title
FROM page
LEFT JOIN revision
ON rev_id = page_id
LEFT JOIN user
ON rev_user= user_id
LEFT JOIN categorylinks
ON categorylinks.cl_from = page.page_id
WHERE page_namespace=0 AND page_is_redirect =0 AND categorylinks.cl_to = 'గూగుల్_అనువాద_వ్యాసాలు' AND (user_name NOT IN (SEL... | {"resultsets": [{"headers": ["page_title"], "rowcount": 893}]} | null |
Wikidata tables | update http://quarry.wmflabs.org/query/739 | use wikidatawiki_p;
SHOW TABLES; | {"resultsets": [{"headers": ["Tables_in_wikidatawiki_p"], "rowcount": 66}]} | null |
Some non-free files used in articles about people | Finds some non-free files which are used in at least one article about a living person. Non-free photos of living people usually violate [[WP:NFCC#1]]. Mostly finds paintings by living painters, so the query isn't very useful. Similar to http://quarry.wmflabs.org/query/2639 but returns file names instead of article tit... | SELECT DISTINCT i.page_title FROM page a
INNER JOIN categorylinks ca ON ca.cl_from = a.page_id AND ca.cl_to = 'Living_people'
INNER JOIN imagelinks il ON il.il_from = a.page_id AND il.il_from_namespace = 0
INNER JOIN page i ON i.page_title = il.il_to AND i.page_namespace = 6
INNER JOIN categorylinks ci ON ci.cl_from = ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 277}]} | null |
Wikimédia France - 2013-2014 round2 - Q3 - File usage | Usage of files supported by Wikimédia France during the Q3 of FDC year 2013-2014 round2 | use commonswiki_p;
SELECT COUNT(DISTINCT page_title) AS FilesUsed, COUNT(gil_wiki) AS Uses, COUNT(DISTINCT gil_wiki) AS NbWikis
FROM page
JOIN categorylinks
JOIN globalimagelinks
JOIN image ON image.img_name = page.page_title
WHERE page.page_id=categorylinks.cl_from
AND gil_to = ... | {"resultsets": [{"headers": ["FilesUsed", "Uses", "NbWikis"], "rowcount": 1}]} | null |
Most frequent domains for dewiki | see Most frequent domains for itwiki_p https://quarry.wmflabs.org/query/2924 | USE dewiki_p;
SELECT url, COUNT(*)
FROM (
SELECT SUBSTRING_INDEX(SUBSTRING(el_to, LOCATE('://', el_to) + 3), '/', 1) url
FROM externallinks
WHERE el_from IN (
SELECT page_id
FROM page
WHERE page_namespace = 0
)
) tmp_table
GROUP BY url
HAVING COUNT(*) > 100
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["url", "COUNT(*)"], "rowcount": 4924}]} | null |
Daily Uploads @ WLE 2015 | Used in https://tools.wmflabs.org/ptwikis/WLE2015 | use commonswiki_p;
SELECT
SUBSTR(cl_to, 38) país,
UNIX_TIMESTAMP(SUBSTR(img_timestamp, 1, 8)) dia,
SUBSTR(img_timestamp, 1, 10) hora,
COUNT(*) upload
FROM categorylinks
INNER JOIN page ON cl_from = page_id
INNER JOIN image ON page_title = img_name AND img_timestamp < 20150801000000
WHERE cl_type = 'file' AND c... | {"resultsets": [{"headers": ["pa\u00eds", "dia", "hora", "upload"], "rowcount": 2499}]} | null |
Pages and first rev ts, number of rev for a set of wikipedians | Example uses category of wikipedians of Google Translation Project on tewiki | use tewiki_p;
SELECT
page_title,
user_name,
rev_timestamp as first_rev_timestamp,
COUNT(*) as num_of_revisions
FROM user
LEFT JOIN revision
ON rev_user = user_id
LEFT JOIN page
ON page_id = rev_page
WHERE page_namespace=0 AND page_is_redirect =0 AND (user_name in (SELECT page_title
... | {"resultsets": [{"headers": ["page_title", "user_name", "first_rev_timestamp", "num_of_revisions"], "rowcount": 1817}]} | null |
Media supported by Wikimedia France by Months | null | USE commonswiki_p;
SELECT /* SLOW_OK */
SUBSTRING(IF(oi_timestamp IS NULL, img_timestamp, oi_timestamp),1,6) AS upload_month,
COUNT(page.page_title) AS images_count
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
LEFT JOIN oldimage ON ima... | {"resultsets": [{"headers": ["upload_month", "images_count"], "rowcount": 96}]} | null |
Lietotāji ar visvairāk labojumiem, kas nav automātiskie pārbaudītāji | Jāsalabo! | USE lvwiki_p;
SELECT distinct u.user_name, u.user_editcount
FROM user u
where u.user_id not in (Select ug.ug_group from user_groups ug)
ORDER BY u.user_editcount desc
LIMIT 50; | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 50}]} | null |
10 itwiki articles with the longest title | null | USE itwiki_p;
SET @rank = 0;
SELECT @rank := @rank + 1 AS rank, CHAR_LENGTH( page_title ) AS length, page_is_redirect AS redir, page_title AS title FROM page
WHERE page_namespace = 0
ORDER BY length DESC
LIMIT 10 | {"resultsets": [{"headers": ["rank", "length", "redir", "title"], "rowcount": 10}]} | null |
Modules on commons with wikitext page content | null | use commonswiki_p; SELECT page_namespace, page_title, page_content_model from page where page_namespace = 828 and page_title not like '%/doc' and page_content_model = 'wikitext' | {"resultsets": [{"headers": ["page_namespace", "page_title", "page_content_model"], "rowcount": 16}]} | null |
Modules on commons with wikitext page content | A version of http://quarry.wmflabs.org/query/3610 that just shows the page_title field. | use commonswiki_p;
SELECT page_title from page where
page_namespace = 828 and page_title not like '%/doc' and page_content_model = 'wikitext' | {"resultsets": [{"headers": ["page_title"], "rowcount": 16}]} | null |
Page title from page id of gtp | null | use tewiki_p;
SELECT page_id,page_title
FROM page
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND page_id in
(108851,100930,103461,99712,104038,110859,102164,110730,102366,99339,106783,105609,110799,104575,111458,107725,109356,107219,100834,101148,112131,97471,102140,110751,104917,107286,100332,108991,1019... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 1989}]} | null |
First itwiki edits of 2015 (CEST) | null | USE itwiki_p;
SELECT rev_timestamp, rev_id, rev_user_text FROM revision
WHERE SUBSTRING( rev_timestamp, 1, 12 ) = '201412312300'
ORDER BY rev_timestamp ASC
LIMIT 10 | {"resultsets": [{"headers": ["rev_timestamp", "rev_id", "rev_user_text"], "rowcount": 10}]} | null |
Article pages starting with English alphabets -redirects | null | use tewiki_p;
SELECT page_id,page_title, rd_title
FROM page
LEFT JOIN redirect ON rd_from=page.page_id
WHERE page_namespace=0 AND page_is_redirect=1 AND LENGTH(page_title)=CHAR_LENGTH(page_title) AND page_title REGEXP "^[a-z|A-Z]+"
GROUP BY page_title
ORDER BY page_title | {"resultsets": [{"headers": ["page_id", "page_title", "rd_title"], "rowcount": 1487}]} | null |
Pages translated using Google Translate-hiwiki | Includes annonymous upload by project members and experimental translation by others(?) | use hiwiki_p;
SELECT page_id,
rev_parent_id,
rev_len,
rev_id,
user_id,
user_name,
rev_timestamp,
rev_comment,
page_title
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
LEFT JOIN user
ON rev_user = user_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND rev_comment LIK... | {"resultsets": [{"headers": ["page_id", "rev_parent_id", "rev_len", "rev_id", "user_id", "user_name", "rev_timestamp", "rev_comment", "page_title"], "rowcount": 2321}]} | null |
Pages translated using Google Translate-tawiki | null | use tawiki_p;
SELECT page_id,
rev_parent_id,
rev_len,
rev_id,
user_id,
user_name,
rev_timestamp,
rev_comment,
page_title
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
LEFT JOIN user
ON rev_user = user_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND rev_comment LIK... | {"resultsets": [{"headers": ["page_id", "rev_parent_id", "rev_len", "rev_id", "user_id", "user_name", "rev_timestamp", "rev_comment", "page_title"], "rowcount": 1290}]} | null |
Pages translated using Google Translate-knwiki | null | use knwiki_p;
SELECT page_id,
rev_parent_id,
rev_len,
rev_id,
user_id,
user_name,
rev_timestamp,
rev_comment,
page_title
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
LEFT JOIN user
ON rev_user = user_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND rev_comment LIK... | {"resultsets": [{"headers": ["page_id", "rev_parent_id", "rev_len", "rev_id", "user_id", "user_name", "rev_timestamp", "rev_comment", "page_title"], "rowcount": 2204}]} | null |
Pages translated using Google Translate-bnwiki | null | use bnwiki_p;
SELECT page_id,
rev_parent_id,
rev_len,
rev_id,
user_id,
user_name,
rev_timestamp,
rev_comment,
page_title
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
LEFT JOIN user
ON rev_user = user_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND rev_comment LIK... | {"resultsets": [{"headers": ["page_id", "rev_parent_id", "rev_len", "rev_id", "user_id", "user_name", "rev_timestamp", "rev_comment", "page_title"], "rowcount": 48}]} | null |
File usage of Geograph images | null | use commonswiki_p;
SELECT COUNT(DISTINCT page_title) AS FilesUsed, COUNT(gil_wiki) AS Uses, COUNT(DISTINCT gil_wiki) AS NbWikis
FROM page
JOIN categorylinks
JOIN globalimagelinks
JOIN image ON image.img_name = page.page_title
WHERE page.page_id=categorylinks.cl_from
AND gil_to = ... | {"resultsets": [{"headers": ["FilesUsed", "Uses", "NbWikis"], "rowcount": 1}]} | null |
Fork of #3623 | 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_the_Geograph_British_Isles_project")
#... | {"resultsets": [{"headers": ["rev_user_text", "rev_user", "cl_to"], "rowcount": 917}]} | null |
Wikimédia France - 2013-2014 round2 - Q3 - File count | Count of files supported by Wikimédia France during the Q3 of FDC year 2013-2014 round2 | use commonswiki_p;
SELECT COUNT(page_title)
FROM image, page, categorylinks
WHERE page.page_id=categorylinks.cl_from
AND image.img_name = page.page_title
AND .categorylinks.cl_to = "Quality_images_supported_by_Wikimedia_France"
AND img_timestamp BETWEEN 20150101000000 AND 201504010000... | {"resultsets": [{"headers": ["COUNT(page_title)"], "rowcount": 1}]} | null |
Wikimédia France - 2013-2014 round2 - Q3 - QIs | List of files supported by Wikimédia France and identified as Quality Images during the Q3 of FDC year 2013-2014 round2 | use commonswiki_p;
SELECT page_title, img_user_text AS uploader
FROM page
JOIN categorylinks AS cl1 ON page_id=cl1.cl_from
JOIN categorylinks AS cl2 ON page_id=cl2.cl_from
JOIN image ON image.img_name = page.page_title
WHERE cl1.cl_to="Media_supported_by_Wikimedia_France"
AND cl... | {"resultsets": [{"headers": ["page_title", "uploader"], "rowcount": 37}]} | null |
Wikimédia France - 2013-2014 round2 - Q3 - VIs | List of files supported by Wikimédia France and identified as Valued Images during the Q3 of FDC year 2013-2014 round2 | use commonswiki_p;
SELECT page_title, img_user_text AS uploader
FROM page
JOIN categorylinks AS cl1 ON page_id=cl1.cl_from
JOIN categorylinks AS cl2 ON page_id=cl2.cl_from
JOIN image ON image.img_name = page.page_title
WHERE cl1.cl_to="Media_supported_by_Wikimedia_France"
AND cl... | {"resultsets": [{"headers": ["page_title", "uploader"], "rowcount": 89}]} | null |
Pages created by list of users and list of links | null | SELECT DISTINCT page_id AS pages_created FROM metawiki_p.page AS p
INNER JOIN metawiki_p.revision AS r
ON r.rev_page = p.page_id
JOIN metawiki_p.pagelinks AS pl
ON p.page_title = pl.pl_title
WHERE p.page_namespace = 2
AND p.page_id = 3404236
AND r.rev_user_text LIKE ("EGalvez_(WMF)")
AND r.rev_parent_id = 0
AND r.rev_... | {"resultsets": [{"headers": ["pages_created"], "rowcount": 1}]} | null |
Hewiki pictures many | null | use hewiki_p;
select page_namespace as "מרחב שם", page_title as "קובץ" from categorylinks as cl1 join page as p1
on (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן"
or exists
(select * from page as p2
where p2.page_namespace = 14
and p2.page_title = cl1.cl_to
and exists
(select * from categorylinks as cl2
where cl2... | {"resultsets": [{"headers": ["\u05de\u05e8\u05d7\u05d1 \u05e9\u05dd", "\u05e7\u05d5\u05d1\u05e5"], "rowcount": 2427}]} | null |
Number of edited pages in enwiki since 2015.05.17 | null | select count(page_title) from enwiki_p.page where page_touched > 20150517000000; | {"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]} | null |
Number of pages edited on 2015.05.17 in enwiki | null | SELECT
COUNT(page_title)
FROM enwiki_p.page
WHERE
(page_touched >= 20150517000000)
AND
(page_touched < 20150518000000); | {"resultsets": [{"headers": ["COUNT(page_title)"], "rowcount": 1}]} | null |
Empty categories in enwiki | Query from https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#Empty_categories | SELECT
page_title,
page_len
FROM categorylinks
RIGHT JOIN page ON cl_to = page_title
WHERE page_namespace = 14
AND page_is_redirect = 0
AND cl_to IS NULL
AND NOT EXISTS (SELECT
1
FROM categorylinks
WHERE cl_from = page_id
AND cl_to = 'Wikipedia_categ... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 39829}]} | null |
Lvwiki articles with the longest title | From http://quarry.wmflabs.org/query/3603 | USE lvwiki_p;
SET @rank = 0;
SELECT @rank := @rank + 1 AS rank, CHAR_LENGTH( page_title ) AS length, page_title AS title FROM page
WHERE page_namespace = 0 and page_is_redirect=0 and page_title not like "%Olimpiskajās_spēlēs%"
ORDER BY length DESC
LIMIT 50
/*
oriģināls
USE lvwiki_p;
SET @rank = 0;
SELECT @rank := @rank... | {"resultsets": [{"headers": ["rank", "length", "title"], "rowcount": 50}]} | null |
WLE 2015 in Estonia uploads | null | use commonswiki_p;
SELECT
SUBSTR(cl_to, 38) country,
SUBSTR(img_timestamp, 1, 8) day,
COUNT(*) upload
FROM categorylinks
INNER JOIN page ON cl_from = page_id
INNER JOIN image ON page_title = img_name AND img_timestamp < 20150801000000
WHERE cl_type = 'file' AND cl_to IN (SELECT
page_title
FROM page
WHE... | {"resultsets": [{"headers": ["country", "day", "upload"], "rowcount": 15}]} | null |
SHOW TABLE STATUS on revision didn't show any info | I've been trying to get the total number of rows and was hoping that TABLE STATUS would do the trick. | USE enwiki_p;
SHOW TABLE STATUS FROM
enwiki_p
LIKE 'revision';
| {"resultsets": [{"headers": ["Name", "Engine", "Version", "Row_format", "Rows", "Avg_row_length", "Data_length", "Max_data_length", "Index_length", "Data_free", "Auto_increment", "Create_time", "Update_time", "Check_time", "Collation", "Checksum", "Create_options", "Comment"], "rowcount": 1}]} | null |
Most edited pages in the last month | From https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#Most_edited_pages_in_last_month
This query runs fairly fast. | use enwiki_p;
SELECT rc_title, COUNT(*) AS num_edits
FROM recentchanges
WHERE rc_namespace = 0
GROUP BY 1 ORDER BY 2 DESC
LIMIT 25; | {"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 25}]} | null |
Revision timestamp and length for Johann_Sebastian_Bach in enwiki | null | select rev_id, rev_timestamp, rev_len from revision where rev_page = 9906294 ORDER BY rev_timestamp ASC; | {"resultsets": [{"headers": ["rev_id", "rev_timestamp", "rev_len"], "rowcount": 5675}]} | null |
Last registered users | null | USE enwiki_p;
SELECT
u.user_id, u.user_name, u.user_registration, u.user_editcount
FROM
user u
ORDER BY
u.user_id DESC
LIMIT 10; | {"resultsets": [{"headers": ["user_id", "user_name", "user_registration", "user_editcount"], "rowcount": 10}]} | null |
possible values for user_properties.up_property | null | USE enwiki_p;
SELECT
DISTINCT(up_property)
FROM
user_properties; | {"resultsets": [{"headers": ["up_property"], "rowcount": 8}]} | null |
user_properties for a specified user_name | null | SET @user_name = 'RaymondYee';
USE enwiki_p;
SELECT
u.user_id, u.user_name, u.user_registration, u.user_editcount, up.up_property, up.up_value
FROM
user u
LEFT JOIN
user_properties up
ON
u.user_id = up.up_user
WHERE
u.user_name = @user_name | {"resultsets": [{"headers": ["user_id", "user_name", "user_registration", "user_editcount", "up_property", "up_value"], "rowcount": 2}]} | null |
distinct namespaces in enwiki pages. | Interesting to match up with the annotated list in the infobox at https://en.wikipedia.org/wiki/Wikipedia:Namespace | USE enwiki_p;
SELECT
DISTINCT(page_namespace)
FROM
page;
| {"resultsets": [{"headers": ["page_namespace"], "rowcount": 28}]} | null |
use site_stats to get overall stats for a wiki | null | USE enwiki_p;
SELECT
*
FROM
site_stats; | {"resultsets": [{"headers": ["ss_row_id", "ss_total_views", "ss_total_edits", "ss_good_articles", "ss_total_pages", "ss_users", "ss_images", "ss_active_users"], "rowcount": 1}]} | null |
Every WikiProject on English Wikipedia (excluding task forces) | In which James Hare attempts to craft a formal definition of the WikiProject, not including task forces that are subpages of other pages. | select distinct page.page_title from page
join categorylinks on page.page_id = categorylinks.cl_from
left join redirect on page.page_id = redirect.rd_from
where page_namespace = 4 # Wikipedia namespace
and page_title not like "%/%" # No subpages
and rd_title is null # No redirects
and
(cl_to in
(select page.page_ti... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1966}]} | null |
user groups and their count in enwiki | null | SELECT
ug_group, COUNT(ug_group)
FROM
user_groups
GROUP BY
ug_group; | {"resultsets": [{"headers": ["ug_group", "COUNT(ug_group)"], "rowcount": 27}]} | null |
Examples of data in wikidatawiki_p.wb_changes | null | USE wikidatawiki_p;
SELECT
*
FROM
wb_changes
LIMIT 10 | {"resultsets": [{"headers": ["change_id", "change_type", "change_time", "change_object_id", "change_revision_id", "change_user_id", "change_info"], "rowcount": 10}]} | null |
term_text for Albany, California in wikidata | null | USE wikidatawiki_p;
SELECT
*
FROM
wb_terms
WHERE
term_entity_id = '671480' # Albany,_California | {"resultsets": [{"headers": ["term_row_id", "term_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"], "rowcount": 45}]} | null |
Wikidata - given names - en labels | null | # list of given name items linked from page [[User:Jura1/first names/items (P31: ok, label: tbd)]]
#
use wikidatawiki_p;
#
SELECT page_title AS item, term_type, term_language, term_text,
page_title AS item1, CONCAT('L', term_language) AS Desc1, CONCAT('"', term_text , '"') AS Str1
#
FROM pagelinks, page, wb_entity_pe... | {"resultsets": [{"headers": ["item", "term_type", "term_language", "term_text", "item1", "Desc1", "Str1"], "rowcount": 16488}]} | null |
Links to mobile | Sample of 100 links to mobile version sites. | use hewiki_p;
select substr(el_to, 1,locate('/',el_to, 9)), count(*) from externallinks where el_to like '%://m.%/%' group by substr(el_to, 1,locate('/',el_to, 9)) order by count(*) desc; | {"resultsets": [{"headers": ["substr(el_to, 1,locate('/',el_to, 9))", "count(*)"], "rowcount": 71}]} | null |
Missing wikiquote backlinks on plwiktionary | null | SELECT
wiktpage.page_id AS wikt_id,
qpage.page_title AS quote_title
FROM
plwikiquote_p.page AS qpage
JOIN plwiktionary_p.page AS wiktpage ON
CONCAT(UPPER(LEFT(wiktpage.page_title, 1)), SUBSTRING(wiktpage.page_title, 2)) = qpage.page_title AND
wiktpage.page_namespace = qpage.page_namespace AND
wiktpage.pag... | {"resultsets": [{"headers": ["wikt_id", "quote_title"], "rowcount": 116}]} | null |
Pixels supported by Wikimedia France | null | USE commonswiki_p;
SELECT /* SLOW_OK */
FORMAT(COUNT(image.img_name), 3) AS 'image_count',
FORMAT(SUM(image.img_width*image.img_height), 3) AS 'sum_pixel',
FORMAT(SUM(image.img_width*image.img_height)/COUNT(image.img_name), 3) AS 'pixels_per_img'
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS... | {"resultsets": [{"headers": ["image_count", "sum_pixel", "pixels_per_img"], "rowcount": 1}]} | null |
Wikidata - given names - sitelink ct | null | # Sitelinks per given name item linked from page [[User:Jura1/first names/items (P31: ok, label: tbd)]]
#
# See also https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg
#
use wikidatawiki_p;
#
SELECT page_title AS item, term_type, term_language, term_text,
CONCAT('<tr><td> [[', pa... | {"resultsets": [{"headers": ["item", "term_type", "term_language", "term_text", "table_output_in_one_cell", "freq", "CURRENT_DATE"], "rowcount": 1464}]} | null |
Page title, size,revisions of articles for Google Translation Project | change categorylinks.clto= for the category you need | use tewiki_p;
SELECT page_title, page_len,
count(*) AS num_of_revisions
FROM revision
LEFT JOIN page ON revision.rev_page=page.page_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND page_title in
(SELECT page_title
FROM page
LEFT JOIN categorylinks ON categorylinks.cl_from = pag... | {"resultsets": [{"headers": ["page_title", "page_len", "num_of_revisions"], "rowcount": 2027}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.