title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Scrape OTRS from files in Files_with_PermissionOTRS_template_but_without_P6305_SDC_statement | Scrape OTRS without relying on "Category:Files_with_PermissionOTRS_template_but_without_P6305_SDC_statement" | use commonswiki_p;
SELECT concat("M",page_id) AS MID, "P6305",
concat('"',REPLACE(el_to,'https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=',''),'"') AS OTRS,
count(el_to) as num
FROM page
JOIN categorylinks c1 ON page_id=c1.cl_from AND c1.cl_to='Files_with_PermissionTicket_template_bu... | {"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", "actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "0.06"} | commonswiki |
Count fixes in Wikipedia:Correct typos in one click | null | SELECT COUNT(*)
FROM revision and actor
LEFT JOIN comment on rev_comment_id=comment_id
WHERE actor is "Qwerfjkl (bot)"
AND comment_text LIKE "% (2)"; | {"resultsets": [{"headers": ["page_namespace", "page_id", "page_title", "page_is_redirect", "page_len"], "rowcount": 1}], "runningtime": "141.68"} | enwiki_p |
Edits by user and edit summary regex | Edits by [[User:Qwerfjkl (bot)]] whose edit summaries match /removed: \[\[Category:.*\]\]\s*\([2-7]\)/. Only two edits matched with a single space between the close-bracket and open-paren, as requested; the others have a newline immediately after the close-bracket as well.
For [[WP:RAQ#Edits summaries by Qwerfjkl (bo... | SELECT rev_id,
rev_timestamp,
page_namespace,
page_title,
comment_text
FROM revision_userindex
JOIN actor_revision ON actor_id = rev_actor
JOIN comment_revision ON comment_id = rev_comment_id
LEFT JOIN page ON page_id = rev_page
WHERE actor_name = 'Qwerfjkl (bot)'
AND comment_text RLIKE 'r... | {"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", "actor_id", "actor_user", "actor_name"], "rowcount": 26}], "runningtime": "0.09"} | enwiki_p |
Edits by user and edit summary regex | Edits by [[User:Qwerfjkl (bot)]] whose edit summaries match /removed: \[\[Category:.*\]\]\s*\([2-7]\)/. Only two edits matched with a single space between the close-bracket and open-paren, as requested; the others have a newline immediately after the close-bracket as well.
For [[WP:RAQ#Edits summaries by Qwerfjkl (bo... | SELECT rev_id,
,
FROM revision_userindex
JOIN actor_revision ON actor_id = rev_actor
JOIN comment_revision ON comment_id = rev_comment_id
LEFT JOIN page ON page_id = rev_page
WHERE actor_name = 'Qwerfjkl (bot)'
AND comment_text RLIKE 'removed: \\\[\\\[Category:.*\\\]\\\]\\\s*\\\([2-7]\\\)'; | {"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", "actor_id", "actor_user", "actor_name"], "rowcount": 72}], "runningtime": "0.18"} | enwiki_p |
Indef hard siteblocks by Tamzin in May 2022 on enwiki | null | SELECT log_id, log_timestamp, log_title, REGEXP_REPLACE(log_params, '.*nocreate,?(.*?)".*', '\\1') AS flags, comment_text
FROM logging
LEFT JOIN comment on comment_id = log_comment_id
WHERE log_actor = 785255 -- Tamzin
AND log_type = "block"
AND log_action = "block"
AND log_params LIKE "%infinity%nocreate%sit... | {"resultsets": [{"headers": ["rev_id", "rev_comment_id", "rev_page", "user_id", "rev_timestamp_parsed", "rev_timestamp", "rev_parent_id", "comment_text", "comment_data"], "rowcount": 10}], "runningtime": "0.06"} | enwiki_p |
Vandalismebestrijding (IP-patrolling) nlwiki | IP-controle, 1863 openstaande markeringen, 6 juli 2022, 11: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": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 17}], "runningtime": "0.08"} | nlwiki_p |
pages by name | query pages by name
| use hewiki_p;
select p.page_title as title
from page p
where p.page_namespace=0
limit 500000 , 100000; | {"resultsets": [{"headers": ["rank", "actor_name", "manual_accept_count"], "rowcount": 1000}], "runningtime": "86.71"} | hewiki |
Wiki Challenge Afrique Cote d'Ivoire - Fr.WP | null | SET @participants = ("Kahoutoure,Aman ADO,Kod B,Petrus yh,Traorejci,Nicole deba,Élisabeth The lioness Queen,Mouna k,Durand ndri,Tiphabb,Mirevélation,Traorefanta,Douo Tryphene,Grandh2,Mekapeu grace,Charles,Poyet,Djobo Michel,Tchinman,Leader Joël Sebo,Fabrice Yao,Assakan,Iyvan Bazem,Aya,Kkjeanlou,Biko1995");
SET @startDa... | {"resultsets": [{"headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_actor"], "rowcount": 59}], "runningtime": "689.15"} | frwiki_p |
Wiki Challenge Afrique Cote d'Ivoire - En.WP | null | SET @participants = ("Kahoutoure,Aman ADO,Kod B,Petrus yh,Traorejci,Nicole deba,Élisabeth The lioness Queen,Mouna k,Durand ndri,Tiphabb,Mirevélation,Traorefanta,Douo Tryphene,Grandh2,Mekapeu grace,Charles,Poyet,Djobo Michel,Tchinman,Leader Joël Sebo,Fabrice Yao,Assakan,Iyvan Bazem,Aya,Kkjeanlou,Biko1995");
SET @startDa... | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 45}], "runningtime": "119.03"} | enwiki_p |
Authors of good articles | null | select * from categorylinks limit 10; | {"resultsets": [{"headers": ["ar_namespace", "ar_title"], "rowcount": 10}], "runningtime": "0.07"} | ukwiki |
Tracking-Urls | null | SELECT COUNT(DISTINCT page_title) AS "Anzahl Artikel",
COUNT(*) AS "Anzahl Links",
SUM(el_to rlike '[?&]utm_id=') AS "utm_id",
SUM(el_to rlike '[?&]utm_source=') AS "utm_source",
SUM(el_to rlike '[?&]utm_medium=') AS "utm_medium",
SUM(el_to rlike '[?&]utm_campaign=') AS "utm_campaign"... | {"resultsets": [{"headers": ["page_title"], "rowcount": 62}], "runningtime": "14.05"} | dewiki_p |
recent changes 90 days 7/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... | {"connection_id": 3821873} | enwiki |
important articles data - extended2 | null | use hewiki_p;
select page_id as id,
page_title as title,
page_is_redirect as redirect,
page_len as size,
D.last_import_id as last_import_id,
D.last_import_time as last_import_time,
C.created as created,
B.last_names as last_names
from page
left join (SELECT log_page, G... | {"connection_id": 3569516} | hewiki |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["img_name"], "rowcount": 30}], "runningtime": "0.08"} | enwiki_p |
All New Page Reviewer (including null) activity 1 July 2021 up to and including 30 June 2022 (excluding admins) | NPR activity for all reviewers (excluding admins) since 1 July 2021 up to and including 30 June 2022 (last 12 months)
| SELECT t1.reviewer, reviews, `last review` FROM
(
SELECT logtemp.log_user_text AS `reviewer`,
COUNT(logtemp.log_page) AS `reviews`
FROM (
SELECT actor_name AS log_user_text, log_page
FROM logging_userindex
JOIN actor_logging ON actor_id = log_actor
JOIN user_groups ON ug_user = actor_user
WHERE log_tim... | {"connection_id": 6677412} | enwiki_p |
SLOV | null | SELECT page_title
FROM page
WHERE page_namespace = 215 | {"resultsets": [{"headers": ["page_title", "edits"], "rowcount": 2856}], "runningtime": "3.51"} | 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)');
| {"connection_id": 6748530} | eswiki |
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": ["cl_to"], "rowcount": 9696}], "runningtime": "198.83"} | 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 | {"connection_id": 6579850} | enwiki |
Vandalismebestrijding nlwiki | IP-controle, 1605, 8 juli 2022, 15: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": ["tl_title"], "rowcount": 144}], "runningtime": "3533.91"} | nlwiki_p |
T309900 (July 1st, 2022) | null | SELECT
afl_wiki,
COUNT(*) AS "Hits"
FROM
abuse_filter_log
WHERE
afl_filter_id = 72
AND afl_wiki IS NOT NULL
AND afl_timestamp >= 20220301000000
AND afl_timestamp <= 20220630235959
GROUP BY
afl_wiki ASC | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"], "rowcount": 100}], "runningtime": "0.16"} | metawiki_p |
hung query 2 -- full set -- add rc_cur_id | 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,
rc_cur_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
... | {"resultsets": [{"headers": ["pagename", "rdname"], "rowcount": 5}], "runningtime": "506.85"} | enwiki |
hung query 1 | 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": ["1"], "rowcount": 1}], "runningtime": "453.34"} | enwiki |
Most deleted | null | select log_title, deletions_count FROM (
SELECT count(*) as deletions_count, log_title FROM logging
WHERE log_action='delete' AND log_namespace =0
group by log_title
) AS s
WHERE deletions_count > 5
ORDER BY deletions_count DESC
LIMIT 100; | {"resultsets": [{"headers": ["page_title", "page_content_model"], "rowcount": 0}], "runningtime": "290.87"} | ukwiki_p |
IP-controle 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... | {"connection_id": 7785769} | nlwiki_p |
Number of lexemes per user | null | select actor_name, count(*) c
from revision_userindex
join page on rev_page=page_id
join actor_revision on rev_actor=actor_id
JOIN pagelinks ON page.page_id=pagelinks.pl_from
where page_namespace = 146
group by actor_user
order by c desc;
| {"resultsets": [{"headers": ["date", "reviews", "accepts", "declines", "rejects", "accept %", "decline %", "reject %"], "rowcount": 31}], "runningtime": "1214.93"} | wikidatawiki_p |
rev admin status | null | SELECT rev_id, rev_page, rev_actor, rev_timestamp, rev_minor_edit, rev_comment_id, comment.comment_id, comment.comment_text,
user.user_id, user.user_name, user.user_registration, categorylinks.cl_from, categorylinks.cl_to,
category.cat_id, category.cat_title, category.cat_pages
FROM revision
JOIN comment... | {"connection_id": 7830250} | enwiki |
Long term users blocked -- cswiki | null | SELECT
log_id,
log_title,
comment_text,
log_timestamp,
user_registration,
DATEDIFF(log_timestamp, user_registration)
FROM logging
JOIN actor ON actor_name=REPLACE(log_title, '_', ' ')
JOIN user ON user_id=actor_user
JOIN comment ON log_comment_id=comment_id
WHERE
log_type='block'
AND log_acti... | {"resultsets": [{"headers": ["cl_to", "count_cl_to"], "rowcount": 0}], "runningtime": "553.50"} | cswiki_p |
Long term users blocked by myself -- cswiki | null | SELECT
log_id,
log_title,
comment_text,
log_timestamp,
user_registration,
DATEDIFF(log_timestamp, user_registration)
FROM logging
JOIN actor ON actor_name=REPLACE(log_title, '_', ' ')
JOIN user ON user_id=actor_user
JOIN comment ON log_comment_id=comment_id
WHERE
log_type='block'
AND log_acti... | {"resultsets": [{"headers": ["tl_title"], "rowcount": 58}], "runningtime": "2008.31"} | cswiki_p |
Candidates for autoreview group | null | SELECT DISTINCT
u.user_name,
u.user_editcount
FROM
revision_userindex rev
INNER JOIN actor a
ON rev.rev_actor = a.actor_id
INNER JOIN user u
ON a.actor_user = u.user_id
WHERE
rev.rev_timestamp >= (DATE_FORMAT(DATE_ADD(SYSDATE(), INTERVAL -1 DAY), '%Y%m%d')) * 1000000
AND u.user_editcount >... | {"resultsets": [{"headers": ["cl_to", "ns_count", "namespaces"], "rowcount": 2}], "runningtime": "37.05"} | trwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["MIN(ar_rev_id)"], "rowcount": 1}], "runningtime": "286.52"} | enwiki_p |
IP-controle 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": 404}], "runningtime": "0.76"} | nlwiki_p |
WLE-UK participants 2012-2021 not active in 2022 | null | use commonswiki_p;
SELECT CONCAT("# {{#target:User_talk:", actor_name, "|}}") 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_2013_in_Ukraine",
"Images_from_Wik... | {"connection_id": 4806365} | commonswiki |
Pages with prefix, creation date and revision count | null | set @prefix := "Nux/";
set @namespace := 2;
select
page_title,
min(rev_timestamp) as created,
page_is_redirect,
count(rev_id) as rev_count
from page
inner join revision on rev_page = page_id
where
page_title like concat(@prefix, '%') and
page_namespace = @namespace
group by
page_id
order by
page_t... | {"connection_id": 5283257} | plwiki_p |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 56}], "runningtime": "285.95"} | enwiki_p |
Pages with prefix, creation date and revision count | null | set @prefix := "Nux/";
set @namespace := 2;
select
page_title,
STR_TO_DATE(min(rev_timestamp), '%Y%m%d%H%i%S') as created,
STR_TO_DATE(max(rev_timestamp), '%Y%m%d%H%i%S') as modified,
count(rev_id) as rev_count,
page_is_redirect
from page
inner join revision on rev_page = page_id
where
page_title li... | {"connection_id": 47042365} | plwiki_p |
List of links to Arrêt sur images in fr.wikipedia.org | null | 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 '%arretsurimages.net%' | {"resultsets": [{"headers": ["Tables_in_enwiki_p"], "rowcount": 107}], "runningtime": "0.18"} | frwiki_p |
override | null | SELECT pr_id,page_namespace,page_title,page_len,pr_type,pr_level,pr_expiry,pr_cascade,log_timestamp,log_deleted,actor_name,actor_user,
comment_log_comment.comment_text AS `log_comment_text`,comment_log_comment.comment_data AS `log_comment_data`,comment_log_comment.comment_id AS `log_comment_cid`
FROM `page`,`page_restr... | {"resultsets": [{"headers": ["Article", "rev_id", "Date", "Edit summary", "Editor", "Edit deleted", "Minor edit", "Article length after edit"], "rowcount": 34}], "runningtime": "25.17"} | zhwikiquote |
External links to koyumuz.net by article creator | Number of pages in the main namespace with an external link to koyumuz.net, by user with the first edit.
For [[WP:Arbitration/Requests/Case/Conduct in deletion-related editing/Workshop#Lugnuts has mass-created articles and disrupted clean up of them]]. | SELECT COUNT(DISTINCT el_from),
actor_name
FROM externallinks
JOIN page ON page_id = el_from
LEFT JOIN revision ON rev_page = el_from AND rev_parent_id = 0
LEFT JOIN actor_revision ON actor_id = rev_actor
WHERE (el_index LIKE 'http://net.koyumuz%'
OR el_index LIKE 'https://net.koyumuz%')
AND el_index RL... | {"resultsets": [{"headers": ["ar_id", "ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_page_id"], "rowcount": 100}], "runningtime": "0.55"} | enwiki_p |
Vandalismebestrijding nlwiki | IP-controle, 600 open. 12 juli 2022, 22:44 (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": ["CONCAT('P',wbpt_property_id)"], "rowcount": 1000}], "runningtime": "1.13"} | nlwiki_p |
X2 speedy deletions | This is a list of X2 speedy deletions, code shamelessly stolen from Cryptic. | SELECT DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
log_title,
comment_text
FROM logging
JOIN comment_logging ON comment_id = log_comment_id
WHERE log_type = 'delete'
AND log_action = 'delete'
AND log_namespace = 0
AND comment_text RLIKE '\\bA7\\b'
ORDER BY log_id DESC
LIMIT 1000; | {"resultsets": [{"headers": ["CONCAT('# [[',REPLACE(page_title,'_',' '),']]')"], "rowcount": 61}], "runningtime": "145.45"} | enwikipedia |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 10}], "runningtime": "0.06"} | enwiki_p |
Vandalismebestrijding (vandal fighting) IP-controle nlwiki | Open, ca. 250 ! 13 juli 2022, 13:38 (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_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": 0}], "runningtime": "4.36"} | nlwiki_p |
enwiki pages with one category | null | SELECT
page_title,
CONCAT("https://en.wikipedia.org/wiki/", page_title) as page_url
FROM (
SELECT
cl_from,
COUNT(*) as cnt
FROM categorylinks
GROUP BY cl_from
HAVING cnt = 1
) page_list
INNER JOIN page ON page.page_id = page_list.cl_from
WHERE page.page_namespace = 0 | {"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": 0}], "runningtime": "0.05"} | enwiki |
Rollback sur WP-fr | null | SELECT actor_name as user,
COUNT(*) as Nb
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 Nb DESC
LIMIT 1000; | {"resultsets": [{"headers": ["avg(page_len)"], "rowcount": 1}], "runningtime": "0.93"} | frwiki |
Pages w/linter errors by transclusion count | Pages transcluded at least five times, outside of the Template namespace, with at least one linter error.
For [[WP:RAQ#Request for list of pages with 5+ transclusions and Linter errors]] circa 30 June 2022. | SELECT COUNT(*) AS '#/transclusions',
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": 2380}], "runningtime": "49.90"} | enwiki_p |
Oldest enwiki pagetriage records | null | SELECT * FROM pagetriage_page ORDER BY ptrp_reviewed_updated ASC LIMIT 20;
| {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_update... | enwiki |
List of blank enwiki drafts with 1 revision | null | SELECT *
FROM page
WHERE page_namespace = 118
AND page_len = 0
HAVING (SELECT COUNT(*) FROM revision WHERE rev_page = page_id) = 1 | {"resultsets": [{"headers": ["old_ip_talk_page"], "rowcount": 1}], "runningtime": "2.81"} | enwiki |
List of blank enwiki drafts | null | SELECT *, (SELECT COUNT(*) FROM revision WHERE rev_page = page_id) AS num_of_revisions
FROM page
WHERE page_namespace = 118
AND page_len = 0
ORDER BY num_of_revisions ASC | {"resultsets": [{"headers": ["old_ip_talk_page"], "rowcount": 1}], "runningtime": "0.11"} | enwiki |
List of blank enwiki drafts with 1 editor | Shows drafts with exactly one editor, not exactly one revision.
For [[WP:RAQ#A page in the draft namespace that may conform to CSD G7]] circa 14 July 2022. | SELECT *
FROM page
WHERE page_namespace = 118
AND page_len = 0
HAVING (SELECT COUNT(DISTINCT rev_actor) FROM revision WHERE rev_page = page_id) = 1; | {"connection_id": 9912705} | enwiki |
List of blank enwiki drafts with 1 non-bot editor | Shows blank drafts with exactly one editor excluding bots.
For [[WP:RAQ#A page in the draft namespace that may conform to CSD G7]] circa 14 July 2022. | SELECT *
FROM page
WHERE page_namespace = 118
AND page_len = 0
HAVING (SELECT COUNT(DISTINCT rev_actor)
FROM revision
JOIN actor_revision ON actor_id = rev_actor
LEFT JOIN user_groups ON ug_user = actor_user AND ug_group = 'bot'
WHERE rev_page = page_id
AND ug_user IS NULL) <... | {"resultsets": [{"headers": ["CONCAT('[[User talk:', page_title, ']]')"], "rowcount": 20667}], "runningtime": "23.27"} | enwiki |
Sayfaya bağlantılar | Sayfaya bağlantılar (sayfa) | USE trwiki_p;
# Kırmızı bağlantının hangi sayfada olduğunu görmek istiyorsan;
SELECT DISTINCT CONCAT('# [[',p.page_title,']]') AS "Maddeler"
FROM pagelinks pl JOIN page p
ON pl.pl_from = p.page_id
WHERE pl.pl_title = "Yaşam_Ağacı"
AND (p.page_namespace = 0 OR p.page_namespace = 1)
ORDER BY p.page_title;
| {"resultsets": [{"headers": ["rev_timestamp"], "rowcount": 0}], "runningtime": "0.05"} | trwiki_p |
Comments delete log comments | null | # NOTE: adding a filter for nsfw in the comment yields only 5 images
# AND LOWER(comment_text) LIKE '%nsfw%'
SELECT
log_timestamp,
log_title,
comment_text
FROM logging l
INNER JOIN comment c
ON (l.log_comment_id = c.comment_id)
WHERE
log_type = 'delete'
LIMIT 1000 | {"connection_id": 9944677} | commonswiki |
Hewiki active female users | null | select actor_name as name from actor join user_properties
on up_user = actor_user
where up_property = 'gender'
and up_value = 'female'
and exists
(select * from revision_userindex
where rev_actor = actor_id
and rev_timestamp >= 20220614000000)
order by name
| {"resultsets": [{"headers": ["actor_name", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.07"} | hewiki_p |
Comments delete log comments | null | # NOTE: adding a filter for nsfw in the comment yields only 5 images
# AND LOWER(comment_text) LIKE '%nsfw%'
SELECT
log_timestamp,
log_title,
comment_text
FROM logging l
INNER JOIN comment c
ON (l.log_comment_id = c.comment_id)
WHERE
log_type = 'delete'
AND (comment_text LIKE '%WP:RD2%' OR comment_text L... | {"resultsets": [{"headers": ["actor_name", "rev_timestamp"], "rowcount": 1}], "runningtime": "0.06"} | enwiki |
statusedits | null | SELECT rev_id, rev_page, rev_actor, rev_timestamp, rev_minor_edit, rev_comment_id,
user.user_id, user.user_name, user.user_registration
FROM revision
JOIN user
ON user.user_id = rev_actor
| {"connection_id": 11296171} | enwiki |
Climate-change content on enwiki | Get all climate-change-related articles from English Wikipedia based on tagging by WikiProject Climate Change (https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Climate_change) | SELECT
pa_page_id AS page_id,
page_title AS page_title,
pa_class AS quality_class,
pa_importance AS importance_class
FROM page_assessments
INNER JOIN page_assessments_projects
ON (pap_project_id = pa_project_id
AND pap_project_title = 'Environment')
INNER JOIN page
ON (pa_page_id = page_id
AND p... | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "page_id", "page_namespace", "page_title", "page_restrictions", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_update... | enwiki_p |
Oversized stub categories >= 5 pages | Oversized stub categories: 5 pages | select concat('[[:Category:', cat_title, '|', cat_title, ']]') Category, ceil(cat_pages/200) Pages, cat_pages Articles
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": ["log_page"], "rowcount": 3}], "runningtime": "1.40"} | simplewiki_p |
Fiwiki revert ratio | null | -- MariaDB [fiwiki_p]> select ctd_id, ctd_name from change_tag_def where ctd_name IN ('mw-rollback', 'mw-undo', 'mw-manual-revert', 'mw-reverted') ;
-- +--------+------------------+
-- | ctd_id | ctd_name |
-- +--------+------------------+
-- | 84 | mw-manual-revert |
-- | 88 | mw-reverted |
-- | ... | {"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", "ug_user", "ug_group", "ug_expiry", "rev_id", "rev_page", "rev_comment_id", "... | fiwiki |
Fawiki revert ratio | null | -- MariaDB [fawiki_p]> select ctd_id, ctd_name from change_tag_def where ctd_name IN ('mw-rollback', 'mw-undo', 'mw-manual-revert', 'mw-reverted') ;
-- +--------+------------------+
-- | ctd_id | ctd_name |
-- +--------+------------------+
-- | 276 | mw-manual-revert |
-- | 280 | mw-reverted |
-- | ... | {"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", "ug_user", "ug_group", "ug_expiry", "rev_id", "rev_page", "rev_comment_id", "... | fawiki |
יוצרי הערכים בוויקיפדיה העברית | null | select actor_name, count(*) from revision
inner join page on page_id=rev_page
inner join actor on rev_actor=actor_id -- editor/actor who is responsible for first edit
where page_is_redirect=0 -- without redirects
and rev_parent_id=0 -- first edit
and page_namespace=0 -- articles only
group by actor_name
order by cou... | {"resultsets": [{"headers": ["case when count(*) = 0 then true else false end"], "rowcount": 1}], "runningtime": "0.05"} | hewiki_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": ["page_title"], "rowcount": 59067}], "runningtime": "103.55"} | 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": ["log_title", "rd_title"], "rowcount": 247}], "runningtime": "14.60"} | bnwiki |
FM autoreview | (Requested) | use arwiki_p;
select user_name
from user
where user_id in (select ug_user
from user_groups
where ug_group = 'autoreview') AND user_id in (select up_user
from user_properties
where up_property = 'gender' AND up_value = 'female'); | {"resultsets": [{"headers": ["user_name", "user_editcount"], "rowcount": 1000}], "runningtime": "1.98"} | arwiki_p |
FM no-group | (Requested) | use arwiki_p;
select user_name
from user
where user_id not in (select ug_user
from user_groups
where ug_group = 'editor' or ug_group = 'autoreview') AND user_id in (select up_user
from user_properties
where up_property = 'gender' AND up_value = 'female'); | {"resultsets": [{"headers": ["cl_to"], "rowcount": 8820}], "runningtime": "324.36"} | arwiki_p |
WSta கனிச்சாறு7 | 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_title"], "rowcount": 81}], "runningtime": "2.54"} | tawikisource_p |
WSta கனிச்சாறு8 | 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_title"], "rowcount": 81}], "runningtime": "2.27"} | 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": ["tl_title"], "rowcount": 96}], "runningtime": "1439.20"} | 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": ["cat", "pages", "subcats", "files", "total"], "rowcount": 50}], "runningtime": "0.11"} | tawikisource_p |
proofread-DeepaArul-கலைக்களஞ்சியம்1 | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
SET @w:=0;
SELECT distinct page_title as Title, actor_name as user, comment_text as comment
FROM revision
join page ON page_id = rev_page
join comment on comment_id = rev_comment_id
join actor ON rev_actor = actor_id where
(comment_text like "%மெய்ப்புப் பார்க்கப்பட்டவை%" or comment_text like "%Pro... | {"resultsets": [{"headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_actor"], "rowcount": 39}], "runningtime": "115.94"} | tawikisource_p |
NPP stats | Curation tool use by new page patrol | null | {"resultsets": [{"headers": ["user_talk"], "rowcount": 10}], "runningtime": "1.11"} | enwiki_p |
#WPWP edits | null | SELECT actor_name, COUNT(*) as edits, MIN(rc_title) AS example_1, MAX(rc_title) AS example_2, MIN(rc_timestamp) AS start_time
FROM recentchanges
JOIN `comment` ON comment_id = rc_comment_id AND comment_text REGEXP "WikiSejarah" AND comment_text NOT REGEXP "(Undid|Reverted|revision)"
JOIN actor ON actor_id = rc_actor
WH... | {"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", ... | idwiki_p |
Tes WPWP | null | select comment_text, comment_data from comment where comment_text like "%#WikiSejarah%" | {"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", ... | idwiki |
WPWP idwiki | null | SELECT actor_name AS Pengguna, COUNT(*) as edits, comment_text AS 'Ringkasan Suntingan'
FROM actor, comment_revision, revision
JOIN page ON page_id=rev_page
WHERE comment_text REGEXP "WikiSejarah" -- magyar „hashtag”
AND comment_id=rev_comment_id -- JOIN-al kéne inkább, talán bár ezt elvileg könnyű „kitalá... | {"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", ... | idwiki_p |
Query001 | null | SELECT COUNT(actor_name) AS active, SUM(ug_group = "sysop") FROM user_groups
JOIN actor ON actor_user = ug_user AND ug_group = "sysop"
WHERE EXISTS (SELECT rev_id FROM revision_userindex
WHERE actor_id = rev_actor
AND LEFT (rev_timestamp, 8) >= REPLACE (CURDATE() - interval 15 day, '-', ... | {"resultsets": [{"headers": ["user_talk", "rev_timestamp"], "rowcount": 0}], "runningtime": "0.12"} | ruwiki_p |
Fiwiki ip-users revert ratio | null | SELECT
FLOOR(rev_timestamp/100000000) AS yearmonth,
SUM(1) AS total_edits,
SUM(ct_id IS NOT NULL) AS reverted_edits,
(SUM(ct_id IS NOT NULL) / SUM(1)) AS revert_ratio,
SUM(rev_user_text IN ("109.240.130.125", "109.240.228.85", "112.198.166.184", "112.198.169.103", "112.198.169.43", "112.198.169.91... | {"resultsets": [{"headers": ["page_title", "rev_id", "rev_actor", "actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "0.07"} | fiwiki |
Uncategorized templates | The first ten thousand pages in the template namespace without any categories at all.
Excludes redirects, edit notices, and documentation, sandbox, and testcase subpages with standard titles.
See query 66057 to exclude all subpages. | SELECT page_title
FROM page
LEFT JOIN categorylinks ON cl_from = page_id
WHERE page_namespace = 10
AND cl_from IS NULL
AND page_title NOT LIKE '%/doc'
AND page_title NOT LIKE '%/sandbox'
AND page_title NOT LIKE '%/testcases'
AND page_title NOT LIKE 'Editnotices/%'
AND page_is_redirect = 0
LIMIT 10000; | {"resultsets": [{"headers": ["page_title", "rev_id", "rev_actor", "actor_id", "actor_user", "actor_name", "user_id", "user_name", "user_real_name", "user_password", "user_newpassword", "user_email", "user_touched", "user_token", "user_email_authenticated", "user_email_token", "user_email_token_expires", "user_registrat... | enwiki_p |
Uncategorized templates, no subpages | The first ten thousand pages in the template namespace without any categories at all.
Excludes redirects and all pages with a / in the title.
See query 66056 to exclude only documentation, sandbox, and testcase subpages. | SELECT page_title
FROM page
LEFT JOIN categorylinks ON cl_from = page_id
WHERE page_namespace = 10
AND cl_from IS NULL
AND page_title NOT LIKE '%/%'
AND page_is_redirect = 0
LIMIT 10000; | {"resultsets": [{"headers": ["page_title", "rev_id", "rev_actor", "actor_id", "actor_user", "actor_name", "user_editcount", "user_registration"], "rowcount": 1}], "runningtime": "0.06"} | enwiki_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": ["page_title", "rev_id", "rev_actor", "actor_id", "actor_user", "actor_name", "user_editcount", "user_registration"], "rowcount": 100}], "runningtime": "0.29"} | bnwiki |
Northern Sami descriptions | null | SELECT wbt_text.wbx_text as description, count(*) as c
FROM wbt_item_terms
JOIN wbt_term_in_lang ON wbt_item_terms.wbit_term_in_lang_id = wbt_term_in_lang.wbtl_id
JOIN wbt_text_in_lang ON wbt_term_in_lang.wbtl_text_in_lang_id = wbt_text_in_lang.wbxl_id
AND wbt_text_in_lang.wbxl_language = 'se'
JOIN... | {"resultsets": [{"headers": ["page_title", "page_id", "rev_id", "rev_actor", "user_name", "user_editcount", "user_registration"], "rowcount": 0}], "runningtime": "0.05"} | wikidatawiki_p |
Wikidata descriptions (yi) | null | SELECT wbt_text.wbx_text as description, count(*) as c
FROM wbt_item_terms
JOIN wbt_term_in_lang ON wbt_item_terms.wbit_term_in_lang_id = wbt_term_in_lang.wbtl_id
JOIN wbt_text_in_lang ON wbt_term_in_lang.wbtl_text_in_lang_id = wbt_text_in_lang.wbxl_id
AND wbt_text_in_lang.wbxl_language = 'yi'
JOIN... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 0}], "runningtime": "0.04"} | wikidatawiki_p |
Fiwiki users revert ratio | null | SELECT
FLOOR(rev_timestamp/100000000) AS yearmonth,
SUM(1) AS total_edits,
SUM(ct_id IS NOT NULL) AS reverted_edits,
(SUM(ct_id IS NOT NULL) / SUM(1)) AS revert_ratio,
STR_TO_DATE(rev_timestamp, "%Y%m%d%H%i%S") as timestamp,
STR_TO_DATE(user_registration, "%Y%m%d%H%i%S") as timestamp
FROM
... | {"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", ... | fiwiki |
Fiwiki users revert ratio 2 | null | SELECT
FLOOR(rev_timestamp/100000000) AS yearmonth,
SUM(1) AS total_edits,
SUM(ct_id IS NOT NULL) AS reverted_edits,
(SUM(ct_id IS NOT NULL) / SUM(1)) AS revert_ratio,
SUM(DATEDIFF(STR_TO_DATE(rev_timestamp, "%Y%m%d%H%i%S"), STR_TO_DATE(user_registration, "%Y%m%d%H%i%S"))<31) as new_user_edits,
... | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.07"} | fiwiki |
orphaned talks | null | SELECT
page_namespace,
page_id,
page_title,
page_is_redirect,
page_len
... | {"resultsets": [{"headers": ["page_title", "page_id", "rev_id", "rev_actor", "user_name", "user_editcount", "user_registration"], "rowcount": 0}], "runningtime": "0.05"} | enwiki_p |
Wikidata items with svwiki and commonswiki sitelinks not linking to P373 | null | SELECT page_title AS item_id
FROM wb_items_per_site AS ips1
JOIN wb_items_per_site AS ips2
ON ips1.ips_item_id = ips2.ips_item_id
JOIN page
ON page_namespace = 0
AND page_title = CONCAT('Q', ips1.ips_item_id)
LEFT JOIN pagelinks
ON pl_from = page_id
AND pl_namespace = 120 -- Property:
AND pl_title = 'P373' -- Com... | {"resultsets": [{"headers": ["page_title", "page_id", "rev_id", "rev_actor"], "rowcount": 1}], "runningtime": "0.06"} | wikidatawiki_p |
zhwiki: Redirect pages which title contains disambiguation | null | USE zhwiki_p;
SELECT page_id, page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 1
AND page_title LIKE "%(消歧義)%";
SELECT page_id, page_title
FROM page
WHERE page_namespace = 0
AND page_is_redirect = 1
AND page_title LIKE "%(消歧义)%";
# 0/1 main 2/3 user 4/5 wp 6/7 file ... | {"resultsets": [{"headers": ["page_title", "page_id", "rev_id", "rev_actor", "user_name", "user_editcount", "user_registration"], "rowcount": 1}], "runningtime": "0.06"} | zhwiki_p |
Uncategorized templates, no subpages | The first ten thousand pages in the template namespace without any categories at all.
Excludes redirects and all pages with a / in the title.
See query 66056 to exclude only documentation, sandbox, and testcase subpages. | SELECT CONCAT('Template:',page_title)
FROM page
LEFT JOIN categorylinks ON cl_from = page_id
WHERE page_namespace = 10
AND cl_from IS NULL
AND page_title NOT LIKE '%/%'
AND page_is_redirect = 0
ORDER BY 1
LIMIT 10000; | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.09"} | enwiki_p |
List of log types | null | SELECT DISTINCT log_type
FROM logging
WHERE log_timestamp > 20220617000000
ORDER BY log_type ASC | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.07"} | enwiki |
Check if a page is marked as reviewed, by title and namespace | Only works for pages that have an entry in this log table (usually pages less than a year old). If older than one year, assume it is marked as reviewed. | /* By page_title and page_namespace */
SELECT ptrp_reviewed
FROM pagetriage_page
JOIN page ON page_id = ptrp_page_id
/* For page_title, don't forget to use underscores instead of spaces. */
WHERE page_title = 'Živko_Kostadinović'
AND page_namespace = 0 | {"connection_id": 10865343} | enwiki |
Check if a page is marked as reviewed, by page_id | Only works for pages that have an entry in this log table (usually pages less than a year old). If older than one year, assume it is marked as reviewed. | /* By page_id */
SELECT ptrp_reviewed
FROM pagetriage_page
WHERE ptrp_page_id = 71318376 | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.08"} | enwiki |
List of pagetriage metadata tags | Differs from my localhost wiki a tiny bit. | SELECT *
FROM pagetriage_tags
ORDER BY ptrt_tag_id ASC | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.07"} | enwiki |
List of unreferenced pages on enwiki | Differs from my localhost wiki a tiny bit. | SELECT page_namespace, page_title, ptrpt_value
FROM pagetriage_page_tags
JOIN page ON page_id = ptrpt_page_id
WHERE ptrpt_tag_id = 17
AND ptrpt_value = 1
LIMIT 500 | {"resultsets": [{"headers": ["user_talk"], "rowcount": 1}], "runningtime": "0.06"} | enwiki |
Peek at pagetriage_page namespaces | Confirmed that PageTriage on enwiki only tracks pages in mainspace, userspace, and draftspace. | SELECT page_namespace, page_title
FROM pagetriage_page
JOIN page ON ptrp_page_id = page_id
ORDER BY ptrp_page_id DESC
LIMIT 2000; | {"resultsets": [{"headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "actor_id", "actor_user", "actor_name"], "rowcount": 1}], "runningtime": "1.85"} | enwiki |
Peek at logging -> pagetriage-curation -> delete | null | SELECT *
FROM logging
WHERE log_type = 'pagetriage-curation'
AND log_action = 'delete'
ORDER BY log_id DESC
LIMIT 1000 | {"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", "LOWER(CONVERT(log_title USING utf8mb4))"], "rowcount": 5}], "runningtime": "6.72"} | enwiki |
logging -> pagetriage-curation -> log_action types | null | SELECT log_type, log_action
FROM logging
WHERE log_type = 'pagetriage-curation'
OR log_type = 'pagetriage-deletion'
OR log_type = 'pagetriage-copyvio'
GROUP BY log_type, log_action
LIMIT 10000 | {"resultsets": [{"headers": ["date", "count(*)", "avg(page_len)", "sum(page_len)"], "rowcount": 45}], "runningtime": "0.60"} | enwiki |
Get "Potential copyright violations log" entries | null | SELECT *
FROM logging
WHERE log_type = 'pagetriage-copyvio'
ORDER BY log_id DESC
LIMIT 1000 | {"resultsets": [{"headers": ["page_namespace", "COUNT(*)"], "rowcount": 7}], "runningtime": "0.36"} | enwiki |
List of log_types | null | SELECT log_type
FROM logging
GROUP BY log_type
ORDER BY log_type ASC
LIMIT 1000 | {"resultsets": [{"headers": ["CONCAT('*{{\u03b1\u03c1\u03c7\u03b5\u03af\u03bf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 1}], "runningtime": "0.36"} | enwiki |
Devriye işlemleri | null | USE trwiki_p;
SELECT CONCAT("[[Kullanıcı:",actor_name,"|",actor_name,"]]") AS "Kullanıcı", COUNT(log_action) AS "patrol"
FROM actor
INNER JOIN logging ON (actor.actor_id=logging.log_actor)
WHERE log_timestamp BETWEEN 20220101000000 AND 20220719000000
AND log_action = "patrol"
GROUP BY actor_name
ORDER BY COUNT(*) DESC
... | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 1}], "runningtime": "0.07"} | trwiki_p |
Unreviewed pages in pagetriage_page | null | SELECT
page.page_title,
page.page_namespace,
pagetriage_page.*
FROM
pagetriage_page,
page
WHERE
ptrp_reviewed = 0
AND page_id = ptrp_page_id
AND page_is_redirect = 0
ORDER BY
ptrp_created ASC | {"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", ... | enwiki_p |
Unreviewed pages in pagetriage_page | null | SELECT
page.page_title,
page.page_namespace,
pagetriage_page.*
FROM
pagetriage_page
JOIN page ON page_id = ptrp_page_id
WHERE
ptrp_reviewed = 0
AND page_is_redirect = 0
ORDER BY
ptrp_created ASC | {"resultsets": [{"headers": ["ipb_address"], "rowcount": 1}], "runningtime": "0.06"} | enwiki_p |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.