title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת | null | select user_name, count(page_title)
from user join revision_userindex join page join actor
on user_id = actor_user
and rev_page = page_id
and rev_actor = actor_id
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
and rev_deleted = 0
group by user_name
having count(page_title) >= 50
order by count(... | {"resultsets": [{"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 8}, {"headers": ["avg_edits_per_day"], "rowcount": 1}, {"headers": ["edits", "edits_per_day", "actor_name"], "rowcount": 10}, {"headers": ["avg_edits_per_day"], "rowcount": 1}], "runningtime": "0.46"} | hewiki_p |
hewiki active editors | null | select rev_user_text as "משתמש/ת", count(*) as "עריכות ב180 הימים האחרונים", CURRENT_DATE as "נכון ל" from revision where rev_user>0 and not exists(select * from user_groups where ug_user=rev_user and ug_group='bot') and rev_timestamp >CURRENT_DATE - INTERVAL 180 DAY group by rev_user having count(*)>=100 order by cou... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "50.78"} | hewiki_p |
hewiki active editors | null | use hewiki_p;
select count(*) as "עריכות ב180 הימים האחרונים", CURRENT_DATE as "נכון ל" from revision where rev_user>0 and not exists(select * from user_groups where ug_user=rev_user and ug_group='bot') and rev_timestamp >CURRENT_DATE - INTERVAL 180 DAY group by rev_user having count(*)>=100 order by count(*) desc; | {"resultsets": [{"headers": ["page_title"], "rowcount": 100000}], "runningtime": "155.21"} | hewiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | Unpatrolled, 401 5 juni 2022 13:15 (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"], "rowcount": 0}], "runningtime": "33.42"} | nlwiki_p |
Article creation statistics on plwikinews | null | set @start_timestamp := 20220501000000;
#set @end_timestamp := 20220601000000;
select
actor_name,
count(log_id) as creation_count
from logging
inner join page on page_id = log_page
inner join actor on actor_id = log_actor
where
log_type = "create" and
page_namespace = 0 and
log_timestamp >= @start_t... | {"resultsets": [{"headers": ["page_title", "user_name"], "rowcount": 0}], "runningtime": "0.05"} | plwikinews_p |
Number of enwiki articles with page images | Number of enwiki pages with page images | select count(distinct pp_page) as countpager
FROM page_props | {"resultsets": [{"headers": ["page_title", "user_name"], "rowcount": 0}], "runningtime": "0.05"} | enwiki_p |
Categories under only one hidden category (zhwiki_p) | null | WITH hc AS (
-- list of pages under category:隐藏分类
SELECT p.page_id, p.page_title
FROM categorylinks c
LEFT JOIN page p ON (c.cl_from = p.page_id)
WHERE c.cl_to = "隐藏分类"
)
-- list of categories under each page
SELECT hc.page_id, hc.page_title, c.cat_pages, COUNT(*) AS cat_count
FROM hc
LEFT JOIN categorylink... | {"connection_id": 68211779} | zhwiki_p |
Categories who are under hidden categories only (zhwiki_p) | null | /* SELECT p.page_title
FROM page p
INNER JOIN categorylinks cl
ON p.page_id = cl.cl_from
LEFT JOIN (
-- 11k list of hidden categories
SELECT p2.page_title, pp.pp_propname
FROM page_props pp
INNER JOIN page p2 ON (p2.page_id = pp.pp_page)
WHERE pp.pp_propname = 'hiddencat'
) hc
ON cl.cl_to = hc.page_title
... | {"resultsets": [{"headers": ["page_title", "user_name"], "rowcount": 100}], "runningtime": "0.16"} | zhwiki_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", "date_joined"], "rowcount": 100}], "runningtime": "0.17"} | enwiki |
enwiki: G13 drafts | English Wikipedia drafts eligible for speedy deletion under [[WP:G13]] | select concat('[[Draft:', page_title, ']]') Draft,
concat('[[', page_title, ']]') Article
from page p
left join
revision r
on p.page_latest = r.rev_id
where page_namespace = 118
and page_is_redirect = 0
and not exists (select 1 from templatelinks where tl_from = p.page_id and tl_namespace = 10 ... | {"connection_id": 68232449} | enwiki |
1000 recent IP edits in fawiki articles | null | select
rc_this_oldid,
rc_title,
actor_name,
exists (
select *
from change_tag
join change_tag_def
on ct_tag_id = ctd_id
and ctd_name in (
'mw-undo',
'mw-manual-revert',
'mw-reverted'
)
where ct_rc_id = rc_id
) as undid
from recentchanges
join actor
o... | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.35"} | fawiki_p |
T309900 | null | SELECT
afl_wiki,
COUNT(*) AS "Hits"
FROM
abuse_filter_log
WHERE
afl_filter_id = 72
AND afl_timestamp >= 20220301000000
AND afl_timestamp <= 20220601235959
GROUP BY
afl_wiki ASC | {"resultsets": [{"headers": ["page_title"], "rowcount": 2300}], "runningtime": "44.84"} | metawiki_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", "page_touched"], "rowcount": 100}], "runningtime": "0.15"} | enwiki |
recent changes 90 days full set 6/06 | null | USE enwiki_p;
with recent_user_edits as (
select
user.user_id,
user.user_name,
user.user_registration as acct_created,
actor.actor_id,
count(rc_id) as recent_rev_count
from recentchanges
join actor on recentchanges.rc_actor = actor.actor_id
join user on actor.actor_user = user.user_id
where rc_timest... | {"resultsets": [{"headers": ["page_title"], "rowcount": 57112}], "runningtime": "114.14"} | 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": ["actor_name"], "rowcount": 100}], "runningtime": "0.19"} | eswiki |
recent changes page categories 1 wk | null | USE enwiki_p;
with users_edits as (
select rc_title, user.user_id, rc_type, rc_id from recentchanges
join actor on recentchanges.rc_actor = actor.actor_id
join user on actor.actor_user = user.user_id
# where user.user_id = 38427
and rc_timestamp > date_sub(now(), interval 1 DAY)
)
select
rc_title,
user_... | {"resultsets": [{"headers": ["page_title"], "rowcount": 1000}], "runningtime": "1.20"} | enwiki |
Ranking list of user creating new article | 1. [[Wikipedia:月間新記事賞/yyyy年mm月]]からリンクされている記事を抽出
2. 1で抽出した記事の初版作成者を調べる
3. 初版作成者となった回数を数え上げて「新着入り回数」とする
※1 リダイレクトや曖昧さ回避の記事化は正しくカウントできない
※2 3000バイト未満の初版は記事リンク前に「※」を附した。ただし、移動に伴って生じたリダイレクトも「3000バイト未満」として検出されてしまう点は注意されたい。
== 某所で頂いたご意見とその返信 ==
>あとは廉廉廉頭痛頭痛頭痛とか何だあれ(by 564さん)
修正いたしました。
>リダイレクト起こしをリダイレクト作成者の新着にカウントしてたら話にならんわな... | set group_concat_max_len = 100000;
use jawiki_p;
select
actor_name as "利用者名",
count( tpg.page_title ) as "新着入り回数",
group_concat( if( rev_len > 3000, concat( "[[", tpg.page_title, "]]" ), concat( "※[[", tpg.page_title, "]]" ) ) separator ', ' ) as "新着記事一覧"
from pagelinks
inner join page as fpg on pl_from = fpg.page_id... | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 4}], "runningtime": "0.22"} | jawiki_p |
Size of uploads by Fæ | This count based purely on filename and uploader, a handy guide to size of the total size uploads presuming bot accounts are not the actual uploaders for some projects. | USE commonswiki_p;
SELECT COUNT(img_name) AS Count,
ROUND(SUM(img_size/(1<<30))) AS Size_GB
FROM image
JOIN actor_image ON actor_id = img_actor
WHERE actor_name = "1Veertje" or actor_name = "1VeertjeBot"; | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.36"} | commonswiki_p |
Edit count percentile on zhwiki | null | SELECT COUNT(*) FROM user WHERE user_editcount > 309;
SELECT COUNT(*) FROM user; | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.47"} | zhwiki_p |
WP:UAA activity | null | SELECT LEFT( rev_timestamp, 8 ) AS date, count(*)
FROM revision
WHERE rev_page = 11022716
AND rev_timestamp > '20220401000000'
GROUP BY date
ORDER BY date; | {"resultsets": [{"headers": ["\u0c17\u0c4d\u0c30\u0c3e\u0c2e\u0c02_\u0c2a\u0c47\u0c30\u0c41", "\u0c2e\u0c02\u0c21\u0c32\u0c02"], "rowcount": 550}], "runningtime": "0.64"} | enwiki_p |
Number of enwiki articles with page images | Number of enwiki pages with page images | select (distinct a.page_title) as page_nb
FROM (page join redirect on page_id = rd_from) a INNER JOIN
(select distinct pp_page as ids
FROM page_props
WHERE pp_propname='page_image_free' or pp_propname='page_image') b
ON a.page_id = b.ids
WHERE a.page_namespace = 0
LIMIT 1000 | {"connection_id": 89383104} | enwiki_p |
recent changes 90 days full set 6/07 | null | USE enwiki_p;
with recent_user_edits as (
select
user.user_id,
user.user_name,
user.user_registration as acct_created,
actor.actor_id,
count(rc_id) as recent_rev_count
from recentchanges
join actor on recentchanges.rc_actor = actor.actor_id
join user on actor.actor_user = user.user_id
where rc_timest... | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 12}], "runningtime": "5.56"} | enwiki |
Vandalismebestrijding nlwiki | IP-controle: 1058, 7 juni 2022, 22:52 (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": ["pl_from", "pl_title", "cl_to"], "rowcount": 3}], "runningtime": "2.87"} | nlwiki_p |
اردو ویکیپیڈیا صارفین بلحاظ بائٹس (مرکزی نام فضا) | null | SELECT actor_name, SUM(rev_len) as bytes
FROM revision
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON rev_page = page_id
WHERE
rev_parent_id = 0
AND page_namespace = 0
AND page_is_redirect=0
AND rev_deleted=0
GROUP BY actor_id
ORDER BY bytes DESC
LIMIT 100;
SELECT actor_name,
SUM(b.rev_len... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 191}], "runningtime": "29.13"} | urwiki_p |
مردہ شخصیات جو زمرہ بقید حیات میں موجود ہیں | null | use urwiki_p;
select
page.page_title
from page
where page_namespace = 0
and page_id in (select cl_from from categorylinks where cl_to = 'بقید_حیات_شخصیات')
and page_id in (select cl_from from categorylinks where cl_to like 'کی_وفیات_%')
and page_is_redirect = 0
; | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 107}], "runningtime": "20.94"} | urwiki_p |
اردو ویکی صارفین بلحاظ ترامیم | null | USE urwiki_p;
SELECT distinct u.user_name, u.user_editcount
FROM user u
inner join user_groups ug
on ug.ug_user=u.user_id
where ug.ug_group<>'bot'
ORDER BY u.user_editcount desc
LIMIT 100; | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 6}], "runningtime": "127.72"} | urwiki_p |
اردو ویکی صارفین بلحاظ بائٹس | null | USE urwiki_p;
SELECT CONCAT(actor_name) AS user_name, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count, COUNT(rev.rev_id) as edit_count
FROM user
INNER JOIN revision rev ON user.user_id = rev.rev_actor
INNER JOIN actor ON rev.rev_actor = actor.actor_id
INNER JOIN revisi... | {"resultsets": [{"headers": ["page_links_updated", "page_namespace", "page_title"], "rowcount": 0}], "runningtime": "52.89"} | urwiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৯ জানু ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"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", "user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_options", "user_touched", "user_token... | bnwiki |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৯ জানু ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"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... | bnwiki |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৯ জানু ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 100}], "runningtime": "0.16"} | bnwiki |
উইকিপিডিয়ার শীর্ষ সম্পাদকগণ | ১৫-০৫-২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন। | SET @counter:=0;
SELECT
CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং,
CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "... | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 1000}], "runningtime": "1.16"} | bnwiki |
RCPatrol | null | select count(*) as count0 from recentchanges where -- unpatrolled
rc_timestamp > 20220530000000 and rc_timestamp < 20220606000000 and rc_patrolled = 0 and rc_type = 0;
select count(*) as count1 from recentchanges where -- manually
rc_timestamp > 20220530000000 and rc_timestamp < 20220606000000 and rc_patrolled = 1 an... | {"resultsets": [{"headers": ["rev_actor", "rev_timestamp"], "rowcount": 6680}], "runningtime": "6.84"} | zhwiki_p |
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": ["rc_title", "rc_timestamp", "comment_text"], "rowcount": 26}], "runningtime": "0.10"} | eswiki |
Categories named %fairy% | null | select distinct(cl_to) from categorylinks where cl_to like '%fairy%' or cl_to like '%Fairy%' | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 4}], "runningtime": "0.21"} | enwiki |
recent changes 90 days full set 6/08 | null | USE enwiki_p;
with recent_user_edits as (
select
user.user_id,
user.user_name,
user.user_registration as acct_created,
actor.actor_id,
count(rc_id) as recent_rev_count
from recentchanges
join actor on recentchanges.rc_actor = actor.actor_id
join user on actor.actor_user = user.user_id
where rc_timest... | {"resultsets": [{"headers": ["rc_title", "rc_timestamp", "comment_text", "rc_actor"], "rowcount": 0}], "runningtime": "2.44"} | enwiki |
Czech Wikipedia articles edited in the last year | null | SELECT COUNT(*) FROM page JOIN revision ON page_latest = rev_id WHERE page_namespace = 0 AND page_is_redirect = 0 AND rev_timestamp > '20210608231524' | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 31}], "runningtime": "0.46"} | enwiki_p |
Flow pages placed on non-existent users | null | SELECT page_title, page_id, page_touched, page_links_updated, page_latest
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
ORDER BY page_id ASC
;
| {"resultsets": [{"headers": ["Article", "Date", "Edit summary", "Editor"], "rowcount": 129}], "runningtime": "0.23"} | zhwiki_p |
Scrape Wikidata Item IDs from files in Category:Files_using_deprecated_object_photo_template | null | use commonswiki_p;
SELECT concat("M",page_id) AS MID, 'P921',
REPLACE(el_to,'https://reasonator.toolforge.org/test/?q=','') AS QID #, CONCAT("File:",page_title)
FROM page
JOIN externallinks ON page_id=el_from AND el_to LIKE 'https://reasonator.toolforge.org%'
JOIN categorylinks c1 ON page_id = c1.cl_from AND c1.cl_t... | {"resultsets": [{"headers": ["Article", "Date", "Edit summary", "Editor", "Edit deleted", "Minor", "Length"], "rowcount": 129}], "runningtime": "0.25"} | commonswiki_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_namespace", "COUNT(*)"], "rowcount": 0}], "runningtime": "4.81"} | enwiki |
ORES damaging score distribution @ zhwiki | null | SELECT COUNT(*) AS "freq"
FROM ores_classification JOIN revision ON rev_id = oresc_rev
where revision.rev_timestamp >= 20220101000000 AND revision.rev_timestamp < 20220601000000
| {"resultsets": [{"headers": ["page_title"], "rowcount": 124080}], "runningtime": "197.25"} | zhwiki_p |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৯ জানু ২০২২ | SET @ct:=0;
SELECT
CONCAT("{{subst:formatnum:",@ct:=@ct+1,"}}") AS নং,
CONCAT("{{u|",user,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",cnt,"}}") AS মোট_নিবন্ধ
FROM (
SELECT
actor_name AS user,
COUNT(rev_id) AS cnt
FROM actor
JOIN revision
ON rev_actor = actor_id
JOIN page
ON page_id = rev_page
WH... | {"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace", "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": 8}],... | bnwiki |
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 = "Living_people" order by page_title | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.05"} | 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"], "rowcount": 0}], "runningtime": "0.05"} | enwiki |
List of links to Météo France in the French Wikipedia | This query looks at all links to Météo France 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 '%meteofrance.com%' | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "0.06"} | frwiki_p |
database-reports: oldest_active (test) | https://github.com/wikimedia/database-reports/blob/master/reports.py#L249 | SELECT
SQL_SMALL_RESULT CONCAT(
'[[User:', user_name, '|', user_name,
']]'
) AS user_name,
date_format(
user_registration, '%Y-%m-%d %H-%i-%S'
),
user_editcount
FROM
(
SELECT
user_name,
user_registration,
user_editcount
FROM
user
WHERE
user_... | {"resultsets": [{"headers": ["page_title", "log_timestamp"], "rowcount": 200}], "runningtime": "786.99"} | viwiki_p |
database-reports: oldest_active (test) - user_editcount > 0 | https://github.com/wikimedia/database-reports/blob/master/reports.py#L249 | SELECT
SQL_SMALL_RESULT CONCAT(
'[[User:', user_name, '|', user_name,
']]'
) AS user_name,
date_format(
user_registration, '%Y-%m-%d %H-%i-%S'
),
user_editcount
FROM
(
SELECT
user_name,
user_registration,
user_editcount
FROM
user
WHERE
user_... | {"resultsets": [{"headers": ["ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_auto", "ipb_anon_only", "ipb_create_account", "ipb_expiry", "ipb_range_start", "ipb_range_end", "ipb_enable_autoblock", "ipb_deleted", "ipb_block_email", "ipb_by_actor", "ipb_allow_usertalk", "ipb_parent_block_id", ... | viwiki_p |
WLE-IT participants 2014-2021 not active in 2022 | null | 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_Turkey",... | {"resultsets": [{"headers": ["ipb_id", "ipb_address", "ipb_user", "ipb_reason_id", "ipb_timestamp", "ipb_auto", "ipb_anon_only", "ipb_create_account", "ipb_expiry", "ipb_range_start", "ipb_range_end", "ipb_enable_autoblock", "ipb_deleted", "ipb_block_email", "ipb_by_actor", "ipb_allow_usertalk", "ipb_parent_block_id", ... | commonswiki |
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": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 51}], "runningtime": "0.18"} | bnwiki |
database-reports: oldest_active (test) - user_editcount > 0 | https://github.com/wikimedia/database-reports/blob/master/reports.py#L249 | SELECT
CONCAT(
'[[User:', user_name, '|', user_name,
']]'
) AS user_name,
date_format(
user_registration, '%Y-%m-%d %H-%i-%S'
),
user_editcount
FROM
(
SELECT
user_name,
user_registration,
user_editcount
FROM
user
WHERE
user_id IN (
S... | {"resultsets": [{"headers": ["total", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 1}], "runningtime": "19.49"} | viwiki_p |
database-reports: oldest_active (test) - user_editcount > 0 | https://github.com/wikimedia/database-reports/blob/master/reports.py#L249 | SELECT
CONCAT(
'[[User:', user_name, '|', user_name,
']]'
) AS user_name,
date_format(
user_registration, '%Y-%m-%d %H-%i-%S'
),
user_editcount
FROM
(
SELECT
user_name,
user_registration,
user_editcount
FROM
user
WHERE
user_id IN (
S... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept", "decline", "reject", "accept %", "decline %", "reject %"], "rowcount": 49}], "runningtime": "14.56"} | enwiki_p |
topics all pt 1 | null | USE enwiki_p;
select
rc_actor,
rc_id,
rc_type,
cast(rc_timestamp as datetime)
from recentchanges
where rc_type in (0,1,6)
# limit 100000 | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 29}], "runningtime": "0.38"} | enwiki |
first 500k rev | null | USE enwiki_p;
select
rc_actor,
rc_id,
rc_timestamp
from recentchanges
where rc_type in (0,1,6)
order by rc_timestamp DESC
limit 500000
# limit 1000000 | {"resultsets": [{"headers": ["rev_timestamp", "rev_comment_id"], "rowcount": 1}], "runningtime": "0.09"} | enwiki |
WSta கனிச்சாறு1 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 29}], "runningtime": "0.35"} | tawikisource_p |
nl_newsletters | null | select * from nl_newsletters; | {"resultsets": [{"headers": ["pt_title", "pt_timestamp", "comment_text", "user_name"], "rowcount": 100}], "runningtime": "0.19"} | testwiki |
Liczba kont utworzonych na plwiki od 2021-01-01 | Zapytanie wyświetla liczbę kont utworzonych na polskojęzycznej Wikipedii od 1 stycznia 2021 z podziałem na dni (według strefy czasowej UTC). | SELECT SUBSTR(log_timestamp, 1, 8) AS `Data`, COUNT(*) AS `Liczba kont` FROM logging
WHERE log_type = "newusers"
AND log_timestamp >= "20210101000000"
GROUP BY 1
ORDER BY `Data` DESC; | {"resultsets": [{"headers": ["pt_title", "pt_timestamp", "comment_text", "user_name"], "rowcount": 100}], "runningtime": "0.39"} | plwiki_p |
ores_classification | null | SELECT *
FROM ores_classification
LIMIT 10 | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 6}], "runningtime": "0.39"} | zhwiki_p |
ores_model | null | SELECT *
FROM ores_model | {"resultsets": [{"headers": ["log_id"], "rowcount": 100}], "runningtime": "0.24"} | zhwiki_p |
test ORES in RC | null | SELECT rc_id, rc_timestamp, rc_title, oresc_probability, oresc_is_predicted
FROM recentchanges
LEFT JOIN ores_classification ON rc_this_oldid = oresc_rev AND oresc_model = 1
WHERE rc_type = 0
AND rc_patrolled != 2
ORDER BY rc_id DESC
LIMIT 100 | {"resultsets": [{"headers": ["log_title", "CONCAT(\"https://test.wikipedia.org/w/index.php?title=Special:Log&logid=\", log_id)"], "rowcount": 0}], "runningtime": "0.15"} | zhwiki_p |
count ORES threshold in RC | null | SELECT COUNT(*)
FROM recentchanges
LEFT JOIN ores_classification ON rc_this_oldid = oresc_rev AND oresc_model = 1
WHERE rc_type = 0
AND rc_patrolled != 2
;
SELECT COUNT(*)
FROM recentchanges
LEFT JOIN ores_classification AS ores1 ON rc_this_oldid = ores1.oresc_rev AND ores1.oresc_model = 1
LEFT JOIN ores_classificatio... | {"resultsets": [{"headers": ["log_title", "CONCAT(\"https://test.wikipedia.org/w/index.php?title=Special:Log&logid=\", log_id)"], "rowcount": 53}], "runningtime": "0.23"} | zhwiki_p |
ORES test 2022 | null | SELECT COUNT(*)
FROM revision
LEFT JOIN ores_classification AS ores1 ON rev_id = ores1.oresc_rev AND ores1.oresc_model = 1
LEFT JOIN ores_classification AS ores2 ON rev_id = ores2.oresc_rev AND ores2.oresc_model = 2
WHERE revision.rev_timestamp >= 20220101000000
AND revision.rev_timestamp < 20220601000000
AND o... | {"resultsets": [{"headers": ["log_title", "CONCAT(\"https://test.wikipedia.org/w/index.php?title=Special:Log&logid=\", log_id)"], "rowcount": 0}], "runningtime": "0.16"} | zhwiki_p |
comPreview | null | select img_name, img_size, img_timestamp from image
where (img_media_type = "BITMAP" or img_media_type = "DRAWING")
and img_width = 0 and img_height = 0; | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 28}], "runningtime": "0.71"} | commonswiki_p |
Voci del progetto GLAM/Conservatorio Nicolini di Piacenza | null | USE itwiki_p;
SELECT REPLACE(page_title, '_', ' ') AS page_title
FROM page
WHERE page_namespace = 0
AND page_title IN
(
SELECT page_title
FROM page
JOIN categorylinks ON page_id = cl_from
WHERE page_namespace = 1
AND cl_to = 'GLAM/Conservatorio_Nicolini_di_Piacenza'
)
ORDER BY page_title; | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 3}], "runningtime": "6.89"} | itwiki |
grab day of revs | null | USE enwiki_p;
select
rc_actor,
rc_title,
rc_type,
rc_timestamp
from recentchanges
where cast(rc_timestamp as datetime) BETWEEN '2022-06-07T011:27:17' AND '2022-06-08T011:27:17'
and rc_type in (0,1,6) | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp", "log_actor"], "rowcount": 5488}], "runningtime": "6.55"} | enwiki |
উইকিপিডিয়ার শীর্ষ সম্পাদকগণ | ১৫-০৫-২০২২। উপাত্ত ডাউনলোড করতে, উপাত্ত ডাউনলোড থেকে wikitable ক্লিক করুন। | SET @counter:=0;
SELECT
CONCAT("{{subst:formatnum:",@counter:=@counter+1,"}}") AS নং,
CONCAT("{{u|",user_name,"}}") AS ব্যবহারকারী_নাম,
CONCAT("{{subst:formatnum:",user_editcount,"}}") AS সম্পাদনার_সংখ্যা
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "... | {"resultsets": [{"headers": ["log_namespace", "log_title", "comment_text", "log_timestamp", "log_actor"], "rowcount": 2968}], "runningtime": "4.09"} | bnwiki |
MT-1 for CRMD | Following is an SQL query on https://quarry.wmcloud.org/ to get a list of "unique" uploaders to the Wikimedia Commons category: Images from Wiki Loves Earth 2014, who have created their Wikimedia account during the campaign period i.e. May and June 2014. The output includes user_name and their account registration_time... | /* SQL code to get list of unique users and their account registration timestamo who have created their accounts
during the Wiki Loves Earth 2014 campaign period (i.e Beginning of 1 May 2014 to ending of 30 June 2014) and uploaded files to
Wikimedia Commons category:Images from Wiki Loves Earth 2014 */
SELECT DISTINCT... | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 6}], "runningtime": "5.92"} | commonswiki_p |
Strange GIF | null | USE commonswiki_p;
SELECT img_name , img_size, (img_width * img_height) AS px, img_timestamp
FROM image
WHERE img_media_type = 'BITMAP'
AND img_minor_mime = 'gif'
AND img_width * img_height < 100
ORDER BY img_size; | {"resultsets": [{"headers": ["\u0c17\u0c4d\u0c30\u0c3e\u0c2e\u0c02_\u0c2a\u0c47\u0c30\u0c41", "\u0c2e\u0c02\u0c21\u0c32\u0c02"], "rowcount": 0}], "runningtime": "0.05"} | commonswiki_p |
# of articles marked as autopatrolled per month | Notes: "group by" needs to go above "order by". use count(*) not count(day) | SELECT SUBSTRING(ptrl_timestamp, 1, 6) AS month, COUNT(*)
FROM pagetriage_log
JOIN page ON ptrl_page_id = page_id
WHERE ptrl_reviewed = 3
AND page_namespace = 0
AND page_is_redirect = 0
GROUP BY month
ORDER BY ptrl_timestamp DESC | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 26}], "runningtime": "3.08"} | zhwiki |
unpatrolled anonymous edits | null | # 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": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 2284}], "runningtime": "20.61"} | zhwiki_p |
Mobile edit statistics bnwiki | 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 = 'mobile edit')
GROUP BY user
ORDER BY cnt DESC
LIMIT 100000; | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "0.07"} | bnwiki |
kswiki edits November 2020 (mobile/all) | Based on queries #50040 and #50065. | set @mobile_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'mobile edit'
);
select
substring(rev_timestamp, 1, 6) as month,
sum(ct_rev_id is not null) as mobile_revisions,
count(rev_id) as revisions,
concat(
if(
count(rev_id) = 0,
0,
format(
sum(... | {"resultsets": [{"headers": ["page_title"], "rowcount": 56739}], "runningtime": "111.00"} | kswiki_p |
Most thankful | null | SELECT actor_name, COUNT(*)
FROM logging, actor
WHERE log_type="thanks" and log_actor=actor_id
GROUP BY log_actor
ORDER BY COUNT(*) DESC
LIMIT 20; | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 3}], "runningtime": "116.15"} | enwiki_p |
Most thanked | null | SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 20; | {"connection_id": 57199249} | enwiki_p |
unused | null | SELECT *
FROM recentchanges_userindex, actor
WHERE rc_new=1
AND rc_actor=actor_id
AND rc_patrolled=2
AND rc_namespace=0
AND rc_new_len>100
#AND rc_timestamp>"20220601000000"
AND rc_timestamp<"20220601000000"
order by rc_timestamp
limit 10 | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 2286}], "runningtime": "20.01"} | zhwiki_p |
pages and cats | null | select
page_title,
page_id,
categorylinks.cl_to as category_title
from page
left join categorylinks on categorylinks.cl_from = page.page_id
where page_id between 1600000 and 2000000
and page_touched > 20220510112717
order by page_id | {"resultsets": [{"headers": ["pl_title", "counting", "ar_len", "mirada_bytes"], "rowcount": 1750}], "runningtime": "243.79"} | enwiki |
WSta கனிச்சாறு2 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "4.14"} | tawikisource_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_namespace", "COUNT(*)"], "rowcount": 2}], "runningtime": "3.26"} | enwiki_p |
WLE 2022 in Sweden participants | People who have uploaded images during WLE in Sweden. List ready for mass messaging (https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Earth_in_Sweden/Mass_message) | SELECT DISTINCT actor_name
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_2022_in_Sweden"
)
GROUP BY actor_name
ORDER BY actor_name
| {"resultsets": [{"headers": ["count", "oi_name", "oi_archive_name"], "rowcount": 10}], "runningtime": "0.06"} | commonswiki_p |
WSta கனிச்சாறு3 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["Tables_in_meta_p"], "rowcount": 3}], "runningtime": "0.07"} | tawikisource_p |
WSta கனிச்சாறு4 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["dbname", "lang", "name", "family", "url", "size", "slice", "is_closed", "has_echo", "has_flaggedrevs", "has_visualeditor", "has_wikidata", "is_sensitive"], "rowcount": 941}], "runningtime": "0.95"} | tawikisource_p |
WSta கனிச்சாறு5 | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 19}], "runningtime": "4.20"} | tawikisource_p |
WSta அயோத்திதாசர்சிந்தனைகள்3ஞான | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["tl_title"], "rowcount": 80}], "runningtime": "2164.42"} | tawikisource_p |
WSta ஒரு_கவிஞனின்_இதயம்,_வெள்ளி | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 41}], "runningtime": "3.33"} | tawikisource_p |
WSta அறிஞன், வெள்ளி | This Query will provide the list of users who did edit on given book with its all pages. | Use tawikisource_p;
SET @w:=0;
select Concat("[[user:",actor_name,"|",actor_name, "]](", edits,")") as "இந்நூலின் மெய்ப்புப்பணியில் ஈடுபட்டோர்:<br/>" from (SELECT actor_name, count(*) as edits FROM revision join actor ON rev_actor = actor_id#total number of users edited in a book
WHERE rev_page IN (select p... | {"resultsets": [{"headers": ["month", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 19}], "runningtime": "3.38"} | tawikisource_p |
audio files that are videos | null | SELECT img_name,img_size,img_width,img_height,img_media_type,img_major_mime,img_minor_mime,img_metadata
FROM `image`
WHERE ( img_media_type = 'AUDIO' and img_major_mime= 'audio' and img_minor_mime = 'webm'); | {"resultsets": [{"headers": ["pl_from", "pl_title", "cl_to"], "rowcount": 2}], "runningtime": "2.81"} | commonswiki_p |
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": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 4}], "runningtime": "0.51"} | eswiki |
protected pages | null | select page.*, page_restrictions.*, page_props.pp_propname, page_props.pp_value
from page
join page_restrictions on page.page_id=page_restrictions.pr_page
join page_props on page.page_id=page_props.pp_page
where page.page_namespace=0 and
page_restrictions.pr_level='autoconfirmed' and page_restrictions.pr... | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "0.38"} | enwiki |
Inactive talkpages of non-blocked inactive IPs | IP talkpages that have not been edited in the last 5 years, the IP is not currently blocked and there have been no edits from that IP in the last 5 years. Also checks for range blocks | select CONCAT('[[User talk:', page_title, ']]') as user_talk
from page
join revision on rev_id = page_latest and rev_timestamp < '20170504'
join actor on actor_user is null and actor_name = page_title
where page_namespace = 3
and page_title like '123.2%' /* Temporary restriction to make query small enough to terminate ... | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 2}], "runningtime": "70.41"} | enwiki |
enwiki sysops by edit count | null | SELECT user_name, user_editcount
FROM user
INNER JOIN user_groups ON ug_user = user_id
WHERE ug_group = 'sysop'
ORDER BY 2 ASC | {"resultsets": [{"headers": ["year", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 4}], "runningtime": "3.21"} | 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"], "rowcount": 58912}], "runningtime": "100.36"} | enwiki |
Test (IP-patrol nlwiki) | null | # 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": 0}], "runningtime": "0.05"} | nlwiki_p |
Kobi Arad blacklisting | This shows pages, existing and deleted, that match /kob.*arad/i.
This is a bit wider than the actual blacklisted pattern, but was the intent of NinjaRobotPirate's nonworking edit to it on 30 May 2020. The pattern in use doesn't have the false positives at [[User:RickoBoyParadise]] or [[File talk:Kobe_Trophy_Parade.jp... | SET @pat='(?i)kob.*arad';
SELECT CONCAT('[[', CASE page_namespace
WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:'
WHEN 0 THEN '' WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:'
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 29837}], "runningtime": "119.30"} | enwiki_p |
List of links to Libération in fr.wikipedia.org | This query looks at all links to Libération 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 '%liberation.fr/%' | {"resultsets": [{"headers": ["inlinks", "title", "orphans", "link_targets"], "rowcount": 1411}], "runningtime": "6.06"} | frwiki_p |
List of links to Le Monde in fr.wikipedia.org | This query looks at all links to Le Monde 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 '%lemonde.fr/%' | {"resultsets": [{"headers": ["page_title"], "rowcount": 1}], "runningtime": "1.00"} | frwiki_p |
List of links to L'équipe in fr.wikipedia.org | This query looks at all links to L'Équipe 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 '%lequipe.fr/%' | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 1}], "runningtime": "4.01"} | frwiki_p |
List of links to Le Parisien in fr.wikipedia.org | This query looks at all links to Le Parisien 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 '%leparisien.fr/%' | {"resultsets": [{"headers": ["time", "user", "namespace", "page", "comment"], "rowcount": 0}], "runningtime": "0.06"} | frwiki_p |
إعلام | null | USE arwiki_p;
SELECT CONCAT('[[قالب:',page_title,']]') AS "القالب", COUNT(tl_from) AS "عدد الاستخدام", SUM(IF(tl_from_namespace = 0, 1, 0)) AS "نطاق المقالات", page_is_redirect
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE page_namespace = 10
#AND page_title LIKE "تح... | {"resultsets": [{"headers": ["rc_patrolled", "count"], "rowcount": 4}, {"headers": ["user", "unpatrolled"], "rowcount": 50}, {"headers": ["day", "unpatrolled", "manually patrolled", "autopatrolled", "total"], "rowcount": 31}, {"headers": ["rc_namespace", "unpatrolled"], "rowcount": 10}, {"headers": ["rc_namespace", "rc... | arwiki |
إعلام | null | USE arwiki_p;
SELECT CONCAT('[[قالب:',page_title,']]') AS "القالب", COUNT(tl_from) AS "عدد الاستخدام", SUM(IF(tl_from_namespace = 0, 1, 0)) AS "نطاق المقالات", page_is_redirect
FROM page
LEFT JOIN templatelinks ON tl_title = page_title AND tl_namespace = page_namespace
WHERE page_namespace = 10
#AND page_title LIKE "تح... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment_id", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1"], "rowcount": 1}], "runningtime": "1.83"} | arwiki |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"connection_id": 73279009} | enwiki_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": ["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": 3}], "runningtime": "0.06"} | enwiki |
nlwiki Main article redirect category sort | 1395930 = Sjabloon:Navigatie eilanden Kalix-archipel
Categorie:Wikipedia:Hulpcategorie_voor_tijdelijk_gebruik | SELECT
clm.cl_to AS cat, clr.cl_sortkey_prefix AS fsk,
pr.page_namespace AS fns, pr.page_title AS ftitle,
pm.page_namespace AS tns, pm.page_title AS ttitle
FROM page pm, categorylinks clm, redirect, categorylinks clr, page pr, page pc, revision, actor
WHERE pm.page_id=clm.cl_from AND clm.cl_sortkey_prefix=' ... | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 49}], "runningtime": "0.49"} | nlwiki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.