title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Pages translated using Google Translate-tewiki | null | use tewiki_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": 1991}]} | null |
All pages in enwiki with title of Johann_Sebastian_Bach | One thing I did not appreciate before issuing this query: the use of page_namespace. Question: how to get a list of namespaces? Answer: https://meta.wikimedia.org/wiki/Meta:Namespaces | USE enwiki_p;
SELECT
*
FROM
page
WHERE
page_title = "Johann_Sebastian_Bach"; | {"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_content_model"], "rowcount": 8}]} | null |
20000 revisions from frwiki for revscores | null | USE frwiki_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 |
get user data for username | get user data of user by username | use dewiki_p; SELECT * FROM user WHERE user_name = "Fanim";
| {"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 |
first attempt at recursive grabbing of category tree | borrowing approach from http://stackoverflow.com/a/28366310/7782 --> this query didn't recurse -- just grabbed the first level of descendents. | SELECT
GROUP_CONCAT(lv SEPARATOR ',')
FROM
(
SELECT
@pv:= (
SELECT
GROUP_CONCAT(from_id SEPARATOR ',')
FROM
(
SELECT
cl_from as from_id, p1.page_title as from_title, p2.page_id as to_id, cl_to as to_title, cl_type
FROM
cat... | {"resultsets": [{"headers": ["GROUP_CONCAT(lv SEPARATOR ',')"], "rowcount": 1}]} | null |
phab:T100248 | null | USE plwiktionary_p;
SELECT * FROM tag_summary WHERE ts_tags = "script" ORDER BY ts_rev_id DESC LIMIT 50; | {"resultsets": [{"headers": ["ts_rc_id", "ts_log_id", "ts_rev_id", "ts_tags"], "rowcount": 50}]} | null |
Counting pageviews | null | #use tewiki_p;
#desc page;
#select * from enwikipage
select * from orwiki_p.page order by page_id desc limit 20;
#select sum(page_counter) from page; | {"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": 20}]} | null |
Templates linking to disambiguation pages in Fa WP (part 2) | To investigate the specific template and see what disambiguation page it links to. | use fawiki_p;
select pl_from, pl_title
from pagelinks
join page
on pl_title = page_title
join categorylinks
on page_id = cl_from
where page_namespace = 0
and pl_namespace = 0
and pl_from_namespace = 10
and cl_to = 'صفحههای_ابهامزدایی'
and pl_from = 60825; | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 1}]} | null |
categories containing Johann_Sebastian_Bach page in enwiki | null | SELECT * FROM
categorylinks cl
JOIN
(SELECT
page_id, page_title
FROM
page
WHERE
page_title = "Johann_Sebastian_Bach" and page_namespace=0) jsb
ON
cl.cl_from = jsb.page_id;
| {"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "page_id", "page_title"], "rowcount": 45}]} | null |
Templates linking to disambiguation pages in Fa WP | Sorted by the # of times the template is used in the main namespace | use fawiki_p;
select page_id, tl_title, count(tl_from) as cnt
from templatelinks
join page
on tl_title = page_title
where tl_namespace = 10
and tl_from_namespace = 0
and page_namespace = 10
and page_id in
(
select pl_from
from pagelinks
join page
on pl_title = page_title
join categorylinks
on page_id = cl_from
where pa... | {"resultsets": [{"headers": ["page_id", "tl_title", "cnt"], "rowcount": 1041}]} | null |
Wikidata - search for labels or descriptions | null | # Search for items with specific labels
# Example: term_text LIKE '% Miller'
# could find people with last name "Miller"
# Make sure to filter the resulting list of items for items with P31:Q5
use wikidatawiki_p;
SELECT
# CONCAT('Q', term_entity_id) As item,
# term_text,
# GROUP_CONCAT( term_language ) As lang,... | {"resultsets": [{"headers": ["item", "tr", "current_desc", "term_type", "#CONCAT('\"', term_text, '\"') As current_desc,\n\tCURRENT_DATE"], "rowcount": 3666}]} | null |
IdeaLab | null | #-----IDEALAB EDITS
#edits to the Idealab 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 edits_community FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS p
ON r.rev_page = p... | {"resultsets": [{"headers": ["year", "month", "edits_community"], "rowcount": 20}, {"headers": ["year", "month", "edits_WMF"], "rowcount": 20}, {"headers": ["year", "month", "editors_Community"], "rowcount": 20}, {"headers": ["year", "month", "editors_WMF"], "rowcount": 20}, {"headers": ["year", "month", "ideas_created... | null |
ערכים עם קואורדינטות ללא title | ערכים עם בתנתי קואורדינטות אך ללא קוארודינטות ראשיות (title) | use hewiki_p;
select page_title from page where exists (select * from templatelinks where tl_title ='Coord' and tl_namespace=10 and tl_from=page_id) and not exists (select * from geo_tags where gt_page_id=page_id and gt_primary=1) and page_namespace=0; | {"resultsets": [{"headers": ["page_title"], "rowcount": 663}]} | null |
Most linked disambiguation pages on Fa WP | Ideally, we would want to replace the links to go to the specific pages, not the disambiguation page. | use fawiki_p;
select page_title, count(pl_from) cnt
from page
join categorylinks
on page_id = cl_from
join pagelinks
on page_title = pl_title
and page_namespace = pl_namespace
where page_namespace = 0
and cl_to like '%ابهام%'
group by page_title
having cnt > 1000
order by cnt desc; | {"resultsets": [{"headers": ["page_title", "cnt"], "rowcount": 282}]} | null |
20000 revisions from dewiki for revscores | null | USE dewiki_p;
SELECT rc_this_oldid AS rev_id, rc_cur_id AS page_id
FROM recentchanges LEFT JOIN user_groups
ON recentchanges.rc_user = user_groups.ug_user
WHERE
(rc_timestamp < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), "%Y%m%d%H%I%S") AND
rc_type IN (0,1)) AND
user_groups.ug_user IS NULL
ORDER BY RAND()
LIMIT... | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 20000}]} | null |
20000 revisions from eswiki for revscores | null | USE eswiki_p;
SELECT rc_this_oldid AS rev_id, rc_cur_id AS page_id
FROM recentchanges LEFT JOIN user_groups
ON recentchanges.rc_user = user_groups.ug_user
WHERE
(rc_timestamp < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), "%Y%m%d%H%I%S") AND
rc_type IN (0,1)) AND
user_groups.ug_user IS NULL
ORDER BY RAND()
LIMIT... | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 20000}]} | null |
20000 revisions from ruwiki for revscores | null | USE ruwiki_p;
SELECT rc_this_oldid AS rev_id, rc_cur_id AS page_id
FROM recentchanges LEFT JOIN user_groups
ON recentchanges.rc_user = user_groups.ug_user
WHERE
(rc_timestamp < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), "%Y%m%d%H%I%S") AND
rc_type IN (0,1)) AND
user_groups.ug_user IS NULL
ORDER BY RAND()
LIMIT... | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 20000}]} | null |
20000 revisions from simplewiki for revscores | null | USE simplewiki_p;
SELECT rc_this_oldid AS rev_id, rc_cur_id AS page_id
FROM recentchanges LEFT JOIN user_groups
ON recentchanges.rc_user = user_groups.ug_user
WHERE
(rc_timestamp < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), "%Y%m%d%H%I%S") AND
rc_type IN (0,1)) AND
user_groups.ug_user IS NULL
ORDER BY RAND()
L... | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 8884}]} | null |
Labels added in Wikidata Menu Challenge | Finds all labels added in Wikidata Menu Challenge. https://www.wikidata.org/wiki/Wikidata:Menu_Challenge
More for an overview of activity since it does not capture everything. | USE wikidatawiki_p;
SELECT page_title, rev_user_text, rev_timestamp, rev_comment
FROM revision
JOIN page ON rev_page = page_id
WHERE page_title IN ("Q17", "Q34", "Q48", "Q89", "Q142", "Q152", "Q178", "Q195", "Q196", "Q500", "Q787", "Q830", "Q881", "Q1072", "Q5090", "Q6128", "Q6663", "Q7150", "Q7535", "Q7802", "Q8486", ... | {"resultsets": [{"headers": ["page_title", "rev_user_text", "rev_timestamp", "rev_comment"], "rowcount": 2617}]} | null |
Number of edits per user in Wikidata Menu Challenge | Lists all edits on the objects, not only those that are eligble for points. | USE wikidatawiki_p;
SELECT rev_user_text, COUNT(rev_user_text)
FROM revision
JOIN page ON rev_page = page_id
WHERE page_title IN ("Q17", "Q34", "Q48", "Q89", "Q142", "Q152", "Q178", "Q195", "Q196", "Q500", "Q787", "Q830", "Q881", "Q1072", "Q5090", "Q6128", "Q6663", "Q7150", "Q7535", "Q7802", "Q8486", "Q8495", "Q9266", ... | {"resultsets": [{"headers": ["rev_user_text", "COUNT(rev_user_text)"], "rowcount": 157}]} | null |
Deleted Wikidata items that could be Redirected | Show logs for deleted items that could have been redirected on Wikidata.
Only show items that are still deleted | USE wikidatawiki_p;
SELECT log_title, log_comment
FROM logging
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_namespace = 0
AND log_comment REGEXP '\\[\\[Q\\d+\\]\\]'
AND log_comment REGEXP '(same as|duplicate|merge)'
AND NOT EXISTS(SELECT 1 FROM page WHERE page_title=log_title); | {"resultsets": [{"headers": ["log_title", "log_comment"], "rowcount": 115602}]} | null |
test | null | USE enwiki_p;
SELECT rev_id, rev_parent_id, rev_timestamp, rev_user, rev_minor_edit, rev_page, rev_text_id, rev_comment, rev_user_text, rev_len
FROM revision
WHERE rev_timestamp >= "20140101" AND rev_timestamp <= "20140110"; | {"resultsets": [{"headers": ["rev_id", "rev_parent_id", "rev_timestamp", "rev_user", "rev_minor_edit", "rev_page", "rev_text_id", "rev_comment", "rev_user_text", "rev_len"], "rowcount": 1342971}]} | null |
Active editors fi >100 | null | use fiwiki_p;
select t.y,t.m,count(*) from (select rev_user, rev_user_text, YEAR(rev_timestamp) y,MONTH(rev_timestamp) m, 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(*)... | {"resultsets": [{"headers": ["y", "m", "count(*)"], "rowcount": 138}]} | null |
Wikidata - names - Korean names | null | # List of Korean names and their aliases
# FIXME: include names without any current aliases
# Database scheme: https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg
# without Wikidata tables (wb_entity_per_page, wb_terms)
# Last three columns can be used as basis for adding aliases ... | {"resultsets": [{"headers": ["label", "aliases", "Qid", "QuickStateAction", "Alias"], "rowcount": 335}]} | null |
FRK iesniegti CEE raksti | null | USE lvwiki_p;
SELECT page_title as "Raksts", page_len as "Baitu skaits"
FROM page
WHERE page_title in ("Malborkas_pils", "Kijevas_Pečeru_klosteris", "Kijevas_Svētās_Sofijas_katedrāle",
"Kumu_mākslas_muzejs", "Olga_Kuriļenko", "Hersonēsa", "Maskava_(upe)", "Novodevičjes_kapsēta",
... | {"resultsets": [{"headers": ["Raksts", "Baitu skaits"], "rowcount": 80}]} | null |
Get the categories for an image. | [[commons:File:New_born_Frisian_red_white_calf.jpg]]
| USE commonswiki_p;
SELECT cl_to FROM categorylinks INNER JOIN page ON page_id = cl_from WHERE page_namespace = 6 AND page_title = "New_born_Frisian_red_white_calf.jpg" | {"resultsets": [{"headers": ["cl_to"], "rowcount": 17}]} | null |
lvwiki invalid navbar links | Jāpārbauda visi en:Wikipedia:Database reports/Invalid Navbar links esošie varianti | 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, '_', ' ')
/*
S... | {"resultsets": [{"headers": ["template", "param_value"], "rowcount": 26}]} | null |
Small lvwiki articles not marked as stubs | null | #from http://quarry.wmflabs.org/query/1135
use lvwiki_p;
SELECT page_title, page_len
FROM page
WHERE page_namespace = 0 AND page_len < 1000 AND page_is_redirect = 0 and page_title NOT LIKE "%gads"
AND page_id NOT IN (
SELECT tl_from FROM templatelinks WHERE tl_title IN
("Asbox", "Nozīmju_atdalīšana", "Copyvio", "... | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 100}]} | null |
Wikidata - labels with leading space | null | use wikidatawiki_p;
SELECT CONCAT('Q', term_entity_id) As item, term_text, term_language As lang,
CURRENT_DATE
from wb_terms
WHERE term_entity_type = 'item'
#AND term_language in ('en')
AND term_type = 'label'
AND term_text LIKE ' %'
GROUP BY term_text, term_language | {"resultsets": [{"headers": ["item", "term_text", "lang", "CURRENT_DATE"], "rowcount": 151}]} | null |
Edgars2007's testing area 2 | null | USE enwiki_p;
SELECT tl_from
FROM templatelinks
#LEFT JOIN page p ON tl_title = p.page_title
where tl_title="Navbar" and tl_namespace=828 and tl_from_namespace=10
and tl_from not in (SELECT tl_from
FROM templatelinks
where (tl_title="Infobox" or tl_title="Sidebar")# or
and (t... | {"resultsets": [{"headers": ["tl_from"], "rowcount": 50}]} | null |
Fa WP user edit/log counts in the last three years | null | use fawiki_p;
select rev_user, user_name, u.ug_group, count(rev_timestamp) editcount, l.logcount
from revision
join user
on rev_user = user_id
left join
(
select ug_user, ug_group
from user_groups
where ug_group = 'sysop'
) u
on u.ug_user = user_id
left join
(
select log_user, count(log_id) as logcount
from loggi... | {"resultsets": [{"headers": ["rev_user", "user_name", "ug_group", "editcount", "logcount"], "rowcount": 51567}]} | null |
Nakhlestan | null | use fawiki_p;
select page_title, rev_longest_len
from revision
join
(
select rev_page as rev_first_page, min(rev_timestamp) as rev_first_timestamp
from revision
group by rev_page
) f
on rev_page = rev_first_page
and rev_timestamp = rev_first_timestamp
join
(
select rev_page as rev_longest_page, max(rev_len) as rev_long... | {"resultsets": [{"headers": ["page_title", "rev_longest_len"], "rowcount": 248}]} | null |
Fa WP articles with only a few edits way in the past | Articles that are not protected, have only been edited less than 5 times, and their last edit happened more than a year ago but the article was created less than two years ago. This does NOT count minor edits (so that if an article has been edited more recently but only by bots, it would still show up in the results). | use fawiki_p;
select page_id, page_title, rev_count, rev_latest_major, max(rev_len)
from
(
select rev_page, max(rev_timestamp) as rev_latest_major
from revision
where rev_minor_edit <> 1
group by rev_page
having rev_latest_major < '20140603000000'
) lm
join
(
select rev_page, max(rev_timestamp) as rev_latest
from revis... | {"resultsets": [{"headers": ["page_id", "page_title", "rev_count", "rev_latest_major", "max(rev_len)"], "rowcount": 62008}]} | null |
Library science category activity | null | SELECT rc.rc_id,
rc.rc_cur_id,
rc.rc_title,
rc.rc_timestamp,
rc.rc_this_oldid,
rc.rc_last_oldid,
rc.rc_user_text,
rc.rc_old_len,
rc.rc_new_len,
rc.rc_comment
FROM recentchanges... | {"resultsets": [{"headers": ["rc_id", "rc_cur_id", "rc_title", "rc_timestamp", "rc_this_oldid", "rc_last_oldid", "rc_user_text", "rc_old_len", "rc_new_len", "rc_comment"], "rowcount": 2}]} | null |
Edits in the past 30 days | null | select count(*) from recentchanges where rc_user_text = 'Slaporte' and rc_timestamp >= DATE_SUB(NOW(), INTERVAL 30 DAY) | {"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]} | null |
Bytes added by Salebot | null | use frwiki_p;
SELECT
SUBSTRING(rev_timestamp,1,6) AS rev_month,
FORMAT(SUM(rev_len), 0) AS rev_bytes,
FORMAT(COUNT(rev_id), 0) AS rev_count
FROM revision
WHERE rev_user_text="Salebot"
GROUP BY rev_month; | {"resultsets": [{"headers": ["rev_month", "rev_bytes", "rev_count"], "rowcount": 93}]} | null |
Women total, not bots, with at least 1 edit, Swedish Language WP | null | SELECT COUNT(DISTINCT rev_user) AS WomenTotal FROM svwiki_p.revision WHERE rev_user IN
(
SELECT user_id FROM svwiki_p.user JOIN svwiki_p.user_properties ON user_id=up_user WHERE
up_property = 'gender' AND up_value = 'female'
);
SELECT COUNT(DISTINCT rev_user) AS MenTotal FROM svwiki_p.revision WHERE rev_user IN... | {"resultsets": [{"headers": ["WomenTotal"], "rowcount": 1}, {"headers": ["MenTotal"], "rowcount": 1}, {"headers": ["Total"], "rowcount": 1}]} | null |
slash-slash-space | Descriptions starting with '// ' | USE wikidatawiki_p;
SELECT CONCAT("Q",term_entity_id), term_language, term_text
FROM wb_terms
WHERE term_type="description"
AND term_entity_type="item"
AND term_text LIKE "%// %"; | {"resultsets": [{"headers": ["CONCAT(\"Q\",term_entity_id)", "term_language", "term_text"], "rowcount": 3}]} | null |
Hewiki subtemplates category project | null | use hewiki_p;
select (case when page_title like "%/%" then "ATTENTION" else "z" end) as slash,
replace(page_title, "_", " ") as title, page_restrictions as restrictions, page_len as length from page
where page_namespace = 10
and page_is_redirect = 0
and not exists
(select * from categorylinks
where page_id = cl_from)
| {"resultsets": [{"headers": ["slash", "title", "restrictions", "length"], "rowcount": 241}]} | null |
User pages with Infobox person template not edited by user | Gives list of all user pages which need deletion, as they are not edited by the concerned user, following inclusion of Infobox person template by other wikipedians. | use tewiki_p;
SELECT DISTINCT page_title
FROM page
LEFT JOIN templatelinks
ON tl_from = page_id
WHERE tl_namespace = 10 AND tl_title = "Infobox_person" AND page.page_namespace = 2 AND page_is_redirect =0 AND page_title NOT REGEXP ".+[/|.].+" AND page_title NOT IN
(SELECT page_title
FROM page
RIGHT JOIN r... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}]} | null |
Images tagged with {{free media}} on enwiki | null | use enwiki_p;
SELECT count(page_title)
FROM page, image
WHERE page.page_namespace = 6
AND page.page_title = image.img_name
AND page_id IN (
SELECT DISTINCT(tl_from) FROM templatelinks
WHERE
tl_namespace = 10
AND tl... | {"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]} | null |
Images tagged with {{Non-free media}} on enwiki | null | use enwiki_p;
SELECT count(page_title)
FROM page, image
WHERE page.page_namespace = 6
AND page.page_title = image.img_name
AND page_id IN (
SELECT DISTINCT(tl_from) FROM templatelinks
WHERE
tl_namespace = 10
AND tl... | {"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]} | null |
Images tagged with neither {{Free media}} nor {{Non-free media}} on enwiki | Images tagged with neither {{Free media}} nor {{Non-free media}} on enwiki | use enwiki_p;
SELECT page_title
FROM page, image
WHERE page.page_namespace = 6
AND page.page_title = image.img_name
AND page_id NOT IN (
SELECT DISTINCT(tl_from) FROM templatelinks
WHERE
tl_namespace = 10
AND tl_from_namespace = 6
AND tl_title IN ('Free_media')... | {"resultsets": [{"headers": ["page_title"], "rowcount": 7836}]} | null |
Files uploaded to Commons in 2015 with a GFDL license | null | use commonswiki_p;
SELECT count(page_title)
FROM page, image
WHERE page.page_namespace = 6
AND page.page_title = image.img_name
AND image.img_timestamp LIKE '2015%'
AND page_id IN (
SELECT DISTINCT(cl_from) FROM categorylinks
WHERE categorylinks.cl_to LIKE... | {"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]} | null |
Wikidata - labels with two spaces | null | use wikidatawiki_p;
SELECT CONCAT('Q', term_entity_id) As item, term_text, term_language As lang,
CURRENT_DATE
from wb_terms
WHERE term_entity_type = 'item'
AND term_language in ('en')
AND term_type = 'label' # change to 'description'
AND term_text LIKE '% %'
GROUP BY term_text, term_language | {"resultsets": [{"headers": ["item", "term_text", "lang", "CURRENT_DATE"], "rowcount": 801}]} | null |
Terms of P357 | null | SELECT * FROM wikidatawiki_p.wb_terms WHERE term_entity_id = 357 AND term_entity_type = "property"
| {"resultsets": [{"headers": ["term_row_id", "term_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"], "rowcount": 125}]} | null |
Terms of P1476 | null | SELECT * FROM wikidatawiki_p.wb_terms WHERE term_entity_id = 1476 AND term_entity_type = "property"
| {"resultsets": [{"headers": ["term_row_id", "term_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"], "rowcount": 92}]} | null |
The evil label non-uniqueness | null | SELECT * FROM wikidatawiki_p.wb_terms WHERE term_entity_type = "property" AND term_language = "gl" AND term_type = "label" AND term_text = "título~"
| {"resultsets": [{"headers": ["term_row_id", "term_entity_id", "term_entity_type", "term_language", "term_type", "term_text", "term_search_key", "term_weight"], "rowcount": 2}]} | null |
Uniqueness check | null | select term_entity_type,term_type,term_language,term_text,term_entity_id FROM wikidatawiki_p.`wb_terms` WHERE ((term_language='gl' AND term_search_key='título~' AND term_type='label' AND term_entity_type='property')) LIMIT 10; | {"resultsets": [{"headers": ["term_entity_type", "term_type", "term_language", "term_text", "term_entity_id"], "rowcount": 2}]} | null |
Edits per day | null | use commonswiki_p;SELECT substr( rc_timestamp, 1, 8 ), count(distinct rc_cur_id) from recentchanges where rc_source = 'mw.edit' group by 1; | {"resultsets": [{"headers": ["substr( rc_timestamp, 1, 8 )", "count(distinct rc_cur_id)"], "rowcount": 31}]} | null |
Articles created on lgwiki between January 2014 and February 2015 | null | USE lgwiki_p;
SELECT page_title AS 'Article', rev_user_text AS 'Created by user', rev_timestamp AS 'Time' FROM revision
JOIN page ON rev_page = page_id
WHERE rev_parent_id = 0
AND rev_timestamp > '20140101000000'
AND rev_timestamp < '20150301000000'
AND page_namespace= 0 | {"resultsets": [{"headers": ["Article", "Created by user", "Time"], "rowcount": 264}]} | null |
Yona draft | null | USE hewiki_p;
SELECT page_namespace, page_title, rd_title
FROM page JOIN redirect
ON rd_from = page_id
WHERE page_namespace = rd_namespace
AND page_namespace in (10, 14)
| {"resultsets": [{"headers": ["page_namespace", "page_title", "rd_title"], "rowcount": 845}]} | null |
Grants | null | #-----EVALUATION PORTAL EDITS
#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_community FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS ... | {"resultsets": [{"headers": ["year", "month", "edits_community"], "rowcount": 21}, {"headers": ["year", "month", "edits_WMF"], "rowcount": 21}, {"headers": ["year", "month", "editors_Community"], "rowcount": 21}, {"headers": ["year", "month", "editors_WMF"], "rowcount": 21}, {"headers": ["year", "month", "Grants_pages_... | null |
Learning Patterns | null | #-----LEARNING PATTERN EDITS
#edits to the LEARNING PATTERNS 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 edits_community FROM metawiki_p.revision r
INNER JOIN metawiki_p.page AS ... | {"resultsets": [{"headers": ["year", "month", "edits_community"], "rowcount": 21}, {"headers": ["year", "month", "edits_WMF"], "rowcount": 21}, {"headers": ["year", "month", "editors_Community"], "rowcount": 21}, {"headers": ["year", "month", "editors_WMF"], "rowcount": 21}, {"headers": ["year", "month", "ideas_created... | null |
Education Toolkit | null | #-----EDUCATION TOOLKIT EDITS
#edits to the EDUCATION TOOLKIT 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 edits_community FROM metawiki_p.revision r
INNER JOIN metawiki_p.page A... | {"resultsets": [{"headers": ["year", "month", "edits_community"], "rowcount": 13}, {"headers": ["year", "month", "edits_WMF"], "rowcount": 16}, {"headers": ["year", "month", "editors_Community"], "rowcount": 13}, {"headers": ["year", "month", "editors_WMF"], "rowcount": 16}, {"headers": ["year", "month", "ideas_created... | null |
Daily anonymous mobile edits from German Wikipedia | https://quarry.wmflabs.org/query/2634 | 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 "20141101" AND "20150616" AND
rev_user = 0
GROUP BY date; | {"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 96}]} | null |
Village pages in tewp | null | use tewiki_p;
SELECT DISTINCT(page_title)
FROM page
LEFT JOIN (SELECT * from categorylinks) cl1 ON cl1.cl_from = page.page_id
WHERE page.page_namespace = 0 AND page_is_redirect =0 AND cl1.cl_to LIKE '%_జిల్లా_గ్రామాలు' and page_title NOT IN
(SELECT DISTINCT(page_title)
FROM page
LEFT JOIN (SELECT * from ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 29820}]} | null |
Links to Jordanian universities | null | USE enwiki_p;
SELECT DISTINCT page_title, el_to FROM page JOIN externallinks ON el_from=page_id WHERE page_namespace=0 AND el_to LIKE "%.ju.edu.jo%" ORDER BY page_title DESC; | {"resultsets": [{"headers": ["page_title", "el_to"], "rowcount": 77}]} | null |
Edits made to [[w:en:Bee]] that have Edit tags | Edits made to [[w:en:Bee]] that have [[w:en:Wikipedia:Tags|edit tags]] | use enwiki_p;
SELECT *
FROM tag_summary
WHERE ts_rev_id IN (
SELECT rev_id
FROM revision
WHERE rev_page = 4654
); | {"resultsets": [{"headers": ["ts_rc_id", "ts_log_id", "ts_rev_id", "ts_tags"], "rowcount": 3}]} | null |
User groups of all users who have edited [[w:en:Bee]] | See also http://quarry.wmflabs.org/query/3992 | use enwiki_p;
SELECT *
FROM user_groups
WHERE ug_user IN (
SELECT DISTINCT rev_user
FROM revision
WHERE rev_page = 4654
); | {"resultsets": [{"headers": ["ug_user", "ug_group"], "rowcount": 555}]} | null |
Lielākās attēlu aprakstu lapas | null | USE lvwiki_p;
SELECT CONCAT('#[[:File:',page.page_title,']]')
AS Filename, page_len FROM page
WHERE page_namespace=6 AND page_is_redirect=0
ORDER BY page_len DESC
limit 10;
| {"resultsets": [{"headers": ["Filename", "page_len"], "rowcount": 10}]} | null |
نوشتارهای درسطحمدیرانبیپایانمحافظتشده | null | use fawiki_p;
SELECT
page_is_redirect,
page_title
FROM page_restrictions
JOIN page
ON page_id = pr_page
AND page_namespace = 0
AND pr_type = 'edit'
AND pr_level = 'sysop'
AND pr_expiry = 'infinity'; | {"resultsets": [{"headers": ["page_is_redirect", "page_title"], "rowcount": 11}]} | null |
Blocked usernames in arwiki | Blocked users because of username's policy with prevent account creation- requested by محمد الفلسطيني | USE arwiki_p;
SELECT user_name FROM user JOIN ipblocks ON user_id=ipb_user AND ipb_reason LIKE "%اسم_مستخدم%" AND ipb_create_account=1 | {"resultsets": [{"headers": ["user_name"], "rowcount": 505}]} | null |
LPL Q3 FY 2013-14 | null | #-----LEARNING PATTERN EDITS
#edits to the LEARNING PATTERNS by Community
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
COUNT(rev_id) AS edits_community 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)
AND p.pa... | {"resultsets": [{"headers": ["year", "edits_community"], "rowcount": 1}, {"headers": ["year", "edits_WMF"], "rowcount": 1}, {"headers": ["year", "editors_Community"], "rowcount": 1}, {"headers": ["year", "editors_WMF"], "rowcount": 1}, {"headers": ["year", "month", "ideas_created_by_Community"], "rowcount": 20}, {"head... | null |
LPL Q2 FY 2013-14 | null | #-----LEARNING PATTERN EDITS
#edits to the LEARNING PATTERNS by Community
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
COUNT(rev_id) AS edits_community 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)
AND p.pa... | {"resultsets": [{"headers": ["year", "edits_community"], "rowcount": 1}, {"headers": ["year", "edits_WMF"], "rowcount": 1}, {"headers": ["year", "editors_Community"], "rowcount": 1}, {"headers": ["year", "editors_WMF"], "rowcount": 1}, {"headers": ["year", "month", "ideas_created_by_Community"], "rowcount": 20}, {"head... | null |
Should be tagged by WikiProject Women Scientists (enwiki) | Goes through the categories tagged by WikiProject Women Scientists, finds articles and categories not tagged by WikiProject Women Scientists. | use enwiki_p;
select distinct page.page_namespace,page.page_title from page
join categorylinks on categorylinks.cl_from = page.page_id
where page_namespace in (0, 14) # main namespace and category namespace
and cl_to in (
select page.page_title from page
join categorylinks on categorylinks.cl_from = page.page_id
whe... | {"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 502}]} | null |
Commons file pages linking to non-existing users | null | USE commonswiki_p;
SELECT page_title AS file_name, pl_title AS user_name FROM pagelinks
INNER JOIN page ON pl_from_namespace = 6 AND pl_namespace = 2 AND pl_title LIKE '"%"' AND pl_title NOT LIKE '%/%' AND page_id = pl_from
LEFT JOIN user ON user_name = REPLACE( pl_title, '_', ' ' )
WHERE user_name IS NULL
LIMIT 500 | {"resultsets": [{"headers": ["file_name", "user_name"], "rowcount": 202}]} | null |
SVG maps from 2015-02 onwards used 4-10 times in the Spanish Wikipedia | SVG maps from 2015-02 onwards used 4-10 times in the Spanish Wikipedia. Excluding those in category Historical_SVG_maps_in_Spanish and those in categories having "ocator" (locator) and "lag" (flag) in their categories.
The filtering is done by looking for SVG files uploaded after February 2015, having at least a catego... | use commonswiki_p;
Select img_name, cl_to, count(*) from image
inner join globalimagelinks on gil_to = img_name
inner join page on page_namespace=6 and page_title = img_name
inner join categorylinks on cl_from = page_id
where img_media_type = 'DRAWING' and img_major_mime="image" and img_minor_mime = 'svg+xml' and cl... | {"resultsets": [{"headers": ["img_name", "cl_to", "count(*)"], "rowcount": 100}]} | null |
Īsākie nozīmīgie raksti | null | use lvwiki_p;
SELECT pl.pl_title, max(p2.page_len)
FROM page p1
JOIN pagelinks pl ON pl.pl_from = p1.page_id
join page p2 on pl.pl_title=p2.page_title
WHERE p1.page_namespace = 4 AND p1.page_title = "Nozīmīgi_raksti" and pl.pl_namespace=0
group by pl.pl_title | {"resultsets": [{"headers": ["pl_title", "max(p2.page_len)"], "rowcount": 1000}]} | null |
Yesterday's recentchanges | null | 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_namespace = 0
AND rc_timestamp < DATE_FORMAT(CURDATE(), '%Y%m%d%H%i%s')
AND rc_timestamp > DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y%m%d%H%i%s')
ORDER BY r... | {"resultsets": [{"headers": ["rc_timestamp", "rc_title", "rc_user_text", "rc_comment", "rc_old_len", "rc_new_len", "rc_last_oldid", "rc_this_oldid"], "rowcount": 90683}]} | null |
Ranked Article Activity | null | SELECT rc_cur_id AS page_id,
rc_title AS title,
COUNT(*) AS edits,
COUNT(DISTINCT rc_user) AS users
FROM recentchanges
WHERE rc_namespace = 0
AND rc_type = 0
AND rc_timestamp > 20150110215640
GROUP BY page_id
ORDER BY edits
DESC
LIMIT 50 | {"resultsets": [{"headers": ["page_id", "title", "edits", "users"], "rowcount": 50}]} | null |
Tool Labs metadata database | Content of the metadata database; see https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database#Metadata_database for more information. | use meta_p;
SELECT * FROM wiki; | {"resultsets": [{"headers": ["dbname", "lang", "name", "family", "url", "size", "slice", "is_closed", "has_echo", "has_flaggedrevs", "has_visualeditor", "has_wikidata", "is_sensitive"], "rowcount": 861}]} | null |
All users who have edited [[w:en:Bee]] | null | use enwiki_p;
SELECT *
FROM user
WHERE user_id IN (
SELECT DISTINCT rev_user
FROM revision
WHERE rev_page = 4654
); | {"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 |
orphaned TimedText @[[:com:]] | null | use commonswiki_p;
select CONCAT('*[[:TimedText:', page_title,']] used by [[:File:', substr( page_title, 1, length( page_title ) - length( substring_index( page_title, '.' ,-2 ) ) - 1 ) , ']]' )
as '==oTT=='
from page left outer join image on substr( page_title, 1, length( page_title ... | {"resultsets": [{"headers": ["==oTT=="], "rowcount": 5}]} | null |
video_metadata | null | use commonswiki_p;
select img_name , img_size , img_media_type, img_major_mime, img_minor_mime, img_metadata
from image
where img_media_type = 'VIDEO'
#and img_name = 'Eruption_and_Possible_Current_Sheet_on_the_Limb_-Hinode_XRT-.webm'
# and length(img_metadata) > 1
limit 10 | {"resultsets": [{"headers": ["img_name", "img_size", "img_media_type", "img_major_mime", "img_minor_mime", "img_metadata"], "rowcount": 10}]} | null |
All revisions of [[w:en:Bee]] | null | use enwiki_p;
SELECT *
FROM revision
WHERE rev_page = 4654
ORDER BY rev_timestamp, rev_id; | {"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": 3333}]} | null |
50,000 revisions from frwiki for revscores | null | USE frwiki_p;
SELECT rev_id, rev_page AS page_id
FROM revision_userindex
WHERE rev_timestamp BETWEEN "20140101" AND "20150101"
ORDER BY RAND()
LIMIT 50000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 50000}]} | null |
50,000 revisions from fawiki for revscores | null | USE fawiki_p;
SELECT rev_id, rev_page AS page_id
FROM revision_userindex
WHERE rev_timestamp BETWEEN "20140101" AND "20150101"
ORDER BY RAND()
LIMIT 50000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 50000}]} | null |
50,000 revisions from ptwiki for revscores | null | USE ptwiki_p;
SELECT rev_id, rev_page AS page_id
FROM revision_userindex
WHERE rev_timestamp BETWEEN "20140101" AND "20150101"
ORDER BY RAND()
LIMIT 50000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 50000}]} | null |
50,000 revisions from azwiki for revscores | null | USE azwiki_p;
SELECT rev_id, rev_page AS page_id
FROM revision_userindex
WHERE rev_timestamp BETWEEN "20140101" AND "20150101"
ORDER BY RAND()
LIMIT 50000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 50000}]} | null |
50,000 revisions from trwiki for revscores | null | USE trwiki_p;
SELECT rev_id, rev_page AS page_id
FROM revision_userindex
WHERE rev_timestamp BETWEEN "20140101" AND "20150101"
ORDER BY RAND()
LIMIT 50000; | {"resultsets": [{"headers": ["rev_id", "page_id"], "rowcount": 50000}]} | null |
Hot articles last week on Swedish Wikipedia | Articles that have been edited many times by many editors the last week on Wikipedia. | SELECT COUNT(rev_page)*COUNT(DISTINCT rev_user) AS 'Edits times unique editors', page_title AS 'Article' FROM svwiki_p.revision
JOIN svwiki_p.page ON rev_page = page_id
WHERE page_namespace = 0
AND rev_timestamp > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 8 DAY),'%Y%m%d%H%i%s')
GROUP BY page_title
ORDER BY COUNT(page_title... | {"resultsets": [{"headers": ["Edits times unique editors", "Article"], "rowcount": 20}]} | null |
{{Infobox company}} and {{Coord}} | Pages with both {{Infobox company}} and {{Coord}} | SELECT page_title FROM templatelinks tlic, templatelinks tlco, page
WHERE tlic.tl_namespace = 10 AND tlic.tl_title = 'Infobox_company' AND
tlco.tl_namespace = 10 AND tlco.tl_title = 'Coord' AND
tlic.tl_from_namespace = 0 AND tlic.tl_from_namespace = tlco.tl_from_namespace AND
tlic.tl_from = tlco.tl_from AND
page_id = t... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2044}]} | null |
Tühjad või lühikesed artiklid | null | USE etwiki_p;
SELECT page_title, page_len FROM page
WHERE
page_namespace = 0
AND page_is_redirect = 0
AND page_len < 30
ORDER BY page_len ASC; | {"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 0}]} | null |
Ümbersuunamised teise nimeruumi | null | USE etwiki_p;
SELECT rd_namespace, rd_title, page_title
FROM page
JOIN redirect ON redirect.rd_from = page.page_id
WHERE page.page_namespace = 0
AND redirect.rd_namespace <> 0
| {"resultsets": [{"headers": ["rd_namespace", "rd_title", "page_title"], "rowcount": 50}]} | null |
Most frequent domains (Estonian Wikipedia) | null | USE etwiki_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": 247}]} | null |
gadu raksti | null | use lvwiki_p;
SELECT p.page_title#, t4.rev_page, t4.rev_comment
FROM revision AS t4
join page p on t4.rev_page=p.page_id
WHERE t4.rev_id IN (
Select min(t45.rev_id)
From revision t45
inner join page p on t45.rev_page=p.page_id
where p.page_namespace=0 and p.page_is_redirect=0
group by t45.rev_page
having min(t45.rev_i... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1143}]} | null |
Images added in the Wikidata Menu Challenge | Images (i.e. Property:P18) added in the Wikidata Menu Challenge. https://www.wikidata.org/wiki/Wikidata:Menu_Challenge | USE wikidatawiki_p;
SELECT rev_comment
FROM revision
JOIN page ON rev_page = page_id
WHERE page_title IN ("Q17", "Q34", "Q48", "Q89", "Q142", "Q152", "Q178", "Q195", "Q196", "Q500", "Q787", "Q830", "Q881", "Q1072", "Q5090", "Q6128", "Q6663", "Q7150", "Q7535", "Q7802", "Q8486", "Q8495", "Q9266", "Q9614", "Q9896", "Q1094... | {"resultsets": [{"headers": ["rev_comment"], "rowcount": 102}]} | null |
Pronunciation audio added in Wikidata Menu Challenge | Pronunciation audio (i.e. Property:P443) added in Wikidata Menu Challenge. https://www.wikidata.org/wiki/Wikidata:Menu_Challenge | USE wikidatawiki_p;
SELECT rev_comment
FROM revision
JOIN page ON rev_page = page_id
WHERE page_title IN ("Q17", "Q34", "Q48", "Q89", "Q142", "Q152", "Q178", "Q195", "Q196", "Q500", "Q787", "Q830", "Q881", "Q1072", "Q5090", "Q6128", "Q6663", "Q7150", "Q7535", "Q7802", "Q8486", "Q8495", "Q9266", "Q9614", "Q9896", "Q1094... | {"resultsets": [{"headers": ["rev_comment"], "rowcount": 1140}]} | null |
Redirects with external links | null | 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(COUNT(*)/10) DESC, el_index | {"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "el_to", "COUNT(*)"], "rowcount": 1248}]} | null |
old and new rev length snippet | 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": 8692}]} | null |
Latvian cross namespace redirects | http://quarry.wmflabs.org/query/922 | use lvwiki_p;
use lvwiki_p;
SELECT pl_namespace, pl_from_namespace, page_title, page_id
FROM page
INNER JOIN pagelinks ON pl_from = page_id AND pl_namespace != pl_from_namespace
WHERE page_is_redirect = 1
order by pl_from_namespace desc, page_title asc
LIMIT 800 | {"resultsets": [{"headers": ["pl_namespace", "pl_from_namespace", "page_title", "page_id"], "rowcount": 582}]} | null |
Latest Bureaucratic actions in Fa WP | To get a sense of which bureaucrats are active. | USE fawiki_p;
SELECT log_id, log_user_text, log_title, log_timestamp, log_comment, log_params FROM logging
WHERE log_type = 'rights'
AND log_action = 'rights'
AND
(
(log_params NOT LIKE '%sysop%newgroups%sysop%' AND log_params LIKE '%newgroups%sysop%')
OR (log_params NOT LIKE '%bureaucrat%newgroups%bureaucrat%' AN... | {"resultsets": [{"headers": ["log_id", "log_user_text", "log_title", "log_timestamp", "log_comment", "log_params"], "rowcount": 100}]} | null |
All .js pages in MW namespace | null | use fawiki_p;
select concat('MediaWiki:', page_title)
from page
where page_title like '%.js'
and page_namespace = 8; | {"resultsets": [{"headers": ["concat('MediaWiki:', page_title)"], "rowcount": 240}]} | null |
Users of Wiki Loves Monuments 2014 in France | Useful to get the cohort from WLM 2014 | USE commonswiki_p;
SELECT /* SLOW_OK */
img_user_text AS "USER",
COUNT(img_name) AS "COUNT"
FROM image
CROSS JOIN page ON image.img_name = page.page_title
CROSS JOIN categorylinks ON page.page_id = categorylinks.cl_from
WHERE
categorylinks.cl_to = "Images_from_Wiki_Loves_Monuments_2014_in_France"
GROUP BY img_us... | {"resultsets": [{"headers": ["USER", "COUNT"], "rowcount": 801}]} | null |
Most common thanker/thanked unordered pairs | null | USE lvwiki_p;
SELECT LEAST(REPLACE(log_title,'_',' '),log_user_text), GREATEST(REPLACE(log_title,'_',' '), log_user_text), COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY 1, 2
ORDER BY 3 DESC
LIMIT 100; | {"resultsets": [{"headers": ["LEAST(REPLACE(log_title,'_',' '),log_user_text)", "GREATEST(REPLACE(log_title,'_',' '), log_user_text)", "COUNT(*)"], "rowcount": 100}]} | null |
Most thanked editors (lvwiki) | null | USE lvwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 100; | {"resultsets": [{"headers": ["log_title", "COUNT(*)"], "rowcount": 100}]} | null |
Less active users on plwiki | null | USE plwiki_p;
SELECT user_id, CONCAT("[[User:",user_name,"|",user_name,"]]") AS user_name, user_editcount, user_registration/*, $wgGroupPermissions*/
FROM user
WHERE user_name NOT LIKE '%bot%'
AND user_registration > 20150101000000
AND user_registration < 20150601000000
AND user_editcount > 50
AND user_editcount < 100 | {"resultsets": [{"headers": ["user_id", "user_name", "user_editcount", "user_registration"], "rowcount": 80}]} | null |
An old query | null | use wikidatawiki_p;
SELECT rev_user_text, COUNT(*) FROM revision
WHERE rev_comment LIKE '/* wbcreateclaim-create:2| */ [[Property:P106]]%'
AND rev_comment RLIKE '\[Q(56923|83460|111837|132851|152951|152956|157148|158668|165654|186024|189290|214443|275102|335954|493898|506249|648329|675594|694005|727229|842486|852661|98... | {"resultsets": [{"headers": ["rev_user_text", "COUNT(*)"], "rowcount": 129}]} | null |
Veidnes ar ambox | der arī neizmantotajām veidnēm? | use lvwiki_p;
select concat("Veidne:",page_title)
from page
where page_title like "Convert%"
and page_is_redirect=0 and page_namespace=10
/*use lvwiki_p;
SELECT
p1.page_namespace,
p1.page_title
FROM redirect AS rd
JOIN page p1
ON rd.rd_from = p1.page_id
LEFT JOIN page AS p2
ON rd_namespace = p2.page_namespace
AND... | {"resultsets": [{"headers": ["concat(\"Veidne:\",page_title)"], "rowcount": 23}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.