title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Thanks for 2020 | Most thanked people in 2020
Blame Mz7, SQL, and stwalkerster for this | USE enwiki_p;
SELECT log_title, COUNT(log_id) as "thank_count"
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20190000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"resultsets": [{"rowcount": 32, "headers": ["File name", "Date", "Size", "Uploader's name"]}], "runningtime": "762.78"} | null |
Mainspaces pages a user has deleted, and have been restored | This gives a (very) rough idea of what percentage of deletions performed by an admin end up getting restored.
@deleted is the number of pages a user has deleted.
@restored is the number of those which eventually got restored. The restoration can be done by any user. The only restriction is that the restore has to b... | SET @user = 'Amorymeltzer';
-- SET @user = 'RHaworth';
SET @user_id = (
SELECT actor_id
FROM actor_logging
WHERE actor_name = @user);
SET @deleted = (
SELECT count(distinct(ll.log_title))
FROM logging_userindex lu
JOIN logging_logindex ll ON lu.log_title = ll.log_title
WHERE lu.log_actor = @user_id
AN... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 14}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 8}], "runningtime": "1.16"} | null |
AfD Closings | null | set @user = 'RoySmith';
select actor_name, concat('<a href="http://en.wikipedia.org/wiki/Wikipedia:', page_title, '">', page_title, '</a>'), comment_text
from actor
join revision_actor_temp on actor_id = revactor_actor
join page on page_id = revactor_page
join revision on revactor_rev = rev_id
join comment on ... | {"resultsets": [{"headers": ["page_id", "page_title", "CONCAT(\"File:\", cp.page_title)"], "rowcount": 57}], "runningtime": "108.95"} | null |
AfD Closings (fork) | null | set @user = 'Andrew Davidson';
select concat('http://en.wikipedia.org/wiki/Wikipedia:', page_title)
from actor
join revision_actor_temp on actor_id = revactor_actor
join page on page_id = revactor_page
join revision on revactor_rev = rev_id
join comment on rev_comment_id = comment_id
where actor_name = @user
... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 16}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 5}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 8}], "runningtime": "5.78"} | null |
Pages in some books on bnwikisource by length | This query, as written, only lists those pages marked 'not proofread'. (Tackle the easy stuff first before moving on to longer pages!) | use enwiki;
select current_date;
select *
from page
limit 10 | {"resultsets": [{"headers": ["COUNT(rev_actor)", "rev_comment_id", "page_title", "rev_timestamp"], "rowcount": 65}], "runningtime": "1.72"} | null |
Most active users by bytes on plwiki | null | USE plwiki_p;
SELECT rev.rev_actor, SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS byte_count
FROM revision rev
JOIN revision parent
ON rev.rev_parent_id = parent.rev_id
JOIN page
ON page_id = parent.rev_page
WHERE page_namespace = 0
AND rev.rev_timestamp <= 20191231235959
AND parent.rev_timestamp <... | {"resultsets": [{"rowcount": 19, "headers": ["User", "page_title", "COUNT(rev_id)"]}], "runningtime": "3.55"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestam... | {"resultsets": [{"rowcount": 15, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 8, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "5.25"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestam... | {"resultsets": [{"headers": ["count", "creator", "other groups"], "rowcount": 1}], "runningtime": "8.05"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestam... | {"resultsets": [{"rowcount": 100, "headers": ["creator", "ug_group"]}], "runningtime": "1.22"} | null |
Autoreviewer edits | prepat - was previous revision reviewed?
pat - review flag for current revision
bad = 1 - problems, should not happen | use ruwiki_p;
SELECT (prepat <> "no") AND (pat <> "auto") as bad, B.*
FROM
(SELECT CASE WHEN rev_parent_id = 0 THEN "new"
WHEN f1.fr_timestamp IS NULL THEN "no"
ELSE "yes"
END as prepat,
CASE WHEN f2.fr_flags IS NULL THEN "no"
WHEN f2.fr_flags LIKE "%auto%" THEN "auto"
ELSE "manual... | {"resultsets": [{"rowcount": 14, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 8, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "6.14"} | null |
All of my edits to [[User talk:RHaworth]] and archives | For [[Wikipedia talk:Arbitration/Requests/Case/RHaworth/Evidence#Comment on evidence (Ritchie333)]] | SELECT CONCAT('User_talk:',page_title) AS page,
CONCAT('Special:Diff/',rev_id) AS diff,
DATE_FORMAT(rev_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
actor_name,
comment_text
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON page_id = rev_page
JOIN commen... | {"resultsets": [{"headers": ["pp_value", "page_title", "tl_namespace", "tl_title"], "rowcount": 16131}], "runningtime": "902.11"} | null |
Least used templates on Italian Wikipedia | null | USE itwiki_p;
SELECT CONCAT('https://it.wikipedia.org/wiki/Template:', tl_title), tl_title, transclusions FROM (
SELECT tl_title, count(*) AS transclusions FROM templatelinks
WHERE tl_namespace = 10 and tl_title NOT LIKE '%/man'
GROUP BY tl_title
HAVING transclusions < 3
LIMIT 1000) as T
JOIN page O... | {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 12}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "5.29"} | null |
Most active users by edits in last 12 months (arwiki ) | null | USE arwiki_p;
SELECT
CONCAT("#") AS number, actor_user,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS NOT NULL
AND r... | {"resultsets": [{"headers": ["page_title", "cl_from", "CONCAT(\"Q\", ips_item_id)"], "rowcount": 1}], "runningtime": "0.42"} | null |
Proofread-shobia-உத்தரகாண்டம் | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
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 "%Proofread%")
#... | {"resultsets": [{"headers": ["page_id", "page_title", "cl_to", "CONCAT(\"Q\", interior_ips.ips_item_id)", "CONCAT(\"Q\", parent_ips.ips_item_id)"], "rowcount": 18828}], "runningtime": "74.64"} | null |
Proofread-shobia-உத்தரகாண்டம் | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
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 "%Proofread%")
#... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 0}], "runningtime": "1.22"} | null |
Validated-Ramesh-உத்தரகாண்டம் | Change the actor_name and page_title for your search.
Choose either validated or proofread line and comment another | use tawikisource_p;
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 "%Proofread%")
... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 16}], "runningtime": "1.64"} | null |
A magyar Wikipédia mérete | https://hu.wikipedia.org/wiki/Szerkesztő:Samat/A_magyar_Wikipédia_mérete | USE huwiki_p;
/* Real data */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page_id) AS articles, AVG(page_len) AS 'average (B)'
FROM page
WHERE page_namespace = 0 AND page_is_redirect = 0;
/* With redirects */
SELECT NOW() AS date, SUM(page_len)/(1024*1024) AS 'total (MiB)', COUNT(page... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wpage"], "rowcount": 459}], "runningtime": "67.95"} | null |
Pages that don't have arabic label at Wikidata | null | USE wikidatawiki_p;
SELECT CONCAT("Q",ips_item_id), CONCAT("Lar"), CONCAT('"',ips_site_page,'"')
FROM wb_items_per_site
WHERE ips_site_id='arwiki' AND NOT EXISTS (
SELECT 1 FROM wb_terms WHERE CONCAT("Q", ips_item_id) = term_full_entity_id AND term_type = "label" AND term_language='ar' LIMIT 1
)
LIMIT 2000
; | {"resultsets": [{"rowcount": 12, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 7, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "6.78"} | null |
certain files | null | USE commonswiki_p;
SELECT CONCAT ("File:",page_title,"")
FROM page
WHERE page_namespace = 6
AND page_title NOT LIKE '%.jpg'
AND page_title NOT LIKE '%.JPG'
AND page_title NOT LIKE '%.jpeg'
AND page_title NOT LIKE '%.JPEG'
AND page_title NOT LIKE '%.png'
AND page_title NOT LIKE '%.PNG'
AND page_title NOT LIKE '%.pdf'
AN... | {"resultsets": [{"rowcount": 100, "headers": ["rev_comment_id", "rev_actor", "rev_page", "name", "title", "editcomment"]}], "runningtime": "1.03"} | null |
Naukowiec_infobox testy | null | USE plwiki_p;
SELECT
page_title
FROM page
LEFT JOIN templatelinks
ON tl_from = page_id
WHERE
tl_namespace = 10
AND tl_title = "Naukowiec_infobox"
AND page_namespace = 0
AND page_id NOT IN (
SELECT page_id
FROM page
LEFT JOIN templatelinks
ON tl_from = page_id
WHERE
tl_namespace = 10
AND tl_title = "Ludzie_nauki"
)
... | {"resultsets": [{"rowcount": 1122, "headers": ["diff", "delta", "rev_timestamp", "pagename", "comment_text"]}], "runningtime": "58.34"} | null |
Example of category members | null | SELECT page_title, cl_to
FROM categorylinks
RIGHT JOIN page ON cl_from = page_id
WHERE page_namespace = 2 AND cl_type = 'page' LIMIT 100;
| {"resultsets": [{"headers": ["itwiki_title", "enwiki_title"], "rowcount": 1}], "runningtime": "0.17"} | null |
Mainspaces pages a user has deleted, and have been restored | This gives a (very) rough idea of what percentage of deletions performed by an admin end up getting restored.
@deleted is the number of pages a user has deleted.
@restored is the number of those which eventually got restored. The restoration can be done by any user. The only restriction is that the restore has to b... | SET @user = 'SQL';
-- SET @user = 'RHaworth';
SET @user_id = (
SELECT actor_id
FROM actor_logging
WHERE actor_name = @user);
SET @deleted = (
SELECT count(distinct(ll.log_title))
FROM logging_userindex lu
JOIN logging_logindex ll ON lu.log_title = ll.log_title
WHERE lu.log_actor = @user_id
AND lu.log_... | {"resultsets": [{"rowcount": 5, "headers": ["itwiki_title", "enwiki_title"]}], "runningtime": "0.21"} | null |
Kategorie Geboren | null | USE dewiki_p;
SELECT page_title, GROUP_CONCAT(cl_to SEPARATOR ', ')
FROM page, categorylinks
WHERE page_namespace = 14
AND page_title LIKE "Geboren_im_%_oder_%_Jahrhundert%"
AND cl_from = page_id
GROUP BY page_title
ORDER by page_title | {"resultsets": [{"headers": ["itwiki_title", "enwiki_title"], "rowcount": 3716}], "runningtime": "205.77"} | null |
Redirected categories | null | USE enwikiversity_p;
SELECT category.* FROM page
JOIN category ON cat_title = page_title
WHERE page_is_redirect = 1
AND page_namespace = 14 | {"resultsets": [{"rowcount": 0, "headers": ["rc_id", "rc_timestamp", "rc_actor", "rc_namespace", "rc_title", "rc_comment_id", "rc_minor", "rc_bot", "rc_new", "rc_cur_id", "rc_this_oldid", "rc_last_oldid", "rc_type", "rc_source", "rc_patrolled", "rc_ip", "rc_old_len", "rc_new_len", "rc_deleted", "rc_logid", "rc_log_type... | null |
Pages in ukwiki with most contributors in 2019-12 | null | SELECT NQ.title, COUNT(1) AS page_contributors
FROM
(
SELECT REPLACE(P.page_title,'_',' ') AS title, A.actor_name AS actor, COUNT(1) AS edits
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P ON R.rev_page=P.page_id
JOIN ukwiki_p.actor A ON R.rev_actor=A.actor_id
WHERE R.rev_timestamp > 20191201000000
AND R.... | {"resultsets": [{"headers": ["img_name", "img_timestamp"], "rowcount": 199}], "runningtime": "673.29"} | null |
RHaworth's 2019 edits with summary "unspeedy" | For [[Wikipedia:Arbitration/Requests/Case/RHaworth/Evidence]].
Lists only currently-undeleted edits timestamped in 2019 containing "unspeedy" (case-sensitive), which is what I've observed him to use in the past. | SELECT CONCAT('[[', CASE page_namespace
WHEN 0 THEN ''
WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:'
WHEN 3 THEN 'User talk:'
WHEN 4 THEN 'Wikipedia:'
WHEN 5 THEN 'Wikipedia talk:'
... | {"resultsets": [{"headers": ["rev_actor", "rev_timestamp", "count(rev_actor)"], "rowcount": 1}], "runningtime": "0.55"} | null |
Most active WikiProjects in past year | Last run September 5, 2016
List of WikiProjects by number of changes to all its pages in the last 365 days. From: https://en.wikipedia.org/wiki/Wikipedia:Database_reports/WikiProjects_by_changes/Configuration
Note that these are edits to the WikiProject pages, subpages, and talkpages, NOT edits to articles claimed by... | USE enwiki_p;
SELECT SUBSTRING_INDEX(page_title, '/', 1) AS project,
SUM((
SELECT COUNT(*)
FROM revision
WHERE page_id = rev_page
AND DATEDIFF(NOW(), rev_timestamp) <= 365
)) AS count,
SUM((
SELECT COUNT(*)
FROM revision
WHERE page_id ... | {"connection_id": 16129672} | null |
show tables | null | show tables | {"resultsets": [], "runningtime": "0.05"} | null |
Commons non-machine-readable license templates | Find Commons license templates in which need to be updated so they do not place files in "Files_with_no_machine-readable_license" category | use commonswiki_p;
SELECT /* SLOW_OK */ concat("Template:",tmpl.tl_title)
FROM page file1
INNER JOIN categorylinks cl1 -- file in Files_with_no_machine-readable_license category
ON
cl1.cl_from = file1.page_id and
cl1.cl_to ="Files_with_no_machine-readable_license"
INNER JOIN templatelinks tmpl
ON
... | {"resultsets": [{"rowcount": 10, "headers": ["cl_to"]}], "runningtime": "68.61"} | null |
Commons non-machine-readable license templates | Find Commons license templates in which need to be updated so they do not place files in "Files_with_no_machine-readable_license" category | use commonswiki_p;
SELECT /* SLOW_OK */
tmpl.tl_title,
COUNT(*) usages
FROM page file1
INNER JOIN categorylinks cl1 -- file in Files_with_no_machine-readable_license category
ON
cl1.cl_from = file1.page_id and
cl1.cl_to ="Files_with_no_machine-readable_license"
INNER JOIN templatelinks tmpl
ON
... | {"connection_id": 26610547} | null |
Commons non-machine-readable license templates | Find Commons license templates in which need to be updated so they do not place files in "Files_with_no_machine-readable_license" category | use commonswiki_p;
SELECT /* SLOW_OK */ concat("Template:",tmpl.tl_title)
FROM page file1
INNER JOIN categorylinks cl1 -- file in Files_with_no_machine-readable_license category
ON
cl1.cl_from = file1.page_id and
cl1.cl_to ="Files_with_no_machine-readable_license"
INNER JOIN templatelinks tmpl
ON
... | {"resultsets": [{"headers": ["ips_item_id", "ips_site_page"], "rowcount": 10}], "runningtime": "65.40"} | null |
Most active WikiProjects in past year | Last run September 5, 2016
List of WikiProjects by number of changes to all its pages in the last 365 days. From: https://en.wikipedia.org/wiki/Wikipedia:Database_reports/WikiProjects_by_changes/Configuration
Note that these are edits to the WikiProject pages, subpages, and talkpages, NOT edits to articles claimed by... | USE enwiki_p;
SELECT page_title AS project,
(SELECT rev_id #COUNT(*)
FROM revision
WHERE page_id = rev_page
AND rev_timestamp > (NOW() - INTERVAL 1 MONTH))
AS countall,
(SELECT rev_id # COUNT(*)
FROM revision
LEFT JOIN actor ON rev_actor = actor_id
LEFT JOIN user_groups ON actor_user = ug_user
WHERE pa... | {"resultsets": [{"rowcount": 1000, "headers": ["log_title"]}], "runningtime": "3.51"} | null |
Users with most edits in ukwiki | New Users that make more than X edits | SELECT user_name, user_editcount, user_registration, user_touched
FROM trwiki_p.user
WHERE user_registration > '2020-01-14'
ORDER BY user_registration DESC
LIMIT 50000 | {"resultsets": [{"rowcount": 701, "headers": ["page_title"]}], "runningtime": "3.61"} | null |
Most-edited pages containing the name of a WikiProject | Last run Jan 15, 2020
List of WikiProjects by number of changes to all its pages in the last 365 days. Based on: https://en.wikipedia.org/wiki/Wikipedia:Database_reports/WikiProjects_by_changes/Configuration
Note that these are edits to the WikiProject pages, subpages, and talkpages, NOT edits to articles claimed by ... | USE enwiki_p;
SELECT SUBSTRING_INDEX(page_title, '/', 1) AS project,
SUM((
SELECT COUNT(*)
FROM revision
WHERE page_id = rev_page
AND DATEDIFF(NOW(), rev_timestamp) <= 365
)) AS count,
SUM((
SELECT COUNT(*)
FROM revision
WHERE page_id ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 0}], "runningtime": "1.85"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 12, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 7, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "6.35"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 14, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 6, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 7, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "0.98"} | null |
Articles created by Lsjbot that are not redirects | null | USE cebwiki_p;
SELECT CONCAT(page_title) AS page,
CONCAT('[[Special:Diff/',rev_id,']]') AS diff,
DATE_FORMAT(rev_timestamp, '%Y-%m-%d %H:%i:%s') AS timestamp,
actor_name,
comment_text
FROM revision_userindex
JOIN actor_revision ON rev_actor = actor_id
JOIN page ON page_id = rev_page
JO... | {"resultsets": [{"rowcount": 1, "headers": ["page_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 35, "headers": ["cl_to"]}, {"rowcount": 0, "headers": ["page_title", "rd_title"]}, {"rowcount": 0, "headers": ["page_title", "pl_title"]}, {"rowcount": 0, "headers": ["page_title"]}, {"rowcount": 0, "hea... | null |
sysop 2020 temp | null | USE plwiki_p;
select count(*), page_namespace
from revision_actor_temp
LEFT JOIN page on revactor_page = page_id
where
-- actor_id
revactor_actor = 13738
AND
-- first_admin_dt
revactor_timestamp < 20060308161755
GROUP BY page_namespace;
| {"resultsets": [{"headers": ["linter_cat", "page_namespace", "count(*)"], "rowcount": 12}, {"headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"], "rowcount": 4}, {"headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"], "rowcount": 7}], "runningtime": "12.65"} | null |
portal deletes | null | SELECT log_type, log_timestamp, CONCAT('[[w:Portal:', REPLACE(log_title, '_', ' '), ']]') AS link
FROM logging INNER JOIN actor ON log_actor = actor_id
WHERE actor_name = 'Bradv' AND log_namespace = 100 AND log_type = 'delete'
ORDER BY log_timestamp DESC | {"connection_id": 456693} | null |
Edits on other users pages in elwiki | null | USE elwiki_p;
SELECT actor_name,rc_title, rc_timestamp FROM recentchanges AS r
JOIN actor AS a ON a.actor_id = r.rc_actor
WHERE a.actor_name NOT LIKE SUBSTR(rc_title,1,LENGTH(a.actor_name))
AND rc_namespace = 2
AND rc_type = 0
AND rc_actor NOT IN (183327)
ORDER BY rc_timestamp DESC
| {"connection_id": 17111404} | null |
Pages in WikiProject Women Scientists | null | SELECT COUNT(DISTINCT article.page_id)
FROM page talk
INNER JOIN page article ON
talk.page_title = article.page_title
INNER JOIN categorylinks ON
cl_from = talk.page_id
WHERE
talk.page_namespace = 1 AND
article.page_namespace = 0 AND
cl_to LIKE "WikiProject_Health"; | {"resultsets": [{"rowcount": 151, "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_text_id", "ar_deleted", "ar_len", "ar_page_id", "ar_parent_id", "ar_sha1", "ar_content_model", "ar_content_format"]}], "runningtime": "... | null |
Pages in WikiProject Medicine | null | SELECT DISTINCT article.page_id
FROM page talk
INNER JOIN page article ON
talk.page_title = article.page_title
INNER JOIN categorylinks ON
cl_from = talk.page_id
WHERE
talk.page_namespace = 1 AND
article.page_namespace = 0 AND
cl_to = "WikiProject_Medicine_articles"; | {"resultsets": [{"headers": ["totale", "page_count_error", "weight"], "rowcount": 7}, {"headers": ["page_id", "page_title", "totale", "linter_params", "ptotale"], "rowcount": 401}], "runningtime": "9.50"} | null |
sysop 2020 temp | null | USE plwiki_p;
select count(*), page_namespace
from revision_actor_temp
LEFT JOIN page on revactor_page = page_id
where
-- actor_id
revactor_actor = 13738
AND
-- first_admin_dt
revactor_timestamp < 20060308161755
GROUP BY page_namespace;
| {"resultsets": [{"rowcount": 20, "headers": ["rev_id", "rev_page", "rev_timestamp", "page_is_redirect"]}], "runningtime": "342.62"} | null |
sysop 2020 temp | null | USE plwiki_p;
SELECT ar_namespace, count(*) FROM archive_userindex USE INDEX (ar_actor_timestamp)
WHERE ar_actor = 7 AND ar_timestamp < 20160103210248
GROUP BY ar_namespace
| {"resultsets": [{"headers": ["lcase(log_title)", "log_namespace", "comment_text"], "rowcount": 2}], "runningtime": "0.58"} | null |
sysop2020 temp2 | null | USE plwiki_p;
SHOW INDEX FROM archive_userindex; | {"resultsets": [{"headers": ["log_title", "log_namespace", "comment_text"], "rowcount": 2}], "runningtime": "0.47"} | null |
Punjabi Wikipedia articles without labels on Wikidata | null | use wikidatawiki_p;
select CONCAT("Q",ips_item_id), CONCAT("Llv"), CONCAT('"',ips_site_page,'"')
from wb_items_per_site i
#join wb_terms on ips_item_id = term_entity_id and term_type = "label"
where i.ips_site_id='pawiki' and not exists
(select term_entity_id from wb_terms where i.ips_item_id = term_entity_id and
te... | {"resultsets": [{"rowcount": 1000, "headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"]}], "runningtime": "3.79"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["rd_from", "rd_namespace", "rd_title", "rd_interwiki", "rd_fragment"], "rowcount": 1707}], "runningtime": "6.43"} | null |
Wikidata - list of properties (English labels) updated | null | use wikidatawiki_p;
SELECT CURRENT_DATE;
SELECT CONCAT('P', term_entity_id) as P, term_text as description
from wb_terms
WHERE term_entity_type = 'property' AND term_language = 'en' and term_type = 'label'
ORDER bY term_entity_id desc; | {"resultsets": [{"rowcount": 383, "headers": ["rev_actor", "total"]}], "runningtime": "189.56"} | null |
Edits on other users pages in svwiki | null | USE svwiki_p;
SELECT actor_name,rc_title, rc_timestamp FROM recentchanges AS r
JOIN actor AS a ON a.actor_id = r.rc_actor
WHERE a.actor_name NOT LIKE SUBSTR(rc_title,1,LENGTH(a.actor_name))
AND rc_namespace = 2
AND rc_type = 0
AND rc_actor NOT IN (75,129,356,1448)
ORDER BY rc_timestamp DESC
| {"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["cl_to"], "rowcount": 41}, {"headers": ["page_title", "rd_title"], "rowcount": 0}, {"headers": ["page_title", "pl_title"], "rowcount": 1}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_t... | null |
titles not in telugu | null | use enwiki_p;
select page_title from page
left join langlinks
on ll_from= page_id and ll_lang="te"
where page_namespace=0 and ll_from is null
| {"resultsets": [{"rowcount": 1, "headers": ["total", "total_ve", "total_mob"]}], "runningtime": "2.62"} | null |
Javanese Contributors with 500-1000 between Jan 2019 and Jan 2020 | null | use jvwiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count
from
revision,
actor
where
rev_timestamp > 20190100000000 and
rev_actor = actor_id
group by
rev_actor
having
count(rev_id) between 500 and 1000
order by
edit_count desc; | {"resultsets": [{"rowcount": 1, "headers": ["rev_id", "rev_page", "rev_text_id", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1", "rev_content_model", "rev_content_format", "actor_id", "actor_user", "actor_name", "page_id", "page_namespace", "page_... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"headers": ["concat('[[',REPLACE(page_title,'_',' '),']]')", "COUNT(ll_from)"], "rowcount": 127}], "runningtime": "117.49"} | null |
Tech_category | null | use enwiki_p;
select base_id, id, title as page_title from (
select 1 as type, p2.page_id as base_id, p.page_id as sub_id, p.page_id as id, p2.page_title as base_title, p.page_title as title from page p
-- where p.page_title not like N'%־%'
left join redirect rd on rd.rd_from = p.page_id and rd.rd_namespace = 0
join ... | {"resultsets": [{"headers": ["log_title"], "rowcount": 0}], "runningtime": "148.86"} | null |
Deletion requests created by AshFriday | timestamp picked before editor creation date. | USE commonswiki_p;
SELECT RIGHT( LEFT(rev_timestamp, 8), 8 ) AS Date,
REPLACE(CONCAT("[[Commons:", page_title, "|", SUBSTRING(page_title, 19), "]]"), "_", " ") AS Page
FROM page
JOIN revision_userindex ON rev_page = page_id
AND rev_timestamp > 20180101001122
JOIN actor_revision ON actor_id = rev_actor
AND actor_n... | {"resultsets": [{"headers": ["\u0627\u0644\u0635\u0641\u062d\u0629", "\u0639\u062f\u062f \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0627\u062a"], "rowcount": 381}], "runningtime": "10.85"} | null |
Categories created by user Silar | Part of researching unnecessary race/genetics/eugenics related categories. | USE commonswiki_p;
SELECT LEFT(rev_timestamp,8) AS Date,
CONCAT("[[:Category:", page_title, "]]") AS Cat
FROM revision_userindex
JOIN page ON rev_page = page_id
JOIN actor_revision on rev_actor = actor_id
JOIN comment_revision ON comment_id = rev_comment_id
WHERE
page_namespace = 14
AND actor_name = "Silar"
AND comme... | {"resultsets": [{"headers": ["page_title"], "rowcount": 5}], "runningtime": "0.19"} | null |
Deletion requests created by DiegoAma | timestamp picked before editor creation date. | USE commonswiki_p;
SELECT RIGHT( LEFT(rev_timestamp, 8), 8 ) AS Date,
REPLACE(CONCAT("[[", SUBSTRING(page_title, 19), "|thumb]]"), "_", " ") AS Image
FROM page
JOIN revision_userindex ON rev_page = page_id
AND rev_timestamp > 20200101001122
JOIN actor_revision ON actor_id = rev_actor
AND actor_name = "DiegoAma"
J... | {"resultsets": [{"rowcount": 111, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}], "runningtime": "38.69"} | null |
FA not Main Paged, for Black History Month | FA not Main Paged, for Black History Month | SELECT
page_title #Faster than just selecting the page title and id, but only those are needed
FROM
page pg1
WHERE
pg1.page_namespace = 0 #Only care about articles
AND ( #AND either the page is in specified categories or the talk page is in a different set of specified categories
(
pg1.page_id IN ( #P... | {"connection_id": 1757690} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 1, "headers": ["page_namespace", "page_title", "pp_page", "pp_propname", "pp_value", "pp_sortkey"]}], "runningtime": "0.13"} | null |
Current senators | null | SELECT pl_title, pp_value FROM pagelinks
JOIN page ON page_title = pl_title AND page_namespace = 0
JOIN page_props ON pp_page = page_id
WHERE pl_from = 1685931
AND pl_namespace = 0
AND pp_propname = 'wikibase_item'
AND pl_title NOT LIKE 'List_%' | {"connection_id": 1972728} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"connection_id": 1977150} | null |
enwiki inactive admin users | null | use enwiki_p;
SELECT *
FROM user
WHERE user_name LIKE 'Printf("Herro_World");'
LIMIT 10; | {"connection_id": 1977574} | null |
Count contributions of last 30 days in ptwiki | Get editcount for last 30 days for ptwiki, without loggable actions or Wikidata edits | use ptwikiversity_p;
SELECT
COUNT(recentchanges.rc_id) AS num_contribs, actor.actor_name
from recentchanges, actor
WHERE
rc_logid = 0 AND rc_actor != 0 and rc_type != 5
and rc_bot = 0 and recentchanges.rc_actor = actor.actor_id
-- and rc_user_text != "Salebot"
-- and rc_user_text != "MediaWiki mes... | {"resultsets": [{"rowcount": 1, "headers": ["pl_title"]}], "runningtime": "0.12"} | null |
Top Staff Thankers | null | use mediawikiwiki_p;
select B.user_editcount as Edit_Count, A.log_actor as User_ID, A.log_timestamp as Thank_Time, B.user_name as User_Name
from (select log_actor, log_timestamp
from logging_userindex
where (log_action = 'thank' and log_type='thanks'
and log_timestamp < timestamp('2020-02-01'... | {"resultsets": [{"rowcount": 11, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 4, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 6, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "1.65"} | null |
No Wikidata items for ml articles | null | use mlwiki_p;
select CONCAT ("#[[",page_title,"]]")
from page
where page_id not in (select pp_page
from page_props
where pp_propname = "wikibase_item"
and pp_page = page_id)
and page_namespace = 1... | {"connection_id": 2059783} | null |
RHaworth's last 1000 deletions not linking [[WP:CSD]] | For [[Wikipedia:Arbitration/Requests/Case/RHaworth/Workshop#RHaworth frequently makes deletions not clearly explained in the log]].
Omits any deletion whose log comment contains '[[WP:CSD', '[[Wikipedia:CSD', '[[L#|', or '[[L#]]', where L is A, F, R, G, or T and # is a one- or two-digit numeral. | SELECT CONCAT('[[', CASE log_namespace
WHEN 0 THEN ''
WHEN 1 THEN 'Talk:'
WHEN 2 THEN 'User:'
WHEN 3 THEN 'User talk:'
WHEN 4 THEN 'Wikipedia:'
WHEN 5 THEN 'Wikipedia talk:'
... | {"resultsets": [{"rowcount": 6, "headers": ["page_title"]}], "runningtime": "1.17"} | null |
Recent user activity: Edit count distribution | New Users that make more than X edits | SELECT user_editcount, count(*)
FROM dewiki_p.user
WHERE user_registration > '20191222000000'
GROUP BY user_editcount
ORDER BY user_editcount DESC
LIMIT 100 | {"resultsets": [{"rowcount": 1, "headers": ["page", "creation"]}], "runningtime": "8.15"} | null |
Mainspace transclusions of Old and Middle Chinese pronunciation data modules | null | use enwiktionary_p;
select
page_title as source,
tl_from_namespace as 'source namespace',
tl_title as target,
tl_namespace as 'target namespace'
from templatelinks
inner join page on page_id = tl_from
where
tl_namespace = 828
and tl_from_namespace = 0
and (tl_title like "zh/data/ltc-pron%" or ... | {"resultsets": [{"headers": ["page_title"], "rowcount": 8}], "runningtime": "1.50"} | null |
Count of external links to *.adsabs.harvard.edu | For [[w:en:WP:VPT#Query on behalf of NASA]] circa 31 Jul 2018 | SELECT COUNT(*) AS 'http://' FROM externallinks WHERE el_index LIKE 'http://edu.harvard.adsabs.%';
SELECT COUNT(*) AS 'https://' FROM externallinks WHERE el_index LIKE 'https://edu.harvard.adsabs.ui.%';
SELECT COUNT(*) AS 'http://' FROM externallinks WHERE el_index LIKE 'http://edu.harvard.adsabs.articles.%';
| {"resultsets": [{"rowcount": 12, "headers": ["page_title"]}], "runningtime": "1.41"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [{"rowcount": 6, "headers": ["page_title"]}], "runningtime": "0.50"} | null |
Wikimedia Foundation Thankers | null | use mediawikiwiki_p;
select B.actor_name as Actor_Name, coalesce(A.num_thanks, 0) as Thanks
from (select actor_id, actor_name
from actor
where (actor_name like '%(WMF)%')) as B
join (select log_actor, log_timestamp, count(log_actor) as num_thanks
from logging_userindex
where
... | {"resultsets": [{"headers": ["page_title"], "rowcount": 100}], "runningtime": "2.11"} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"resultsets": [], "runningtime": "0.03"} | null |
Edits by WMF staff to Commons talkpages by month | (has not been run) | #
SELECT EXTRACT(Year from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `year`,
EXTRACT(Month from DATE_FORMAT(rev_timestamp,'%Y%m%d%H%i%s')) as `month`,
COUNT(rev_id) AS staff_edits FROM commonswiki_p.revision r
INNER JOIN commonswiki_p.page AS p
ON r.rev_page = p.page_id
WHERE p.page_namespace IN (3, 5, 7) #Commo... | {"resultsets": [{"headers": ["cat_title", "cat_pages"], "rowcount": 5}], "runningtime": "0.14"} | null |
Testing rev_actor on Commons | Looks like rev_actor is not the same as rev_user! | #SELECT * FROM commonswiki_p.revision
#WHERE rev_page = 82302461; # page id from https://commons.wikimedia.org/w/index.php?title=File:Patrolling_on_Wikipedia_September_2019_research_showcase_slides.pdf&action=info
#yields the correct page, but yields "2386505" for the id of the user instead of "2218619" which is my ID
... | {"resultsets": [{"headers": ["page_title", "pl_title"], "rowcount": 0}], "runningtime": "140.79"} | null |
Users with most edits in ukwiki | New Users that make more than X edits | SELECT user_name, user_registration, user_editcount, user_touched
FROM trwiki_p.user
WHERE user_registration > '2020-01-14'
ORDER BY user_registration DESC
LIMIT 100000 | {"resultsets": [{"headers": ["page_id", "cl_to"], "rowcount": 0}], "runningtime": "0.10"} | null |
Number of unique articles across all Wikipedias | null | USE wikidatawiki_p;
SELECT COUNT(DISTINCT ips_item_id) FROM wb_items_per_site WHERE ips_site_page NOT LIKE '%:%' AND ips_site_id LIKE '%wiki' AND ips_site_id NOT IN ('commonswiki', 'metawiki', 'mediawikiwiki', 'specieswiki', 'wikidatawiki');
| {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 55}], "runningtime": "22.66"} | null |
981101 mp1 # of DAB pages with direct link (pages) | null | USE fawiki_p;
SELECT COUNT(DISTINCT(page_title))
FROM pagelinks JOIN page
WHERE page_is_redirect=0
AND page_namespace=0
AND page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation')
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0)
AND pl_title=page_title
AND pl_nam... | {"resultsets": [{"headers": ["ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id"], "rowcount": 1}, {"headers": ["ir_ipb_id", "ir_type", "ir_value"], "rowcount": 0}], "runningtime": "0.28"} | null |
981101 mp1 # of direct links to DAB pages (pages) | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM pagelinks JOIN page
WHERE page_is_redirect=0
AND page_namespace=0
AND page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0
)
AND pl_title=page_title
AND pl_namespace ... | {"resultsets": [{"headers": ["ar_namespace", "ar_title", "ar_timestamp", "ar_minor_edit", "ar_rev_id", "ar_text_id", "ar_deleted", "ar_len", "ar_page_id"], "rowcount": 1}], "runningtime": "0.11"} | null |
981101 mp1 # of DAB pages | null | USE fawiki_p;
SELECT COUNT(page_title)
FROM page
WHERE page_id IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'); | {"resultsets": [{"headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 95}], "runningtime": "62.06"} | null |
981101 mp1 # of redirected links to DAB pages (pages) | null | USE fawiki_p;
SELECT COUNT(pl_title)
FROM pagelinks
LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title
LEFT JOIN redirect ON page_id = rd_from
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_namespace = 0
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redirect=0
AND ... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 23}], "runningtime": "853.89"} | null |
981101 mp1 # of DAB pages with redirected link (pages) | null | USE fawiki_p;
SELECT COUNT(DISTINCT(page_title))
FROM pagelinks
LEFT JOIN page ON pl_namespace = page_namespace AND pl_title = page_title
LEFT JOIN redirect ON page_id = rd_from
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_namespace = 0
AND pl_from IN (
SELECT page_id
FROM page
WHERE page_is_redir... | {"resultsets": [{"headers": ["page_title"], "rowcount": 10}], "runningtime": "32.88"} | null |
981101 owp1 All orphan articles | null | USE fawiki_p;
SELECT concat('# [[',p1.page_title,']]')
FROM page AS p1
WHERE p1.page_is_redirect = 0
AND p1.page_namespace = 0
# not a DAB page
AND p1.page_id NOT IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
# not receiving direct link
AND NOT (
p1.page_title IN (
SELECT pl1.... | {"resultsets": [{"headers": ["File name", "Date", "Size", "Uploader's name"], "rowcount": 3}], "runningtime": "979.36"} | null |
981101 # of fa articles | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0; | {"resultsets": [{"headers": ["page_title", "page_len", "cat_pages", "rev_timestamp", "rev_actor"], "rowcount": 74}], "runningtime": "1557.45"} | null |
Javanese contributors with accounts created Jan2019-Jan2020 and 50-1000 edits since Jan2019 | null | use jvwiki_p;
select
rev_actor,
actor_name,
count(rev_id) as edit_count,
substr(user_registration, 1, 8) as registration_date
from
revision,
actor,
user
where
actor_user = user_id and
user_registration between 20180100000000 and 20200100000000 and
rev_timestamp > 20190100000000 and
rev_act... | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 0}], "runningtime": "0.18"} | null |
find pagelinks title LIKE '%ttp%' | null | USE commonswiki_p;
SELECT CONCAT ("Commons:",page_title,"")
FROM page AS page
WHERE page_title LIKE '%Categories_for_discussion/2019%'
#(cat_title LIKE '%don%require%'
# OR cat_title LIKE '%Biathl%')
#OR pl_title LIKE '%Http%'
LIMIT 999; | {"resultsets": [{"headers": ["timestamp"], "rowcount": 1}, {"headers": ["wikipage"], "rowcount": 42}], "runningtime": "0.97"} | null |
Articles by first letter | null | use arwiki_p;
SELECT DISTINCT left(CONVERT(page_title USING utf8),1) , count(page_title) as counts
FROM page
WHERE page_namespace = 0
and page_is_redirect = 0
#and page_title like "ا%"
group by left(CONVERT(page_title USING utf8),1) order by count(*)
#limit 100
; | {"resultsets": [{"headers": ["page_title", "cl_to"], "rowcount": 10}], "runningtime": "0.14"} | null |
ukwiki gender nums | null | select IFNULL(up_value, 'not specified'), count(IFNULL(up_value, 1)) as num
from ukwiki_p.user us
left join ukwiki_p.user_properties ps
on ps.up_user = us.user_id
where (ps.up_property = 'gender' or ps.up_value is null) and us.user_editcount > 100
group by up_value; | {"connection_id": 4119494} | null |
recent month count | null | USE ukwiki_p;
select count(t1.rev_user_text) from
(SELECT r1.rev_user_text, count(*) as Gt0
from revision r1
join user on user.user_id = r1.rev_user
WHERE
20171212 * 1000000 <= r1.rev_timestamp
AND
NOT EXISTS (SELECT 1 FROM user_groups WHERE
user_groups.ug_user = user.user_id A... | {"resultsets": [{"rowcount": 100, "headers": ["page_title", "cl_to"]}], "runningtime": "0.54"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestam... | {"connection_id": 4210462} | null |
মোট সম্পাদনার সংখ্যা | ০২-০৯-২০১৮ | USE bnwiki_p;
SET @counter:=0; SELECT CONCAT("}}{{subst:সসংঅউতা|",@counter:=@counter+1,"") AS rank, CONCAT("|",user_name,"|") AS user_name, user_editcount
FROM user
WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
AND user_name NOT RLIKE "(.*)([Bb][Oo][Tt])(.*)"
ORDER BY user_editcount DESC... | {"resultsets": [{"rowcount": 100, "headers": ["log_id", "log_timestamp", "user", "log_title", "log_params", "summary"]}, {"rowcount": 9, "headers": ["ar_id", "ar_namespace", "ar_title", "ar_text", "ar_comment", "ar_comment_id", "ar_user", "ar_user_text", "ar_actor", "ar_timestamp", "ar_minor_edit", "ar_flags", "ar_rev_... | null |
زندگان درگذشته | کسانی که در ردهٔ افراد زنده هستند و همزمان در ردهٔ درگذشتگان قرار گرفتهاند | use fawiki_p;
select page_title
from categorylinks
inner join page
on cl_from = page_id
where cl_to = "فیلمهای_۲۰۱۹_(میلادی)"
and cl_from in (
select cl_from
from categorylinks
where cl_to like "%اکران_آینده%"
) | {"resultsets": [{"headers": ["count(*)"], "rowcount": 28951}], "runningtime": "92.64"} | null |
Commons users started as mobile app users | null | USE commonswiki_p;
SELECT MIN(log_timestamp) AS first_upload, COUNT(log_timestamp) AS uploads, log_user_text AS username, ct_tag = "mobile app edit" AS is_mobile
FROM logging
LEFT JOIN user ON user_id = log_user
JOIN change_tag ON ct_log_id = log_id
JOIN page ON log_page = page_id
WHERE log_type = "upload" AND (log_ac... | {"resultsets": [{"rowcount": 18, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 7, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 8, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}], "runningtime": "4.33"} | null |
for wikiprize | null | use sahwikisource_p;
select rev_user_text, count(*) c from revision join page on rev_page=page_id where page_namespace = 0 and rev_timestamp >= "20180101000000" and rev_timestamp < "20190101000000" group by rev_user order by c desc;
| {"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": 10}], "runningtime": "0.21"} | null |
Список користувачів за кількістю започаткованих статей | null | USE ukwiki_p;
SELECT @rownum := @rownum + 1 AS rank,
user_name,
created,
percents
FROM
(
SELECT
CONCAT('[[Користувач:', revision_userindex, '|]]') as user_name,
COUNT(1) AS created,
CONCAT(
ROUND(
COUNT(1) /
(SELECT COUNT(1)
FROM page
... | {"resultsets": [], "runningtime": "0.03"} | null |
Список користувачів за кількістю започаткованих статей | null | USE ukwiki_p;
SELECT @rownum := @rownum + 1 AS rank,
actor_name,
created,
percents
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|]]') as actor_name,
COUNT(1) AS created,
CONCAT(
ROUND(
COUNT(1) /
(SELECT COUNT(1)
FROM page
... | {"resultsets": [{"rowcount": 0, "headers": ["pi_property_id", "pi_type", "pi_info"]}], "runningtime": "0.09"} | null |
Articles, created in certain period, which have no reviewed versions | null | SELECT P.page_title, R.rev_actor, R.rev_timestamp
FROM ukwiki_p.revision R
JOIN ukwiki_p.page P ON R.rev_page = P.page_id
WHERE R.rev_parent_id = 0
AND P.page_namespace = 0
AND R.rev_timestamp>=20200126000000
AND R.rev_timestamp< 20190127000000
AND P.page_is_redirect = 0
AND P.page_title NOT IN(
SELECT P.page_ti... | {"resultsets": [{"headers": ["cl_to"], "rowcount": 0}], "runningtime": "0.08"} | null |
Тт | null | use ruwiki_p;
select actor_name, count(*) c from revision join page on rev_page=page_id join actor on rev_actor=actor_id where actor_user not in (select ug_user from user_groups where ug_group = "bot") and page_namespace = 0 and rev_timestamp >= "20190101000000" and rev_timestamp < 20200101000000 group by actor_user or... | {"resultsets": [{"rowcount": 667, "headers": ["page_title"]}], "runningtime": "26.17"} | null |
very large talk pages (except for archives) | null | USE frwiki_p;
SELECT CONCAT("# [[talk:",page_title,"]]") AS page_title
FROM page
WHERE page_namespace = 1 AND page_len > 262144
AND page_title NOT LIKE "%/Archive_%"
AND page_title NOT LIKE "%/archive%"
LIMIT 255; | {"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 533}], "runningtime": "4.78"} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ১৫-০২-২০১৯ অনুসারে | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",user_name,"|",user_name,"]]") AS user_name,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM user INNER JOIN revision;
ON revisions.rev_actor = user.user_id
JOIN page
ON page.page_id = revision.rev_page
WHERE page_is_redirect = 0
AND rev_parent_id = 0
AND page_namespace = 0
AND rev_timestam... | {"resultsets": [{"headers": ["reviews", "actor_name", "accept %", "reject %"], "rowcount": 145}], "runningtime": "43.04"} | null |
File move counter, Commons | null | use commonswiki_p;
select count(*) as "Number of file moves"
from logging
where log_type = "move"
and log_actor = "6086297"
and log_namespace = 6; | {"resultsets": [{"headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"], "rowcount": 102}], "runningtime": "47.84"} | null |
Most active users by edits on plwiki in last 12 months | null | USE bnwiki_p;
SELECT
CONCAT("#") AS number, actor_user,
CONCAT("[[user:",actor_name,"|",actor_name,"]]") AS rev_user_text,
COUNT(actor_id) AS recent_user_editcount/*,
user_editcount*/
FROM revision
JOIN actor ON rev_actor=actor_id
JOIN page ON rev_page=page_id
WHERE page_namespace = 0
AND actor_user IS NOT NULL
AND r... | {"resultsets": [{"headers": ["Kategori", "antal"], "rowcount": 23}, {"headers": ["Artikel", "antal"], "rowcount": 241}, {"headers": ["cl_to"], "rowcount": 0}], "runningtime": "1.19"} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.