title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Numer of edits in an article by date | This query returns a list of UTC dates and number of edits that happened on those days. | SELECT `date`, COUNT(*) FROM (
SELECT SUBSTR(rev_timestamp, 1, 8) AS `date` FROM revision
WHERE rev_page = 6423
AND rev_timestamp >= '20210101000000'
AND rev_timestamp < '20220430000000'
) AS a
GROUP BY `date`; | {"connection_id": 77622421} | plwiki_p |
Colombianos en Wikipedia en español | null | select rc_title as 'Títiulo página', rc_timestamp as 'Fecha de creación', rc_new_len as 'Tamaño',
actor_name as 'Usuario'
from recentchanges
INNER JOIN actor ON rc_actor = actor_id
INNER JOIN page ON page_title = actor_name and page_namespace = 2
INNER JOIN categorylinks ON page_id = cl_from
WHERE rc_new = 1
AND rc_... | {"resultsets": [{"headers": ["editor", "num_edits"], "rowcount": 28}], "runningtime": "14.13"} | eswiki_p |
Most active misdeleters | null | select
-- (select actor_name from actor_logging where actor_id=log_actor) as "Deleting admin",
comment_text,
count(*) as "count"
from logging_logindex join comment_logging on comment_id=log_comment_id
where log_type="delete" and log_action="delete"
and (comment_text not like "%[[WP:CSD#%"
and comment_text not re... | {"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 4}], "runningtime": "0.05"} | enwiki_p |
Marathi Wikipedia top editors sorted by total number of edits | null | select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
actor
where
rev_timestamp > 20050300000000 and
rev_actor = actor_id
group by
rev_actor
order by
edit_count desc; | {"resultsets": [{"headers": ["min(rev_timestamp)"], "rowcount": 1}], "runningtime": "0.06"} | mrwiki_p |
Most protected pages | 5000 pages in Vietnamese Wikipedia that had been protected the most. | SELECT
log_namespace AS namespace,
log_title AS protected_page,
COUNT(log_title) AS occurrences,
MAX(log_timestamp) AS latest_occurence
FROM logging
WHERE log_type = "protect"
GROUP BY namespace, protected_page
ORDER BY occurrences DESC
LIMIT 50; | {"resultsets": [{"headers": ["min(rev_timestamp)"], "rowcount": 1}], "runningtime": "0.05"} | enwiki_p |
Users with more than 2M edits | null | SELECT COUNT(*) FROM user WHERE user_editcount > 1000000 | {"resultsets": [{"headers": ["min(rev_timestamp)"], "rowcount": 1}], "runningtime": "0.05"} | enwiki_p |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
AND prefix = 'Wp/anp'
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["year", "page_title", "num_editors"], "rowcount": 1000}], "runningtime": "15.78"} | incubatorwiki |
SPI/Brettandelle query | null | SELECT user_name, user_registration, user_editcount, ipb_expiry
FROM user
LEFT JOIN ipblocks ON ipb_user = user_id
WHERE user_registration > 20220315000000
AND user_name LIKE "%KIRK%" | {"resultsets": [{"headers": ["year", "page_title", "act_editors"], "rowcount": 16}], "runningtime": "0.07"} | enwiki_p |
InfoboxExport gadget statistics per user | null | SET @tag = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'InfoboxExport gadget');
SELECT
actor_name,
COUNT(rev_id) as edits_count,
COUNT(DISTINCT rev_page) as pages_count
FROM change_tag
JOIN revision ON ct_rev_id = rev_id
JOIN actor ON rev_actor = actor_id
WHERE ct_tag_id = @tag
GROUP BY rev_actor
ORDE... | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 35}], "runningtime": "3.65"} | wikidatawiki |
InfoboxExport gadget statistics per month | null | SET @tag = (SELECT ctd_id FROM change_tag_def WHERE ctd_name = 'InfoboxExport gadget');
SELECT
FLOOR(rev_timestamp / 100000000) as rev_month,
COUNT(rev_id) as edits_count,
COUNT(DISTINCT rev_page) as pages_count,
COUNT(DISTINCT rev_actor) as actors_count,
COUNT(rev_id) / COUNT(DISTINCT rev_page) as ed... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 198}], "runningtime": "18.32"} | wikidatawiki |
-erroneous- | null | set @usr:="Chaduvari";
SELECT
page_title
FROM
page,revision,actor
WHERE
actor_id=rev_actor and
rev_page=page_id and
page_title not in (select iwl_from from iwlinks) and
page_id not in (select pp_page from page_props where pp_propname="disambiguation") and
page_namespace = 0 and
rev_paren... | {"resultsets": [{"headers": ["page_title", "page_count"], "rowcount": 1000}], "runningtime": "17.68"} | tewiki |
Comment search recent (yd) | null | SET STATEMENT max_statement_time = 90 FOR
SELECT
actor_name,
-- COUNT(*) AS c
rc_this_oldid,
comment_text
FROM
recentchanges_userindex AS recentchanges
INNER JOIN change_tag ON recentchanges.rc_id = change_tag.ct_rc_id
INNER JOIN change_tag_def ON change_tag.ct_tag_id = change_tag_def.ctd_id
INNER JOIN ... | {"resultsets": [{"headers": ["Fr\u00e5n", "Till", "Vem", "N\u00e4r", "Storlek"], "rowcount": 100}], "runningtime": "0.17"} | enwiki |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["page", "category"], "rowcount": 6370}], "runningtime": "7.56"} | eswiki |
5 most edited talk pages on svwiki last 7 days | Main talk namespace edits only | SELECT page_title, COUNT(rc_title) AS edits
FROM
recentchanges
JOIN page ON page_title = rc_title
WHERE
rc_namespace = 1
AND (rc_timestamp >= DATE_ADD(NOW(), INTERVAL -7 DAY) )
GROUP BY page_title
ORDER BY edits DESC
LIMIT 5 | {"resultsets": [{"headers": ["Fr\u00e5n", "Till", "Vem", "N\u00e4r", "Storlek"], "rowcount": 82}], "runningtime": "0.22"} | svwiki_p |
Page links updated in namespace before date | null | SELECT page_title
FROM page
-- WHERE page_links_updated IS NULL AND page_namespace = 4
-- WHERE SUBSTR(page_links_updated, 1,10) < 2022032800 AND page_namespace = 0
-- WHERE SUBSTR(page_links_updated, 1,6) < 202203 AND page_namespace = 2
WHERE SUBSTR(page_links_updated, 1,6) < 202202 AND page_namespace = 3
-- WHERE SUB... | {"resultsets": [{"headers": ["top_collaborator"], "rowcount": 109}], "runningtime": "15.39"} | enwiki |
IP-patrolling nlwiki | Vandalismebestrijding (vandal fighting) IP-patrolling, nlwiki 329x 12:02 (CEST) 25-5-2022 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["user_name", "user_editcount", "recent_editcount"], "rowcount": 126}], "runningtime": "11.63"} | nlwiki_p |
page_links_updated before 202203 (and not NULL) | null | SELECT page_namespace, COUNT(*)
FROM page
WHERE SUBSTR(page_links_updated, 1,6) < 202203
AND page_random between 0.001 and 0.002
GROUP BY page_namespace
ORDER BY page_namespace;
| {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.05"} | enwiki |
Page links updated in namespace before date | null | SELECT page_title
FROM page
-- WHERE page_links_updated IS NULL AND page_namespace = 4
-- WHERE SUBSTR(page_links_updated, 1,10) < 2022032200 AND page_namespace = 0
-- WHERE SUBSTR(page_links_updated, 1,6) < 202002 AND page_namespace = 2
-- WHERE SUBSTR(page_links_updated, 1,6) < 202001 AND page_namespace = 3
WHERE SUB... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 195}], "runningtime": "16.83"} | enwiki |
Bad mediawiki.org revision | null | SELECT * FROM revision WHERE rev_id = 699461;
SELECT * FROM revision WHERE rev_page = 0; | {"resultsets": [{"headers": ["page_title", "rd_title_f", "rd_title_fn"], "rowcount": 269}], "runningtime": "0.38"} | mediawikiwiki_p |
Vandalismebestrijding (vandal fighting) IP-patrolling nlwiki | Vandalismebestrijding, 121 ongecontroleerd, 25 mei 14:40 (CEST) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title", "rd_title_fn"], "rowcount": 269}], "runningtime": "0.39"} | nlwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 75}], "runningtime": "9.61"} | enwiki_p |
Look for certain edits on a certain page | null | SELECT
rev_timestamp,
rev_id
FROM
revision_userindex
JOIN actor
ON rev_actor = actor_id
JOIN page
ON rev_page = page_id
WHERE page_title = "Steward_requests/Permissions"
AND actor_name = "Stang"; | {"resultsets": [{"headers": ["page_id", "title", "edits", "users", "score"], "rowcount": 1000}], "runningtime": "3.92"} | metawiki_p |
Computational biology articles with Spanish language equivalent | null | WITH t AS
(
SELECT
ll_lang, article.page_title AS en_title, ll_title AS es_title
FROM page talk
INNER JOIN page article ON talk.page_title = article.page_title
INNER JOIN categorylinks ON cl_from = talk.page_id
LEFT JOIN langlinks ON ll_from = article.page_id
WHERE
ll_lang = "es" AND
talk.page_namespace ... | {"resultsets": [{"headers": ["gu_id", "gu_name", "gu_enabled", "gu_enabled_method", "gu_home_db", "gu_email", "gu_email_authenticated", "gu_salt", "gu_password", "gu_locked", "gu_hidden", "gu_hidden_level", "gu_registration", "gu_password_reset_key", "gu_password_reset_expiration", "gu_auth_token"], "rowcount": 1}], "r... | enwiki_p |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["page_title", "cl_sortkey_prefix", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.22"} | enwiki |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"resultsets": [{"headers": ["page_title", "cl_sortkey_prefix", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.24"} | enwiki |
Unpatrolled 2-word articles, maybe | Where the second word is lowercase, and there isn't any punctuation or anything else except plain unaccented English letters.
This assumes that pagetriage_page does what I'm guessing it does. Very low confidence.
For [[WP:RAQ#Unreviewed species articles]] circa 26 May 2022. | SELECT page_title
FROM page
JOIN pagetriage_page
ON ptrp_page_id = page_id
WHERE page_namespace = 0
AND page_title RLIKE '^[A-Z][a-z]+_[a-z]+$'
AND ptrp_reviewed = 0; | {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 378}], "runningtime": "5.77"} | enwiki_p |
Most-blocked admins on enwiki | null | SELECT RANK() OVER (ORDER BY blocks DESC) AS rank, user_name, COUNT(log_title) AS blocks
FROM logging
LEFT JOIN user ON user_name = REPLACE(log_title, "_", " ")
INNER JOIN user_groups ON ug_user = user_id
INNER JOIN actor ON actor_user = user_id
WHERE log_type = "block"
AND log_action = "block"
AND log_ac... | {"resultsets": [{"headers": ["'\u0c1c\u0c46\u0c1f\u0c4d\u200c' REGEXP '\u200c[[:>:]]'"], "rowcount": 1}], "runningtime": "0.05"} | enwiki_p |
Most-indeffed admins on enwiki | null | SELECT RANK() OVER (ORDER BY blocks DESC) AS rank, user_name, COUNT(log_title) AS blocks
FROM logging
LEFT JOIN user ON user_name = REPLACE(log_title, "_", " ")
INNER JOIN user_groups ON ug_user = user_id
INNER JOIN actor ON actor_user = user_id
WHERE log_type = "block"
AND log_action = "block"
AND log_ac... | {"resultsets": [{"headers": ["user_name", "Last edit", "user_groups"], "rowcount": 29}], "runningtime": "0.09"} | enwiki_p |
Unpatrolled taxon articles | This assumes that pagetriage_page lists unreviewed pages
For [[WP:RAQ#Unreviewed species articles]] circa 26 May 2022. | SELECT page_title, ptrp_created
FROM page
JOIN pagetriage_page
ON ptrp_page_id = page_id
JOIN categorylinks
ON cl_from = page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND ptrp_reviewed = 0
AND cl_type = 'page'
AND cl_to = "Articles_with_'species'_microformats"
ORDER BY page_title | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 10}], "runningtime": "4.13"} | enwiki_p |
Unpatrolled 2-word articles, not redirects, oldest first | Where the second word is lowercase, and there isn't any punctuation or anything else except plain unaccented English letters.
This assumes that pagetriage_page does what I'm guessing it does. Very low confidence.
For [[WP:RAQ#Unreviewed species articles]] circa 26 May 2022. | SELECT page_title
FROM page
JOIN pagetriage_page ON ptrp_page_id = page_id
WHERE page_namespace = 0
AND page_title RLIKE '^[A-Z][a-z]+_[a-z]+$'
AND ptrp_reviewed = 0
AND page_is_redirect = 0
ORDER BY page_id ASC; | {"resultsets": [{"headers": ["user_name", "d"], "rowcount": 12}], "runningtime": "0.07"} | enwiki_p |
Oversized stub categories 5 pages only | Oversized stub categories: 5 pages | select cat_title Category, ceil(cat_pages/200) Pages, cat_pages Article
from category
where cat_title like '%stubs'
-- and ceil(cat_pages/200) > 5
and ceil(cat_pages/200) = 5
order by 2 desc | {"resultsets": [{"headers": ["C\u00edm", "afl_id", "afl_user_text", "afl_filter_id"], "rowcount": 1058}], "runningtime": "1.73"} | enwiki |
Editors by experience 2-5k | With a little help from [[User talk:Cryptic#A Little help with a query]] circa 7 Feb 2020.
Editors who are extended confirmed, are not new page patrollers or sysops, have not been blocked in the last year, have at least 500 edits in the last 6 months, 50 edits in the last 2 months, created at least 2 non-stub pages, ha... | SELECT user_id, user_name, user_editcount, user_registration
FROM `user`
JOIN actor_user on actor_user=user_id
WHERE user_editcount BETWEEN 2000 AND 5000
AND user_registration < '20190228000000'
AND EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'extendedconfirmed')
AND NOT EXISTS (SELECT ... | {"resultsets": [{"headers": ["C\u00edm", "afl_user_text", "GROUP_CONCAT(DISTINCT actor.actor_name SEPARATOR ', ')"], "rowcount": 70}], "runningtime": "0.79"} | tewiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["C\u00edm", "Szerkeszt\u0151"], "rowcount": 70}], "runningtime": "0.75"} | enwiki_p |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"resultsets": [{"headers": ["page_title", "cl_sortkey_prefix", "COUNT(*)"], "rowcount": 663}], "runningtime": "0.78"} | enwiki |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["pl_from", "pl_title"], "rowcount": 300}], "runningtime": "5.93"} | eswiki |
List all living people | List all pages of living people | select page_title from categorylinks
left join page on (page.page_id = categorylinks.cl_from)
where cl_to = "Possibly_living_people" order by page_title | {"resultsets": [{"headers": ["page_title"], "rowcount": 20294}], "runningtime": "46.95"} | enwiki_p |
WP-people | List all pages of living people | show tables
| {"resultsets": [{"headers": ["count(fpp_page_id)"], "rowcount": 2}], "runningtime": "0.05"} | enwiki_p |
All ckbwiki page titles containing non-Kurdish letters | سەرجەم ئەو پەڕانەی ویکیپیدیای کوردیی ناوەندی لە سەرجەم بۆشاییناوەکان دەگەڕێنێتەوە کە پیتی ناکوردی لە ناونیشانی پەڕەکان دەگرنە خۆ. | USE ckbwiki_p;
SELECT REPLACE (page_title,'_',' ') AS 'Page title',
page_namespace AS Namespace,
page_is_redirect AS 'Redirect?'
FROM page
WHERE page_title RLIKE '(ء|آ|أ|ؤ|إ|ة|ث|ذ|ص|ض|ط|ظ|ك|ه|ى|ي|ﺁ)'
#WHERE page_title RLIKE '(ء|آ|أ|ؤ|إ|ة|ث|ذ|ص|ض|ط|ظ|ك|ه|ى|ي|ﺁ|ـ|)' #With Arabic Tatweel or ZWNJ
#AND page_is... | {"resultsets": [{"headers": ["page_title"], "rowcount": 81}], "runningtime": "8.71"} | ckbwiki_p |
Latest Commons uploads and edits made using Android app (judged by the edit summary) | null | USE commonswiki_p;
SELECT rc_id, rc_timestamp,rc_type,rc_log_type,ct_tag,rc_user_text,rc_namespace,rc_title,rc_params,rc_comment
FROM recentchanges LEFT JOIN change_tag ON ct_rc_id=rc_id
WHERE rc_comment LIKE "%using Android Commons%" OR rc_comment LIKE "%Via Commons Mobile App%"
ORDER BY rc_timestamp ASC
LIMIT 2000; | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 10}], "runningtime": "5.07"} | commonswiki_p |
timestamps for technical village pump on enwiki | null | select rev_timestamp from revision where rev_page=3252662 order by rev_timestamp ASC; | {"resultsets": [{"headers": ["1"], "rowcount": 1}], "runningtime": "0.05"} | enwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 4}], "runningtime": "452.04"} | enwiki_p |
T126229: Flow pages placed on non-existent users | null | SELECT page_title, user_name
FROM page
LEFT JOIN user ON REGEXP_REPLACE(REPLACE(page_title, '_', ' '), '/.*', '') = user_name
WHERE page_namespace = 3
AND page_content_model = 'flow-board'
AND user_id IS NULL
;
| {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 3}, {"headers": ["COUNT(*)"], "rowcount": 1}], "runningtime": "1.10"} | zhwiki_p |
test5 | select * from category
where cat_title = 'Candidates_for_speedy_deletion_as_dependent_on_a_non-existent_page'
limit 100; |
SELECT * FROM page
where 1=1
and page_id = 1952670
limit 10 | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 6545}], "runningtime": "27.05"} | enwiki_p |
test6 | null | select * from revision
left join comment on rev_comment_id = comment_id
where 1=1
and rev_id = 1090135803
and rev_page = 1952670
order by rev_timestamp desc
limit 100 | {"resultsets": [{"headers": ["page_title", "rd_title"], "rowcount": 5978}], "runningtime": "28.43"} | enwiki_p |
ruwiki: Find users with certain characters in the signature | null | select * from user_properties t1
where
t1.up_property = "nickname"
and t1.up_value like "%.%"
limit 50
| {"resultsets": [{"headers": ["page_title"], "rowcount": 50000}], "runningtime": "96.93"} | ruwiki_p |
ruwiki: Find users with certain characters in the signature | null | select * from user_properties t1
where
t1.up_property = "nickname"
and t1.up_value like "%.%"
and "1" = (select up_value from user_properties t2 where t2.up_user = t1.up_user and t2.up_property = "fancysig")
| {"resultsets": [{"headers": ["\u09a8\u0982", "\u09b8\u09a6\u09b8\u09cd\u09af", "\u09b8\u09ae\u09cd\u09aa\u09be\u09a6\u09a8\u09be\u09f0_\u09b8\u0982\u0996\u09cd\u09af\u09be"], "rowcount": 1000}], "runningtime": "1.15"} | ruwiki_p |
page_random distribution check for enwiki | Cf. https://phabricator.wikimedia.org/T208909 | SELECT
FLOOR(page_random*100) / 100 AS bucket, COUNT(*) AS pages
FROM page
WHERE page_namespace = 0
GROUP BY bucket
ORDER BY bucket LIMIT 10000; | {"resultsets": [{"headers": ["iyear", "page_title", "user_name", "Edits"], "rowcount": 4}], "runningtime": "0.32"} | enwiki_p |
Editors per month - akwiki | null | select
substring(rev_timestamp, 1, 6) as month,
count(distinct(rev_actor)) as unique_editors
from
revision
group by
month
order by
month DESC; | {"resultsets": [{"headers": ["iyear", "user_name", "Edits"], "rowcount": 42}], "runningtime": "0.13"} | akwiki |
Editors per month - twwiki | null | select
substring(rev_timestamp, 1, 6) as month,
count(distinct(rev_actor)) as unique_editors
from
revision
group by
month
order by
month DESC; | {"resultsets": [{"headers": ["iyear", "user_name", "Edits"], "rowcount": 21}], "runningtime": "0.11"} | twwiki_p |
Vandalismebestrijding nlwiki (IP-patrolling) | IP-controle nlwiki, 167, 30 mei 2022 10:50 (CEST) | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["iyear", "user_name", "Edits"], "rowcount": 21}], "runningtime": "0.11"} | nlwiki_p |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"resultsets": [{"headers": ["page_title"], "rowcount": 48448}], "runningtime": "132.47"} | enwiki |
terms of Q97819206 | null | SELECT wby_name, wbx_text, wbxl_language
FROM wbt_item_terms
JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
JOIN wbt_type ON wbtl_type_id = wby_id
JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
JOIN wbt_text ON wbxl_text_id = wbx_id
WHERE wbit_item_id = 97819206; | {"resultsets": [{"headers": ["tl_from", "page_title", "page_len", "rev_timestamp"], "rowcount": 1121}], "runningtime": "518.77"} | wikidatawiki_p |
terms of Q90305607 | null | SELECT wby_name, wbx_text, wbxl_language
FROM wbt_item_terms
JOIN wbt_term_in_lang ON wbit_term_in_lang_id = wbtl_id
JOIN wbt_type ON wbtl_type_id = wby_id
JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
JOIN wbt_text ON wbxl_text_id = wbx_id
WHERE wbit_item_id = 90305607; | {"resultsets": [{"headers": ["tl_from", "page_title", "page_len", "rev_timestamp"], "rowcount": 14}], "runningtime": "423.11"} | wikidatawiki_p |
recentchanges_test3 | null | select ac.actor_name,u.user_name,rc.*
from recentchanges rc
inner join revision rv on rc.rc_this_oldid = rv.rev_id
inner join page p on rv.rev_page = p.page_id
left join actor ac on rv.rev_actor = ac.actor_id
left join user u on ac.actor_user = u.user_id
where rc.rc_type in ('0')
and rc.rc_patrolled ='1'
and rc.rc_... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_... | zhwiki |
统计启用$wgUseRCPatrol特定时间内统计巡查标识 | 具体信息参见 Recentchanges 表:
https://www.mediawiki.org/wiki/Manual:Recentchanges_table
字段rc_type代表编辑类型,其中0为页面编辑
字段rc_patrolled代表巡查类型,0 为 未标记(默认),1为 手工标记, 2 为 自动标记(例如有自动自标记权限的) | begin;
select count(rc.rc_id) sum_count,min(rc.rc_timestamp) min_tc_time,max(rc.rc_timestamp) max_tc_time
from recentchanges rc
where rc.rc_type in ('0') and rc.rc_timestamp > '20220522145422' /* T308976 */
;
select rc.rc_patrolled,count(rc.rc_id) patrolled_count
from recentchanges rc
where rc.rc_type in ('0') and... | {"resultsets": [{"headers": ["lu_name"], "rowcount": 100}], "runningtime": "0.15"} | zhwiki |
Wiki_for_school_2021 | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', actor_name, ']]') as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as... | {"resultsets": [{"headers": ["log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_... | ukwiki_p |
recentchanges_test1 | null | begin;
select count(rc.rc_id) sum_count,min(rc.rc_timestamp) min_tc_time
from recentchanges rc
/*inner join revision rv on rc.rc_this_oldid = rv.rev_id
inner join page p on rv.rev_page = p.page_id
left join actor ac on rv.rev_actor = ac.actor_id*/
where rc.rc_type in ('0') /* and rc.rc_timestamp >= '20220401000000'... | {"resultsets": [{"headers": ["project", "count", "no_bots_count", "redirect"], "rowcount": 2477}], "runningtime": "136.66"} | enwiki |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["log_title", "rd_title"], "rowcount": 1000}], "runningtime": "3.10"} | enwiki |
duplicate page_random on enwiki | Cf. https://phabricator.wikimedia.org/T22208 | SELECT page_title AS title, page_random AS rand, COUNT(*) AS dup
FROM page
WHERE page_namespace = 0
GROUP BY rand
HAVING COUNT(*) > 1; | {"resultsets": [{"headers": ["ss_total_edits"], "rowcount": 1}, {"headers": ["SUM(user_editcount)"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_editcount", "user_admin", "user_bot"], "rowcount": 814}], "runningtime": "6.97"} | enwiki_p |
Guwikisource Active User :1-Jan-20 to 30-Mar-22 | Guwikisource Active User :1-Jan-20 to 30-Mar-22 | USE guwikisource_p;
SELECT
CONCAT("# {{target | user =",actor_name,"| site = gu.wikisource.org }}") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount
/*user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE actor_user IS NOT NULL
AND page_namespace IN ('0','104')
... | {"resultsets": [{"headers": ["pages_with_disambig_but_not_redir"], "rowcount": 1}, {"headers": ["user_id", "user_name", "user_articles", "user_latestcreation"], "rowcount": 182}], "runningtime": "143.04"} | guwikisource_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["Edits", "User"], "rowcount": 1}], "runningtime": "7.03"} | enwiki_p |
Italian lemmas without IPA pronunciation | null | select page_title from page
where page_namespace = 0
and page_is_redirect = 0
and length(page_title) = 5
and exists(
select 1 from categorylinks
where cl_from = page_id
and cl_to = 'Italian_lemmas'
limit 1
)
and not exists(
select 1 from categorylinks
where cl_from = page_id
and cl_to = 'Italian_terms_wit... | {"resultsets": [{"headers": ["iyear", "user_name", "new_pages"], "rowcount": 5}], "runningtime": "0.13"} | enwiktionary |
hrwiki Articles without content category | Pages without any categories or with only maintenance categories.
Query breakdown:
1. outer query = a list of article pages that are not nominated for deletion and older than 24 hours
2. hc = a list of maintenance categories, meaning the titles of category pages with the __HIDDENCAT__ or __EXPECTUNUSEDCATEGORY__ prope... | SELECT CONCAT('* [[', page_title, ']]')
-- , rev_timestamp, (SELECT pp_value FROM page_props WHERE pp_page=page_id AND pp_propname='wikibase-item') AS Wikidata
FROM page
-- INNER JOIN (SELECT DISTINCT rc_cur_id FROM recentchanges WHERE rc_type IN (0,1) AND rc_namespace=0) rc ON rc_cur_id=page_id
-- INNER JOIN revisi... | {"resultsets": [{"headers": ["page_title"], "rowcount": 66}], "runningtime": "0.16"} | hrwiki_p |
Italian nouns -IPA, 5 letters | null | select page_title from page
where page_namespace = 0
and page_is_redirect = 0
and length(page_title) = 5
and exists(
select 1 from categorylinks
where cl_from = page_id
and cl_to = 'Italian_nouns'
limit 1
)
and not exists(
select 1 from categorylinks
where cl_from = page_id
and cl_to = 'Italian_terms_with... | {"resultsets": [{"headers": ["template", "counter", "protection"], "rowcount": 100}, {"headers": ["template", "counter", "id"], "rowcount": 100}, {"headers": ["pr_page", "pr_type", "pr_level", "pr_cascade", "pr_expiry", "pr_id"], "rowcount": 0}], "runningtime": "30.76"} | enwiktionary_p |
Files with incorrect suffix | null | SELECT img_major_mime, img_minor_mime, img_name
FROM image
WHERE CONCAT(img_major_mime, "/", img_minor_mime, ".", LOWER(CONVERT(SUBSTRING_INDEX(img_name, '.', -1) USING latin1))) NOT IN (
"image/x-xcf.xcf", "image/x-bmp.bmp", "image/webp.webp", "image/tiff.tiff", "image/tiff.tif", "image/gif.gif", "image/png.png", "im... | {"connection_id": 66985775} | hewiki_p |
[old - broken] Drafts approaching CSD G13 eligibility | null | SELECT CONCAT("Draft:",page_title), page_touched FROM page WHERE page_namespace=118 AND page_is_redirect = FALSE AND page_touched < DATE_SUB(NOW(), INTERVAL 153 DAY) ORDER BY page_touched; | {"resultsets": [{"headers": ["user_name", "user_id"], "rowcount": 100}], "runningtime": "0.15"} | enwiki |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"resultsets": [{"headers": ["user_name", "edits"], "rowcount": 17}], "runningtime": "0.38"} | enwiki |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["user_name", "edits"], "rowcount": 1}], "runningtime": "0.34"} | enwiki |
Articles by lint errors except for Obsolete HTML tags | Mainspace pages with most lint errors except for Obsolete HTML tags | select page_title, count(*) as page_count
from linter
join page on page.page_id = linter.linter_page
group by page.page_id
order by count(*) desc, page_title asc
limit 1000; | {"resultsets": [{"headers": ["page_title", "user_name", "edits"], "rowcount": 627}], "runningtime": "0.97"} | wikidatawiki_p |
গত এক বছরের শীর্ষ সম্পাদক | ১ জুন ২০২১ - ১ জুন ২০২২ পর্যন্ত | SELECT
CONCAT("#") AS number, actor_user,
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS NOT NULL
AND rev_time... | {"connection_id": 86553903} | bnwiki_p |
Vital 5 articles w/o short description | Pages not in [[Category:Articles with short description]] whose talk page is in [[Category:All Wikipedia level-5 vital articles]].
For [[WP:RAQ#Level-5 Vital Articles lacking short descriptions]] circa 1 June 2022. | SELECT main.page_namespace, main.page_title
FROM page AS talk
JOIN categorylinks AS v5
ON v5.cl_from = talk.page_id
AND v5.cl_to = 'All_Wikipedia_level-5_vital_articles'
JOIN page AS main
ON main.page_namespace = talk.page_namespace - 1
AND main.page_title = talk.page_title
LEFT JOIN categorylinks AS sdesc
ON... | {"resultsets": [{"headers": ["page_title"], "rowcount": 43001}], "runningtime": "54.88"} | enwiki_p |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
ORDER BY COUNT(*) DESC; | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 2}], "runningtime": "2.71"} | incubatorwiki |
Vandalismebestrijding nlwiki | IP-controle, 2 juni 2022 - 00:07 (CEST), 153x | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title"], "rowcount": 49}], "runningtime": "0.36"} | nlwiki_p |
Full protected pages with Lint errors | null | select CONCAT('# [['
,case when page_namespace=1 then 'Talk:'
when page_namespace=2 then 'User:'
when page_namespace=3 then 'User_talk:'
when page_namespace=4 then 'Wikipedia:'
when page_namespace=5 then 'Wikipedia_talk:'
... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 0}], "runningtime": "163.35"} | enwiki |
Tidy font link bug on Talk namespace | null | select CONCAT('*[[Talk:', page_title, ']]') as page_title
/* , count(*) as page_count */
/*CONCAT('*[//en.wikipedia.org/w/index.php?title=Talk:', page_title, '&action=edit&lintedit=true Talk:', page_title, ']') as page_title*/
from linter
inner join page on page.page_id = linter.linter_page
where page.page_namespace=... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 2}], "runningtime": "151.12"} | enwiki |
flow_workflow doesn't exist | null | select * from page, flow_workflow where workflow_page_id = page_id and workflow_title_text != page_title; | {"resultsets": [{"headers": ["page_title"], "rowcount": 52063}], "runningtime": "119.06"} | frwiki |
userJoinTouch | null | SELECT user_id, user_name, user_touched, user_registration, user_editcount
FROM user;
| {"resultsets": [{"headers": ["page_title", "iwl_title"], "rowcount": 1787}], "runningtime": "2.15"} | enwiki |
qqqs on meta | null | select CONCAT("[[Translations:",page_title,"]]"),
CONCAT("{{Translations:",page_title,"}}") from metawiki_p.page where metawiki_p.page.page_title like '%/qqq' and metawiki_p.page.page_namespace = 1198 | {"resultsets": [{"headers": ["img_minor_mime", "filecount"], "rowcount": 3}], "runningtime": "271.49"} | metawiki_p |
qqqs on meta empty | null | select CONCAT("[[Translations:",page_title,"]]"),
CONCAT("{{Translations:",page_title,"}}")
from metawiki_p.page
where metawiki_p.page.page_title like '%/qqq'
and metawiki_p.page.page_namespace = 1198
and metawiki_p.page.page_len = 0 | {"resultsets": [{"headers": ["img_name", "img_metadata"], "rowcount": 20}], "runningtime": "249.65"} | metawiki_p |
Categories with most members (hewiki) | null | select cl_to as Category, count(cl_from) as MembersCount from categorylinks
group by cl_to
order by count(*) desc
limit 100; | {"resultsets": [{"headers": ["img_minor_mime", "video_length", "img_name", "img_metadata"], "rowcount": 10}], "runningtime": "0.06"} | hewiki_p |
All pages matching '-ization' postfix | null | SELECT page_id, page_title FROM page
WHERE page_title LIKE '%fication' AND page_is_redirect = 0; | {"resultsets": [{"headers": ["img_minor_mime", "JSON_EXTRACT(img_metadata, '$.data.length')", "JSON_EXTRACT(img_metadata, '$.data.playtime_seconds')", "SUBSTR(REGEXP_SUBSTR(img_metadata, '(s:6:\"length\";d:)[0-9]*\\.?[0-9]*'), 16)", "SUBSTR(REGEXP_SUBSTR(img_metadata, '(s:16:\"playtime_seconds\";d:)[0-9]*\\.?[0-9]*'), ... | enwiki |
Vandalismebestrijding nlwiki (IP-patrolling) | IP-controle, 170x - 12:35 (CEST) 3 juni 2022 | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title"], "rowcount": 2300}], "runningtime": "34.53"} | nlwiki_p |
List of pages referring to Infoclimat | null | USE frwiki_p;
SELECT page_id, page_title, el_to
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND TRIM(LEADING 'www.' FROM SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3),'/',-1)) = 'infoclimat.fr' | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 277}], "runningtime": "1.27"} | frwiki_p |
List of links to infoclimat in fr.wikipedia.org | This query looks at all links to infoclimat.fr in the French wikipedia. | USE frwiki_p;
SELECT page_id, page_title, el_to
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE '%infoclimat.fr/%' | {"resultsets": [{"headers": ["editor", "accepts", "recent_edits"], "rowcount": 1742}], "runningtime": "14.44"} | frwiki_p |
Count of pages referring to Infoclimat | null | USE frwiki_p;
SELECT
COUNT(*),
SUBSTRING_INDEX(SUBSTRING_INDEX(el_to, '/', 3), '.', -2) AS sito
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE '%infoclimat.fr/%'
GROUP BY sito | {"resultsets": [{"headers": ["date", "reviews", "accepts", "declines", "rejects", "accept %", "decline %", "reject %"], "rowcount": 31}], "runningtime": "16.30"} | frwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 25194}], "runningtime": "71.47"} | enwiki_p |
List of links to infoclimat in the French Wikipedia | This query looks at all links to infoclimat.fr in the French wikipedia. | USE frwiki_p;
SELECT page_id, page_title, el_to
FROM externallinks, page
WHERE el_from = page_id
AND page_namespace = 0
AND el_to LIKE '%infoclimat.fr%' | {"resultsets": [{"headers": ["ns", "page_title"], "rowcount": 0}, {"headers": ["fns", "ftitle", "tns", "ttitle", "exists"], "rowcount": 1}], "runningtime": "57.01"} | frwiki_p |
Користувачі >1000 | null | SELECT user_name FROM user
WHERE user_editcount > 1000 | {"resultsets": [{"headers": ["page_title"], "rowcount": 897}], "runningtime": "2.41"} | lbwiki_p |
Talk pages updated since a time | null | SELECT page_namespace, page_title, page_latest
FROM page WHERE page_namespace%2=1 AND page_is_redirect = 0
AND page_latest >= (SELECT MIN(rev_id) FROM revision WHERE rev_timestamp>='20220601')
ORDER BY page_namespace, page_title | {"resultsets": [{"headers": ["page_id", "page_title", "page_restrictions"], "rowcount": 0}], "runningtime": "40.09"} | enwiki_p |
مقالات أنشئت في ال24 ساعة الماضية حسب حجم الصفحة | null | SELECT page_title,page_len
FROM revision
INNER JOIN page ON rev_page = page_id
WHERE rev_parent_id = 0
AND page_is_redirect = 0
AND page_namespace = 0
AND page_title NOT LIKE "%توضيح%"
AND page_id NOT IN (
SELECT tl_from
FROM templatelinks
WHERE tl_title = "وصف_صفحة_توضيح"
... | {"resultsets": [{"headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 174}], "runningtime": "20.72"} | arwiki_p |
Company articles by activity increase | null | SELECT
cl_from,
page_title,
min_timestamp,
max_timestamp,
n_this_month,
n_revs / TIMESTAMPDIFF(MONTH, min_timestamp, max_timestamp) AS avg_per_month,
n_this_month / ((n_revs - n_this_month) / (TIMESTAMPDIFF(MONTH, min_timestamp, max_timestamp) - 1)) AS ratio
FROM (
SELECT
cl_from,
COUNT(*) AS n_revs,
... | {"resultsets": [{"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"], "rowcount": 9}], "runningtime": "0.25"} | enwiki_p |
Vandalismebestrijding (vandal fighting) nlwiki | IP-controle, vandalismebestrijding, 4 juni 2022, 13:00 (CEST) 295 unpatrolled | # anonymous edits totals
SELECT
CASE rc_patrolled
WHEN 0 THEN 'unpatrolled'
WHEN 1 THEN 'manually patrolled'
WHEN 2 THEN 'autopatrolled'
END AS rc_patrolled,
COUNT(*) AS 'count'
FROM recentchanges, actor
WHERE rc_actor=actor_id AND actor_user IS NULL
GROUP BY rc_patrolled
UNION
SELECT 'total... | {"resultsets": [{"headers": ["page_title"], "rowcount": 80000}], "runningtime": "98.49"} | nlwiki_p |
Wiki Loves Africa Unique Participants 2022 | null | SELECT DISTINCT actor_name, rev_actor
FROM commonswiki_p.page p
INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from
INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page
join actor on rev_actor = actor_id and actor_user is not null
WHERE cl.cl_to IN (
"Images_from_Wiki_Loves_Africa_2022_in_t... | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 5}], "runningtime": "0.24"} | commonswiki |
test7 | null | SET @username = 'Askarion';
select 'deleted_image' as type, fa_name as filename, actor_name as user, fa_timestamp as upload_timestamp from filearchive
JOIN actor ON actor_id = fa_actor
where actor_name = @username
union
select 'current_image' as type, img_name, actor_name, img_timestamp from image
JOIN actor ON actor... | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 5}], "runningtime": "0.57"} | enwiki_p |
পরিক্ষক পরিসংখ্যান | পরিক্ষক পরিসংখ্যান | use bnwiki_p;
SELECT
user_name user,
count(*) as review_cnt
FROM
logging
JOIN actor ON log_actor = actor_id
JOIN user ON actor_user = user_id
WHERE
log_type = 'review'
AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i')
#AND log_timestamp > CONCAT( YEAR( DATE_SUB( NOW(), INTERVAL... | {"resultsets": [{"headers": ["page_title"], "rowcount": 31990}], "runningtime": "733.20"} | bnwiki_p |
top rollbacker | null | SELECT actor_name as user,
COUNT(*) as cnt
FROM revision
JOIN change_tag
ON rev_id = ct_rev_id
JOIN actor
ON actor_id = rev_actor
WHERE ct_tag_id =
(SELECT ctd_id FROM change_tag_def
WHERE ctd_name = 'mw-rollback')
GROUP BY user
ORDER BY cnt DESC
LIMIT 100; | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 8}], "runningtime": "4.36"} | bnwiki |
Bad disambiguation page titles (eswiki) | Disambiguation pages with a superfluous " (desambiguación)" suffix (eswiki). | use eswiki_p;
select page_title as main_title
from (page join redirect on page_id = rd_from)
where page_namespace = 0 and rd_title = concat(page_title, '_(desambiguación)');
| {"resultsets": [{"headers": ["actor_name", "timestamp", "page_title"], "rowcount": 10}], "runningtime": "0.10"} | eswiki |
Most pending changes accepts (all time) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review' AND log_action = 'approve'
GROUP BY log_actor
ORDER BY manual_accept_count DESC
LIMIT 1000 | {"connection_id": 44770344} | enwiki |
Most pending changes accepts (last 30 days) | null | SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS rank,
actor_name,
COUNT(log_actor) AS manual_accept_count
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
WHERE log_type = 'review'
AND log_action = 'approve'
AND DATEDIFF(NOW(), log_timestamp) < 30
GROUP BY log_actor
ORDER BY manual_accept... | {"resultsets": [{"headers": ["page_title"], "rowcount": 100000}], "runningtime": "141.82"} | enwiki |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 92074}], "runningtime": "112.82"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.