title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Get nlwiki page schema | null | SELECT DISTINCT (log_type) FROM commonswiki_p.logging_userindex; | {"runningtime": "0.27", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Wikidata edits by a user using Commons app | null | use commonswiki_p;
select distinct (log_type)
from logging_userindex
| {"runningtime": "0.27", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Links to Metacritic on en.wp, with Wikidata items | null | use enwiki_p;
SELECT page_title, pp_value, REPLACE(el_to, 'http://www.metacritic.com/', '') as id, CONCAT("https://en.wikipedia.org/?oldid=", page_latest) as source
FROM externallinks
INNER JOIN page ON el_from = page_id
INNER JOIN page_props ON pp_page = page_id AND pp_propname = 'wikibase_item'
WHERE el_to LIKE "http... | {"runningtime": "0.33", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Query anonymous contributions | Query ip contributions | use wikidatawiki_p;
SELECT * FROM revision_actor_temp
JOIN actor ON actor_id = revactor_actor
JOIN revision on revactor_rev = rev_id
JOIN comment ON rev_comment_id = comment_id
WHERE actor_name = '113.5.4.166'; | {"runningtime": "0.35", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Query anonymous contributions | Query ip contributions | use wikidatawiki_p;
SELECT * FROM revision_actor_temp
JOIN actor ON actor_id = revactor_actor
JOIN revision on revactor_rev = rev_id
JOIN comment ON rev_comment_id = comment_id
WHERE actor_name = '197.38.244.253'; | {"runningtime": "0.32", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"runningtime": "0.22", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Enwiki DYK antica Grecia e antica Roma | null | use enwiki_p;
SELECT
CONCAT('# [[', page_title, ']]')
FROM page
JOIN templatelinks
ON tl_from = page_id
JOIN categorylinks
ON cl_from = page_id
WHERE cl_to = "Wikipedia Did you know articles"
AND tl_namespace = 10
AND tl_title = "WikiProject Classical Greece and Rome"
AND page_namespace = 1
LIMIT 500; | {"runningtime": "0.23", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
User group counts of arabic wikipedia. | null | use arwiki_p;
select ug_group, count(*) as 'total ar wikipedians' from user_groups group by ug_group order by 'total ar wikipedians' desc;
select count(*) from user where user_registration < 20180610000000 and user_editcount > 500; | {"runningtime": "0.10", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Wikidata edits by a user using Commons app | null | use wikidatawiki_p;
select count(*) as edit_count
from change_tag
join revision on rev_id=ct_rev_id where ct_tag_id=155 and rev_user_text="Maskaravivek"
| {"runningtime": "0.24", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
All tables in the enwiki_p database | All of the queriable tables in the public English Wikipedia database. | SHOW TABLES FROM wikidatawiki_p; | {"runningtime": "0.12", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Get nlwiki page schema | null | DESCRIBE commonswiki_p.revision; | {"runningtime": "0.27", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Unused Templates first 5000 | null | SELECT page_title, r.rev_timestamp
FROM page
LEFT JOIN revision r
on r.rev_page = page.page_id
AND r.rev_timestamp = (
SELECT min(rev_timestamp) from revision
where rev_page = page_id
)
LEFT JOIN templatelinks t1
ON t1.tl_namespace=10 AND t1.tl_title=page_title
WHERE page_namespace=10
AND r.re... | {"runningtime": "0.16", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 2}]} | null |
Test: find text | null | use itwiki_p;
SELECT CONCAT("# [[", page_title, "]]")
FROM page
JOIN revision ON page_id=rev_page
JOIN text ON rev_text_id=old_id
WHERE page_namespace='0'
AND old_text regexp "protagonist[ia] principal[ei]"
ORDER BY page_title; | {"runningtime": "89.31", "resultsets": [{"headers": ["Username", "regdate"], "rowcount": 8601}]} | null |
Prova: edit count user | null | use itwiki_p;
select user_id, user_name, user_editcount from user where user_editcount >100 order by user_editcount desc; | {"runningtime": "0.21", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 17}]} | null |
Get all news sources from enwikinews | null | set statement max_statement_time = 3600 for
select el_to, page_id, page_title
from enwikinews_p.externallinks
join page on externallinks.el_from = page.page_id
WHERE page_namespace = 0 | {"runningtime": "0.20", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 16}]} | null |
Test: find text | null | use itwiki_p;
SELECT
CONCAT("# [[", page_title, "]]")
FROM
page
JOIN revision ON page_id = rev_page
JOIN text ON rev_text_id = old_id
WHERE
page_namespace = '0'
AND old_text regexp "protagonist[ia] principal[ei]"
ORDER BY
page_title; | {"runningtime": "0.23", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 17}]} | null |
All tables in the enwiki_p database | All of the queriable tables in the public English Wikipedia database. | DESCRIBE wikidatawiki_p.image;
| {"runningtime": "96.41", "resultsets": [{"headers": ["CONCAT ('# [[',REPLACE(MID(Target.page_title,1,LOCATE('(',Target.page_title)-2),'_',' '),']]\t[[',REPLACE(Target.page_title,'_',' '),']]')"], "rowcount": 10877}]} | null |
2019أكثر المستخدمين تعديلًا ضمن مقالات مشروع ويكي طب | null | USE arwiki_p;
select user_name, count(user_editcount)
from revision
inner join user
on user_editcount = user_id
where rev_timestamp between 20190101000000 AND 20191231235959
and rev_page in (select cl_from from categorylinks where cl_from = rev_page and cl_to = "بوابة_طب/مقالات_متعلقة")
group by user_editcount
ORDER B... | {"connection_id": 210214244} | null |
arwiki: block statistics by user (excluding IPs) | null | USE arwiki_p;
SELECT
log_title,
COUNT(log_title) AS number_of_blocks
FROM
logging_userindex
WHERE
log_namespace=2 AND
log_type='block' AND
log_action='block' AND -- but not 'reblock' or 'unblock'
log_title NOT REGEXP '^[0-9]{1,3}(\.[0-9]{1,3}){0,3}(\/[0-9]{1,2})?$' AND -- no IPv4 addresses (and ran... | {"runningtime": "29.57", "resultsets": [{"headers": ["stubcatcount", "freq"], "rowcount": 8}]} | null |
Review web tool | null | use ruwiki_p;
SELECT actor_name, cnt
FROM (SELECT log_actor, COUNT(*) AS cnt
FROM logging
WHERE log_type = "review"
AND log_action IN ("approve", "approve-i", "unapprove")
AND log_timestamp BETWEEN "20190101000000" AND "20190701000000"
AND log_namespace IN (0, 6, 10, 14, 100, 828)
... | {"runningtime": "26.24", "resultsets": [{"headers": ["NOW()"], "rowcount": 1}, {"headers": ["lang", "count"], "rowcount": 1}, {"headers": ["rev_id", "page_title", "rev_timestamp", "comment_text", "rev_user_text"], "rowcount": 78}]} | null |
2019أكثر المستخدمين تعديلًا ضمن مقالات مشروع ويكي طب | null | USE arwiki_p;
select user_name, count(rev_actor)
from revision
inner join user
on rev_actor = user_id
where rev_timestamp between 20190101000000 AND 20191231235959
and rev_page in (select cl_from from categorylinks where cl_from = rev_page and cl_to = "بوابة_طب/مقالات_متعلقة")
group by user_name
ORDER BY count(user_na... | {"runningtime": "104.60", "resultsets": [{"headers": ["img_name", "img_width", "img_height"], "rowcount": 9833}]} | null |
All tags on Wikimedia Commons | null | use commonswiki_p;
select * from change_tag_def; | {"runningtime": "572.53", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Suggestions for dead-end pages (iswiki) | null | use etwiki_p;
select pl_title, a.page_title from pagelinks
join page a on pl_from = a.page_id
join page b on pl_title = b.page_title
where pl_from_namespace = 0
and pl_namespace = 0
and b.page_id not in (
select pl_from from pagelinks
)
limit 20; | {"runningtime": "522.46", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
All edits made with the Musikverket Description Translation tool | null | use commonswiki_p;
select rev_id, page_title, revision.rev_user_text
from revision
join revision on rev_id=ct_rev_id
join page on page_id=rev_page where ct_tag_id=405
| {"runningtime": "0.66", "resultsets": [{"headers": ["\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u062d\u0627\u062a", "\u0627\u0644\u0639\u0646\u0648\u0627\u0646"], "rowcount": 43}]} | null |
User edits statistics Musikverket Description Translation tool | null | use commonswiki_p;
select count(*), actor_name
from change_tag
join revision on rev_id=ct_rev_id
join actor on rev_actor=actor_id
join page on page_id=rev_page where ct_tag_id=405
group by actor_name
order by 1 desc | {"runningtime": "560.76", "resultsets": [{"headers": ["title", "languages"], "rowcount": 50}]} | null |
1Lib1Ref stat | null | use fawiki_p;
SELECT rev_actor, COUNT(1) as total
FROM revision_userindex, comment, actor
WHERE rev_comment_id = comment_id AND comment_text LIKE '%1Lib1Ref%'
AND rev_actor = actor_id
GROUP BY rev_actor | {"runningtime": "657.90", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
عناوين لقوالب غير مرتبطة ولها مقابل في ويكيبيديا الإنجليزية | null | use arwiki_p;
select concat("قالب:",page_title,) from page
where page_title regexp "[A-Za-z0-9]"
and page_id not in (select ll_from from langlinks where ll_from = page_id)
and page_namespace = 10
and page_is_redirect = 0
and page_title in (select enwiki_p.page.page_title from enwiki_p.page where enwiki_p.page.page_titl... | {"connection_id": 205755901} | null |
عناوين لقوالب غير مرتبطة ولها مقابل في ويكيبيديا الإنجليزية | null | use arwiki_p;
select concat("[[قالب:",page_title,"]]") from page
where page_title regexp "[A-Za-z0-9]"
and page_id not in (select ll_from from langlinks where ll_from = page_id)
and page_namespace = 10
and page_is_redirect = 0
and page_title in (select enwiki_p.page.page_title from enwiki_p.page where enwiki_p.page.pag... | {"runningtime": "38.16", "resultsets": [{"headers": ["NOW()"], "rowcount": 1}, {"headers": ["lang", "count"], "rowcount": 1}, {"headers": ["rev_id", "page_title", "rev_timestamp", "comment_text", "rev_user_text"], "rowcount": 192}]} | null |
WLE-IT participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | SELECT CONCAT("# {{#target:User_talk:", rev_user_text, "|commons.wikimedia.org}}") as line
FROM commonswiki_p.revision r_prev
join commonswiki_p.categorylinks
on rev_page = cl_from
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Italy",
"Images_from_Wiki_Loves_Earth_2015_in_Italy",
... | {"connection_id": 205796565} | null |
Danna-patrol check | patrolled checked per day | set @date = "20190512";
use hewiki_p;
select count(*) from logging_userindex join actor
on log_actor = actor_id
where actor_user = 60104
and log_type = "patrol"
and not log_action = "autopatrol"
and log_timestamp like concat(@date, "%")
| {"runningtime": "601.65", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
WLE-AZ participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | SELECT CONCAT("# {{#target:User_talk:", rev_user_text, "|commons.wikimedia.org}}") as line
FROM commonswiki_p.revision r_prev
join commonswiki_p.categorylinks
on rev_page = cl_from
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Azerbaijan",
"Images_from_Wiki_Loves_Earth_2015_in_Azer... | {"runningtime": "582.31", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
idwikibooks_p | null | USE idwikibooks_p;
SELECT SQL_CALC_FOUND_ROWS rc_namespace, rc_title, rc_cur_id, GROUP_CONCAT(rc_log_type) AS log_types, GROUP_CONCAT(rc_log_action) AS log_actions, GROUP_CONCAT(rc_type) AS types, GROUP_CONCAT(rc_timestamp) AS timestamps, GROUP_CONCAT(rc_actor) AS actors, GROUP_CONCAT(rc_this_oldid) AS diffs, GROUP_CON... | {"runningtime": "600.76", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
table explorer | null | DESCRIBE ukwiki_p.revision; | {"connection_id": 206574283} | null |
zh_classicalwiki flaggedpages | null | USE zh_classicalwiki_p;
SELECT *
FROM flaggedpages
LIMIT 100 | {"runningtime": "0.13", "resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 1}]} | null |
zh_classicalwiki flaggedrevs | null | USE zh_classicalwiki_p;
SELECT *
FROM flaggedrevs
LIMIT 100 | {"runningtime": "7.50", "resultsets": [{"headers": ["NOW()"], "rowcount": 1}, {"headers": ["lang", "count"], "rowcount": 1}, {"headers": ["rev_id", "page_title", "rev_timestamp", "comment_text", "rev_user_text"], "rowcount": 39}]} | null |
zh_classicalwiki flaggedpage_pending | null | USE zh_classicalwiki_p;
SELECT *
FROM flaggedpage_pending
LIMIT 100 | {"runningtime": "464.42", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Langcode icon templates | null | USE enwiki_p;
SELECT
page_title,
/*
The code for generating the following two columns was copied from:
https://quarry.wmflabs.org/query/36294
(Another query by me.)
*/
CASE page_is_redirect
WHEN 1 THEN "(R)"
END AS R,
(
SELECT GROUP_CONCAT(page2_title SEPARATOR " ")
FROM redirect
JOIN... | {"runningtime": "0.20", "resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages"], "rowcount": 1}]} | null |
zh_classicalwiki reviewed article | null | USE zh_classicalwiki_p;
SELECT page_title, fp_quality
FROM page
LEFT JOIN flaggedpages ON page_id = fp_page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND fp_reviewed = 1
ORDER BY page_title ASC | {"runningtime": "0.21", "resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages"], "rowcount": 2}]} | null |
testing | null |
USE idwiki_p;
| {"runningtime": "2.41", "resultsets": [{"headers": ["user_name"], "rowcount": 696}]} | null |
Gender of editors to specific pages (aggregate, timestamp range) | For [[w:User talk:Cryptic#Curious about a stat]] circa 12 Jun 2019. | SELECT (CASE
WHEN actor_user IS NULL then 'ip'
WHEN up_value IS NULL then 'unspecified'
ELSE up_value
END) AS gender_or_ip,
COUNT(*)
FROM (SELECT DISTINCT actor_user, actor_name, up_value
FROM revision
JOIN actor ON actor_id = rev_actor
LEFT JOIN user_properties ... | {"runningtime": "629.58", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Superfluous space issues on French Wikipedia (count) | Counts edits made by Framabot to clean unnecessary spaces on translations published with Content Translation on French Wikipedia. Shows results for each month | use frwiki_p;
select year(rev_timestamp) as Year,MONTHNAME(rev_timestamp) as Month,count(rev_id) as Issues
from revision_userindex
INNER JOIN comment ON rev_comment_id = comment_id
INNER JOIN page ON rev_page = page_id
INNER JOIN actor ON rev_actor = actor_id
where actor_user = 2523928
and page_namespace = 0
... | {"runningtime": "588.62", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Proof-reader pages for a book | Change the actor_name and page_title for your search.
Either use rev_comment_id = 10076 or page_content_model like "%proofread-page%" | use tawikisource_p;
SELECT distinct page_title, actor_name, page_content_model as count
FROM revision
join page ON page_id = rev_page
join actor ON rev_actor = actor_id where
#rev_comment_id = 10076
page_content_model like "%validated%"
and rev_page IN (select page_id from page where page_title like "வெற்றி_முழக்கம்... | {"runningtime": "1817.37", "resultsets": [{"headers": ["rev_user_text", "rev_timestamp"], "rowcount": 4}]} | null |
Uploaded via Campaign:wsc18-ru [Commons] | Pages by author in Commons category ‘Uploaded via Campaign:wsc18-ru’ | USE commonswiki_p;
SELECT
rev_user_text,
COUNT(rev_user_text) AS total,
rev_comment,
rev_timestamp
FROM revision r
INNER JOIN page p ON page_id = r.rev_page
INNER JOIN categorylinks cl ON page_id = cl.cl_from
WHERE
p.page_namespace = 6 AND
r.rev_parent_id = 0 AND
cl.cl_to IN ("Uploaded_via_Campaign:w... | {"runningtime": "693.20", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Commons videos by size | null | USE commonswiki_p;
SELECT
RPAD(CONCAT("[[File:", REPLACE(img_name, "_", " "), "]]"), 155, " ") AS "File",
ROUND(img_size/1024/1024) AS MB,
CONCAT(img_width, "x", img_height) AS "Size",
TIME_FORMAT(SEC_TO_TIME(CONVERT(
SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(img_metadata,
"\"playtime_seconds\";d:... | {"runningtime": "811.94", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Newbie Commons Videos (15.04.2016) | Checked on 15.04.2016 | /* Newbie Commons Videos
* Author: Dispenser
*/
USE commonswiki_p;
SELECT
RPAD(CONCAT("[[File:", REPLACE(img_name, "_", " "), "]]"), 155, " ") AS "File",
ROUND(img_size/1024/1024) AS MB,
CONCAT(img_width, "x", img_height) AS "Size",
TIME_FORMAT(SEC_TO_TIME(CONVERT(
SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRIN... | {"runningtime": "958.82", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Reverts in fawiki by a user | ...Which they have reverted another user's edit. Now limited to 5 due to technical problems. | use fawiki_p;
SELECT DISTINCT rev_id
FROM revision JOIN page ON rev_page=page_id
JOIN actor ON rev_actor = actor_id
JOIN comment ON rev_comment_id = comment_id
WHERE actor_name LIKE 'Ahmad252'
AND comment_text LIKE '%خنثیسازی%'
AND comment_text NOT LIKE '%Ahmad252'
AND page_namespace = 0
... | {"runningtime": "44.70", "resultsets": [{"headers": ["user_name"], "rowcount": 177}]} | null |
Reverts in fawiki by a user | ...Which they have reverted another user's edit. Now limited to 5 due to technical problems. | use fawiki_p;
SELECT DISTINCT rev_id
FROM revision JOIN page ON rev_page=page_id
JOIN actor ON rev_actor = actor_id
JOIN comment ON rev_comment_id = comment_id
WHERE actor_name LIKE 'Ahmad252'
AND comment_text LIKE '%خنثیسازی%'
AND comment_text NOT LIKE '%Ahmad252'
AND page_namespace = 0
... | {"runningtime": "4.55", "resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 45}, {"headers": ["linter_cat", "count(*)"], "rowcount": 9}, {"headers": ["page_namespace", "count(*)"], "rowcount": 16}]} | null |
most blocked users | null | USE fawiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type = "block"
AND log_timestamp > 20190000000000
AND REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(log_title,0,""),1,""),2,""),3,""),4,""),5,""),6,""),7,""),8,""),9,""),".",""),"/","") <> ""
GROUP BY log_t... | {"runningtime": "868.94", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
most blocked users | null | USE fawiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type = "block"
AND log_timestamp > 20190000000000
AND REGEXP_REPLACE(log_title, '[0-9\.]+', '') <> ""
AND log_title='Mdaneshmandi'
GROUP BY log_title
ORDER BY COUNT(*) DESC; | {"runningtime": "718.87", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Number of lexeme pages with/without wbl-senses page prop | For T199611 and T224844. | USE `wikidatawiki_p`;
SELECT
`pp_page` IS NOT NULL AS `has_wbl_senses`,
COUNT(*) AS `count`
FROM `page`
LEFT JOIN `page_props`
ON `pp_page` = `page_id`
AND `pp_propname` = 'wbl-senses'
WHERE `page_namespace` = 146
GROUP BY `has_wbl_senses`; | {"runningtime": "589.92", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Gender of editors to specific page | null | select distinct actor_name as "username", (select up_value from user_properties where up_user=actor_user and up_property="gender") as "gender"
from revision join actor on rev_actor=actor_id
where rev_page= (select page_id from page where page_namespace=4 and page_title="Community_response_to_the_Wikimedia_Foundation's... | {"runningtime": "760.82", "resultsets": [{"headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"], "rowcount": 10000}]} | null |
Lexeme pages without wbl-senses page prop | For T199611 and T224844. | USE `wikidatawiki_p`;
SELECT `page_title`
FROM `page`
WHERE `page_namespace` = 146
AND NOT EXISTS (
SELECT *
FROM `page_props`
WHERE `pp_page` = `page_id`
AND `pp_propname` = 'wbl-senses'
); | {"runningtime": "39.57", "resultsets": [{"rowcount": 49, "headers": ["wikitext"]}]} | null |
zh_classicalwiki unreviewed article | null | USE zh_classicalwiki_p;
SELECT page_title, fp_quality
FROM page
LEFT JOIN flaggedpages ON page_id = fp_page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND fp_reviewed = 0
ORDER BY page_title ASC | {"runningtime": "0.25", "resultsets": [{"rowcount": 1, "headers": ["lang", "timestamp", "count"]}]} | null |
zh_classicalwiki not FR article | null | USE zh_classicalwiki_p;
SELECT page_id, page_title
FROM page
LEFT JOIN flaggedpages ON page_id = fp_page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND fp_page_id IS NULL
ORDER BY page_title ASC | {"runningtime": "562.76", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Huggle users by activity | Thanks to Reedy for his kind help :) | USE enwiki_p;
SELECT COUNT(x.actor_name), x.actor_name FROM (
SELECT rev_timestamp, actor_name FROM change_tag
LEFT JOIN revision ON change_tag.ct_rev_id = revision.rev_id
LEFT JOIN actor ON revision.rev_actor = actor.actor_id
WHERE ct_tag_id = 7 AND rev_timestamp BETWEEN '20190101000001' AND '201902010... | {"runningtime": "603.76", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Huggle edits between two timestamps | Thanks to Reedy for his kind help :) | USE enwiki_p;
SELECT rev_timestamp, actor_name FROM change_tag
LEFT JOIN revision ON change_tag.ct_rev_id = revision.rev_id
LEFT JOIN actor ON revision.rev_actor = actor.actor_id
WHERE ct_tag_id = 7 AND rev_timestamp BETWEEN '20190101000001' AND '20190201000001'
LIMIT 100; | {"runningtime": "0.20", "resultsets": [{"rowcount": 37, "headers": ["term_full_entity_id", "term_type", "term_text"]}]} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"runningtime": "21.34", "resultsets": [{"rowcount": 24, "headers": ["page_title", "max_timestamp"]}]} | null |
Overall ratio of declared genders | For [[w:User talk:Cryptic#Curious about a stat]] circa 12 Jun 2019. | SELECT up_value, COUNT(*)
FROM user_properties
WHERE up_property='gender'
GROUP BY up_value; | {"runningtime": "2.96", "resultsets": [{"rowcount": 6, "headers": ["page_title", "max_timestamp"]}]} | null |
تقدم نمو مقالة | null | use arwiki_p;
SELECT /*SLOW OK */ CONCAT('{{مستخدم:FShbib/قوالب/تقدم نمو مقالة|',page_title,'|'), CONCAT('',rev_len,'}}')
FROM revision
INNER JOIN page ON rev_page = page_id
WHERE page_namespace = 0
AND rev_user_text like ucase ("FShbib") collate utf8_general_ci
#AND rev_timestamp BETWEEN "20190501000000" AND "... | {"runningtime": "8.20", "resultsets": [{"rowcount": 283, "headers": ["term_full_entity_id", "term_text"]}]} | null |
Rotlink-Begriffsklärungen | null | use dewiki_p;
SELECT p1.page_title AS "Artikel", tl_title as "Baustein", pl_title AS "BKL auf …"
FROM templatelinks, page AS p1, pagelinks LEFT JOIN page AS p2 ON p2.page_title = pl_title
AND p2.page_namespace = pl_namespace
WHERE tl_from = p1.page_id
AND tl_from_n... | {"runningtime": "424.37", "resultsets": [{"rowcount": 113747, "headers": ["user_id", "user_editcount"]}]} | null |
Comparing all and twinkle-based reverts in fawiki | Between June 1 and 14, 2019 | use fawiki_p;
select count(*)
from comment
join revision
on rev_comment_id = comment_id
where rev_timestamp between '20190601' and '20190614'
and comment_text like '%خنثیسازی%'
union
select count(*)
from comment
join revision
on rev_comment_id = comment_id
where rev_timestamp between '20190601' and '20190614'
and comm... | {"runningtime": "15.52", "resultsets": [{"rowcount": 59, "headers": ["page_title"]}]} | null |
Comparing all and twinkle-based reverts in fawiki | Between June 1 and 14, 2019 | use fawiki_p;
select count(*)
from comment
join revision
on rev_comment_id = comment_id
where rev_timestamp between '20190601' and '20190614'
and comment_text like '%خنثیسازی%'
union
select count(*)
from comment
join revision
on rev_comment_id = comment_id
where rev_timestamp between '20190601' and '20190614'
and comm... | {"runningtime": "849.90", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"runningtime": "806.67", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Number of lexeme pages with/without wbl-senses page prop | For T199611 and T224844. | USE `wikidatawiki_p`;
SELECT
`pp_page` IS NOT NULL AS `has_wbl_senses`,
COUNT(*) AS `count`
FROM `page`
LEFT JOIN `page_props`
ON `pp_page` = `page_id`
AND `pp_propname` = 'wbl-senses'
WHERE `page_namespace` = 146
AND NOT `page_is_redirect`
GROUP BY `has_wbl_senses`; | {"runningtime": "20.35", "resultsets": [{"rowcount": 2, "headers": ["gt_lat", "gt_lon", "gt_page_id", "gt_name", "title", "gt_country", "gt_region"]}, {"rowcount": 22, "headers": ["gt_lat", "gt_lon", "gt_primary", "gt_page_id", "gt_name", "title", "gt_country", "gt_region"]}]} | null |
Lexeme pages without wbl-senses page prop | For T199611 and T224844. | USE `wikidatawiki_p`;
SELECT `page_title`
FROM `page`
WHERE `page_namespace` = 146
AND NOT `page_is_redirect`
AND NOT EXISTS (
SELECT *
FROM `page_props`
WHERE `pp_page` = `page_id`
AND `pp_propname` = 'wbl-senses'
); | {"runningtime": "0.19", "resultsets": [{"rowcount": 1, "headers": ["rev_timestamp"]}]} | null |
Users creating multiple accounts in the past day | null | SELECT actor_name, COUNT(log_id) AS created
FROM logging_logindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'newusers'
AND log_timestamp > DATE_SUB(NOW(), INTERVAL 1 DAY)
AND NOT EXISTS (
SELECT 1 FROM user_groups
WHERE actor_user = ug_user
AND ug_group IN ('sysop', 'accountc... | {"runningtime": "573.65", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
بوابة من قوالب التصفح | null | use arwiki_p;
select page_title, pl_title
from page
inner join categorylinks
on cl_from = page_id
inner join pagelinks
on pl_from = page_id
where cl_to = "مقالات_بحاجة_لشريط_بوابات"
and page_namespace = 0
and page_is_redirect =0
and pl_from_namespace = 0
and pl_namespace = 100; | {"runningtime": "0.14", "resultsets": [{"rowcount": 14, "headers": ["Creation year", "Requests created"]}]} | null |
Test | null | -- it is supposed to be counter of all participants from WLM MMXII - MMXV in Ukraine.
-- Number should count unique users and not just sum up the nums for all 4 cats
SELECT rev_actor
FROM ukwiki_p.revision
WHERE rev_parent_id = 1
AND rev_page IN(
SELECT cl_from
FROM ukwiki_p.categorylinks
WHERE cl_to IN (
"Жу... | {"runningtime": "551.44", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Ruwiki most transcluded templates without TemplateData | null | USE ruwiki_p;
SELECT *
FROM (
SELECT
tl_title,
COUNT(tl_from) AS cnt
FROM templatelinks
WHERE tl_namespace = 10
GROUP BY tl_title
ORDER BY cnt desc
LIMIT 1000
) t
INNER JOIN page
ON page_namespace = 10
AND page_title = tl_title
LEFT JOIN page_props
ON pp_page = page_id
AND pp_propname = "templatedata"
WHE... | {"runningtime": "1.64", "resultsets": [{"rowcount": 307, "headers": ["user_name", "user_editcount", "user_registration", "Last edit"]}]} | null |
Test | null | use nlwiki_p;
select COUNT(*) from `redirect` WHERE `rd_namespace`=0 | {"runningtime": "607.79", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
WLE-IT participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Italy",
... | {"runningtime": "1.16", "resultsets": [{"rowcount": 13, "headers": ["Creation year", "Requests created", "Closed template added by others", "Closed template added by me", "Categorized by me", "user_name"]}]} | null |
footballer | null | SELECT page.page_title FROM page INNER JOIN categorylinks ON categorylinks.cl_from = page.page_id WHERE categorylinks.cl_to = "Biography_articles_without_listas_parameter" AND page.page_title LIKE "%Young%" | {"runningtime": "10.73", "resultsets": [{"rowcount": 21, "headers": ["page_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "21.23", "resultsets": [{"rowcount": 141, "headers": ["page_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "18.86", "resultsets": [{"rowcount": 95, "headers": ["page_title"]}]} | null |
Unpatrolled redirects | On enwiki, from mainspace to mainspace | SELECT
redirect.rd_from AS 'Source page_id',
page.page_title AS 'Source page_title',
redirect.rd_title AS 'Target'
FROM
redirect
LEFT JOIN pagetriage_page ON ptrp_page_id = redirect.rd_from
LEFT JOIN page ON page.page_id = redirect.rd_from
WHERE
redirect.rd_namespace = 0
AND pagetriage_page.ptrp_reviewe... | {"runningtime": "8.93", "resultsets": [{"rowcount": 41, "headers": ["page_title"]}]} | null |
Non admin EFMs | null | SELECT user.user_name, user_groups.* FROM user
LEFT JOIN user_groups ON user_id = ug_user
WHERE ug_group = 'abusefilter'
AND user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'sysop') | {"runningtime": "0.45", "resultsets": [{"rowcount": 1, "headers": ["lang", "timestamp", "count"]}]} | null |
Bot reverts | null | SELECT rev_actor, COUNT(*), user.user_name FROM revision_userindex
LEFT JOIN actor ON rev_actor = actor_id
LEFT JOIN user ON actor_user = user_id
WHERE rev_timestamp > 20190101000000
AND rev_id IN (SELECT ct_rev_id FROM change_tag WHERE ct_tag_id = 8)
AND rev_parent_id IN (SELECT rev_id FROM revision WHERE rev_actor IN... | {"runningtime": "16.05", "resultsets": [{"rowcount": 184, "headers": ["page_title"]}]} | null |
Temporary user groups | null | SELECT ug_group, COUNT(*) FROM user_groups
WHERE ug_expiry > 0
GROUP BY ug_group
ORDER BY COUNT(*) DESC | {"runningtime": "615.17", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
WLE-BD participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Banglade... | {"runningtime": "12.61", "resultsets": [{"rowcount": 244, "headers": ["page_title"]}]} | null |
WLE-CL participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Chile",
... | {"runningtime": "11.84", "resultsets": [{"rowcount": 11, "headers": ["page_title"]}]} | null |
WLE-GE participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Georgia"... | {"runningtime": "10.55", "resultsets": [{"rowcount": 81, "headers": ["page_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "13.42", "resultsets": [{"rowcount": 316, "headers": ["page_title"]}]} | null |
Radio call sign suffixes | null | USE enwiki_p;
SELECT
page_title,
CASE
WHEN page_is_redirect THEN "(R)"
ELSE ""
END AS R
FROM page
WHERE
page_namespace = 0 AND (
page_title LIKE "%(AM)"
OR page_title LIKE "%(FM)"
OR page_title LIKE "%(TV)"
OR page_title LIKE "%(DT)"
OR page_title LIKE "%(LP)"
OR page_title LIKE "%(CA)"
O... | {"runningtime": "1.50", "resultsets": [{"rowcount": 306, "headers": ["comment_id", "comment_hash", "comment_text", "comment_data"]}]} | null |
STEM Girls | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', rev_actor, '|', rev_actor, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as t... | {"runningtime": "104.07", "resultsets": [{"rowcount": 56, "headers": ["page_title"]}]} | null |
STEM Girls | List of articles created for STEM Girls context (WMUA), with the user who created them. | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as... | {"runningtime": "7.38", "resultsets": [{"rowcount": 38, "headers": ["touchlist"]}]} | null |
Hewiki fair use unused pictures 1 | null | use hewiki_p; select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title from page as p1 join image on exists
(select * from categorylinks as cl1 where cl_from = page_id and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן" or exists (select * from page as
p2 where p2.page_namespace = 14 and p2.pag... | {"connection_id": 215225226} | null |
ContentTranslation cleanup edits | List edits made by Framabot (Framawiki's bot) against CX errors
Available edit types:
"-espace superflu": unnecessary space
-"{{références}}": replace substed reference tags
-"div inutile dans une ref": unnecessary <div> tag in reference
-"cite dans une référence": unnecessary <cite> tag in reference
-"catégorie non t... | use frwiki_p;
select page_title as title, replace(comment_text, 'Bot: nettoyage traduction: ', '') as comment, date(rev_timestamp) as date, rev_parent_id
from revision_userindex
INNER JOIN comment ON rev_comment_id = comment_id
INNER JOIN page ON rev_page = page_id
INNER JOIN actor ON rev_actor = actor_id
where ... | {"runningtime": "0.17", "resultsets": [{"rowcount": 1, "headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_user", "rev_user_text", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format", "user_id", "user_name",... | null |
Property changes per day | Number of property changes per day over the last month in Wikidata. | USE `wikidatawiki_p`;
SELECT
SUBSTR(`rc_timestamp`, 1, 8) AS `day`,
COUNT(*) AS `count`
FROM `recentchanges`
WHERE `rc_namespace` = 120
GROUP BY `day`
ORDER BY `day` DESC; | {"runningtime": "980.66", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
تحويلات يونيكود بحاجة لإضافة قالب تحويلة رموز يونيكود | null | use enwiki_p;
select p.page_title from categorylinks
inner join page p
on p.page_id = cl_from
where p.page_namespace = 0
and cl_to = "Redirects_from_Unicode_characters"
and p.page_is_redirect = 1
and p.page_title in (select arwiki_p.page.page_title from arwiki_p.page where arwiki_p.page.page_namespace = 0
... | {"connection_id": 226683903} | null |
WLE-IT participants 2014-2018 not active in 2019 | WLE-UA Photo Competition participants 2013-2017 not active in 2018 | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|commons.wikimedia.org}}") as line
FROM revision r_prev
join categorylinks on rev_page = cl_from
join actor on rev_actor = actor_id and actor_user is not null
WHERE rev_parent_id = 0
and cl_to IN (
"Images_from_Wiki_Loves_Earth_2014_in_Italy",
... | {"connection_id": 226854924} | null |
Wikiquote Edit-athon in Côte d'Ivoire (2019) | null | SET @participants = ("Yasield,Tways2017,Abiba Pauline,Kod_B,Peny99,Petrus yh,Aya.ndja,Koffi.noel,Lamagniguitoure,Aristidek5maya,Kod B,Petrus yh");
SELECT a.actor_name AS Contributors,
COUNT(p.page_title) AS Edits,
COUNT(DISTINCT p.page_title) AS Articles
FROM
# get edits by users
frwikiquote_p.revision_useri... | {"connection_id": 218185533} | null |
RoySmith's non-draft subpages | Page titles starting with 'User:RoySmith/' but not with 'User:RoySmith/drafts/'. For [[w:WP:VPT#Grep tool?]] circa 18 June 2019. | SELECT CONCAT('[[User:', page_title, ']]')
FROM page
WHERE page_namespace = 2 -- User:
AND page_title LIKE 'RoySmith/%'
AND page_title NOT LIKE 'RoySmith/drafts/%'; | {"connection_id": 218380759} | null |
Sample revisions from old and new pages | null | SELECT * FROM revision WHERE rev_id = (SELECT CEIL(RAND() * (SELECT MAX(rev_id) FROM revision)) AS random_id);
| {"runningtime": "39.77", "resultsets": [{"rowcount": 10064, "headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page... | null |
Translators at meta with language, number of translations | For a given prefix of translatable pages, take all translators for the latest versions of translation units (otherwise someone fixing their own typos would look a prolific translator) and order them by language and translation volume. | use metawiki_p;
SELECT
user_name as user,
substring_index(page_title, '/', -1) AS language,
count(*) AS no_translations,
CONCAT('* {{target | page = User:', user_name, ' | site = meta.wikimedia.org}}') AS url
FROM
page
LEFT JOIN
-- Take only the latest revision of each translation to simplify
revision ON (p... | {"runningtime": "5.12", "resultsets": [{"rowcount": 1, "headers": ["COUNT(*)"]}]} | null |
Translators at meta with language, number of translations | For a given prefix of translatable pages, take all translators for the latest versions of translation units (otherwise someone fixing their own typos would look a prolific translator) and order them by language and translation volume. | use metawiki_p;
SELECT
actor_name as user,
substring_index(page_title, '/', -1) AS language,
count(*) AS no_translations,
CONCAT('* {{target | page = User:', actor_name, ' | site = meta.wikimedia.org}}') AS url
FROM
page
LEFT JOIN
-- Take only the latest revision of each translation to simplify
revision ON ... | {"runningtime": "0.13", "resultsets": [{"rowcount": 15, "headers": ["rev_user_text"]}]} | null |
Test query | null | SELECT page_title, page_restrictions, page_len
FROM page
WHERE page_namespace = 4
AND page_title LIKE "Administrators'_noticeboard/IncidentArchive%" | {"connection_id": 232308401} | null |
Wikidata - given names - en labels for missing te labels | run time > 5 min | # For given names, set missing labels in language "te" 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,
"Lte", # "Lnb" ... | {"runningtime": "0.16", "resultsets": [{"rowcount": 1, "headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_content_model", "page_lang", "img_name", "img_size", "img_width", "i... | null |
Wikidata items that link to tewiki and don't have claims | null | USE wikidatawiki_p;
show tables;
| {"runningtime": "1678.33", "resultsets": [{"rowcount": 10000, "headers": ["rev_id", "rev_page", "rev_user", "rev_user_text", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id"]}]} | null |
Wikidata - given names - worklist for missing sr labels | runtime > 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,
"Lsr", # "Lnb" ... | {"connection_id": 235570482} | null |
La | null | use wikidatawiki_p;
SELECT *
#term_text ,CONCAT('Q', term_entity_id) AS item
from wb_terms
WHERE term_entity_type = 'item' # 'item' not 'property'
and term_type = 'label' # 'label', 'description', 'alias'
and term_language in ('te')
#and term_entity_id IN
and term_text IN
#SELECT epp_entity_id AS itemID... | {"runningtime": "0.50", "resultsets": [{"rowcount": 88, "headers": ["Tables_in_arwiki_p"]}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.