title stringlengths 1 212 | description stringlengths 1 4.39k ⌀ | query stringlengths 1 65.5k ⌀ | extra_info stringlengths 18 31.6k | wikidb stringlengths 4 26 ⌀ |
|---|---|---|---|---|
Counting top 10 thankers in 2020 (Ukrainian) | null | SELECT actor_name AS User,
COUNT(log_action) AS Actions
FROM ukwiki_p.logging L JOIN ukwiki_p.actor A ON A.actor_id = L.log_actor
WHERE log_action="thank"
AND LEFT(log_timestamp,4)="2020"
GROUP BY actor_id
ORDER BY COUNT(log_action) DESC
LIMIT 10; | {"connection_id": 602940741} | null |
Counting top 10 thanks in 2020 (Wikidata) | null | SELECT actor_name AS User,
COUNT(log_action) AS Actions
FROM wikidata.logging L JOIN wikidata.actor A ON A.actor_id = L.log_actor
WHERE log_action="thank"
AND LEFT(log_timestamp,4)="2020"
GROUP BY actor_id
ORDER BY COUNT(log_action) DESC
LIMIT 10; | {"runningtime": "0.09", "resultsets": [{"rowcount": 10, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}]} | null |
Counting top 10 thankees in 2020 (Ukrainian) | null | SELECT log_title AS User,
COUNT(log_action) AS Actions
FROM ukwiki_p.logging L
WHERE log_action="thank"
AND LEFT(log_timestamp,4)="2020"
GROUP BY log_title
ORDER BY COUNT(log_action) DESC
LIMIT 10; | {"connection_id": 602980530} | null |
Edits Per Page | null | use enwiki_p;
select a.page_namespace, a.page_title, count(*) as c from revision b
join page a on b.rev_page = a.page_id
group by a.page_title order by c; | {"runningtime": "0.33", "resultsets": [{"rowcount": 12, "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", "rev_id", "rev_page", "rev_comment_id"... | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "38.96", "resultsets": [{"rowcount": 6, "headers": ["main_title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.11", "resultsets": [{"rowcount": 10, "headers": ["ug_user", "user_name", "log_id", "log_type", "log_action", "log_timestamp", "log_actor", "log_namespace", "log_title", "log_comment_id", "log_params", "log_deleted", "log_page"]}]} | null |
pages by name | query pages by name
| use hewiki_p;
select p.page_title from page p
where page_is_redirect=0 and page_namespace=0 and page_id in (select distinct cl_from from categorylinks where cl_to ='רבנים');
| {"runningtime": "176.15", "resultsets": [{"rowcount": 926, "headers": ["actor_name", "total"]}]} | null |
INFO ISO-3166-2-Vorlagen | null | USE dewiki_p;
SELECT page_title
FROM page
WHERE page_namespace = 10
AND page_title LIKE 'Info_ISO-3166-2:%'
AND page_title NOT LIKE "%:%-%";
| {"runningtime": "3.16", "resultsets": [{"rowcount": 1188, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
Wikidata - list of properties (English labels) | null | use wikidatawiki_p;
SELECT *
from wbt_property_terms
#WHERE term_entity_type = 'property' and term_type = 'label'
ORDER bY term_entity_id desc; | {"runningtime": "0.15", "resultsets": [{"rowcount": 10, "headers": ["cat_title"]}]} | null |
Wikidata Property Label Dumper (en) | Dumps the property number with the associated label in English | use wikidatawiki_p;
SELECT
CONCAT('P', wbpt_property_id) AS property_id,
wbx_text AS property_label
FROM wbt_property_terms
INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id
INNER JOIN wbt_type ON wbtl_type_id = wby_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
INNER JOIN wbt_text... | {"runningtime": "0.28", "resultsets": [{"rowcount": 100, "headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"]}]} | null |
Wikidata Property Label Dumper (fr) | Dumps the property number with the associated label in French | use wikidatawiki_p;
SELECT
CONCAT('P', wbpt_property_id) AS property_id,
wbx_text AS property_label
FROM wbt_property_terms
INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id
INNER JOIN wbt_type ON wbtl_type_id = wby_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
INNER JOIN wbt_text... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Wikidata Property Label Dumper (de) | Dumps the property number with the associated label in German | use wikidatawiki_p;
SELECT
CONCAT('P', wbpt_property_id) AS property_id,
wbx_text AS property_label
FROM wbt_property_terms
INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id
INNER JOIN wbt_type ON wbtl_type_id = wby_id
INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
INNER JOIN wbt_text... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.09", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "7.22", "resultsets": [{"rowcount": 2696, "headers": ["pl_from", "pl_namespace", "pl_title", "pl_from_namespace"]}]} | null |
Top-level portal pages deleted per G6 or G8 | Top-level portal pages deleted per G6 or G8 in 2019. Most of these were simple redirects to portals deleted at MfD. | SET STATEMENT max_statement_time = 100 FOR
SELECT log_title, log_timestamp, actor_name, comment_text, P1.page_touched AS mfd1_time, P2.page_touched AS mfd2_time
FROM logging_logindex
JOIN actor ON actor_id = log_actor
JOIN `comment` on comment_id = log_comment_id
LEFT JOIN page P1 ON P1.page_namespace = 4 AND P1.page_t... | {"runningtime": "0.64", "resultsets": [{"rowcount": 5, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 2, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "1.55", "resultsets": [{"rowcount": 168, "headers": ["author", "total", "page_id"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.47", "resultsets": [{"rowcount": 32, "headers": ["REPLACE(REPLACE(REPLACE(el_to, 'https://quickstatements.toolforge.org/#/v1=',''), '%7C','|'),'||','^')"]}]} | null |
Find same edits of same user | null | USE wikidatawiki_p;
-- Step 1, make the same edit again, on the sandbox item. Go to the history and get the revision ID of the new edit.
-- Step 2, get the comment ID of that edit (and also your actor ID). Replace the rev_id with the revision ID from step 1.
SELECT rev_comment_id, rev_actor
INTO @comment_id, @actor_i... | {"runningtime": "809.44", "resultsets": [{"rowcount": 1, "headers": ["count(*)"]}]} | null |
Redirect a sezione (ns0) | Tutti i redirect a sezione in ns0 | USE itwiki_p;
SELECT pagine.page_title, rinvia.rd_title, rinvia.rd_interwiki, rinvia.rd_fragment
FROM redirect rinvia
JOIN page pagine
ON rinvia.rd_from = pagine.page_id
WHERE rd_fragment!=""
AND rd_namespace=0 | {"runningtime": "13.02", "resultsets": [{"rowcount": 447, "headers": ["actor_name", "total"]}]} | null |
Most-transcluded enwiki pages linking to an old Wikipedia logo | null | USE enwiki_p;
SELECT tl_namespace, tl_title, COUNT(*) AS count
FROM templatelinks
JOIN page
ON page_namespace = tl_namespace
AND page_title = tl_title
JOIN imagelinks
ON il_from = page_id
WHERE il_to IN (
'Wikipedia_Logo_1.0.png',
'Wikipedia-logo-en.png',
'Old_version_of_the_Wikipedia_logo_used_until_2010_(bi... | {"runningtime": "78.76", "resultsets": [{"rowcount": 3, "headers": ["Count", "Size_GB", "Type"]}]} | null |
Most-transcluded wikidatawiki pages linking to an old Wikipedia logo | null | USE wikidatawiki_p;
SELECT tl_namespace, tl_title, COUNT(*) AS count
FROM templatelinks
JOIN page
ON page_namespace = tl_namespace
AND page_title = tl_title
JOIN imagelinks
ON il_from = page_id
WHERE il_to IN (
'Wikipedia_Logo_1.0.png',
'Wikipedia-logo-en.png',
'Old_version_of_the_Wikipedia_logo_used_until_20... | {"runningtime": "11.25", "resultsets": [{"rowcount": 0, "headers": ["up_user", "up_property", "up_value"]}]} | null |
Elenco disambigue (ns0) | Tutti le pagine di disambiguazione in ns0 | USE itwiki_p;
SELECT page_title
FROM page
INNER JOIN page_props ON page.page_id=page_props.pp_page
WHERE page_namespace=0 and pp_propname="disambiguation"; | {"runningtime": "0.06", "resultsets": [{"rowcount": 0, "headers": ["up_property", "up_user", "user_id"]}]} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_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... | {"connection_id": 610812837} | null |
test | null | null | {"runningtime": "18.76", "resultsets": [{"rowcount": 35, "headers": ["CONCAT('File:', REPLACE(page_title,'_',' '))"]}]} | null |
Wikidata - Show nr. of edits made between particular dates by user | Show 5 revisions to check format | USE wikidatawiki_p;
SELECT rev_actor, COUNT(*) as edits
FROM revision
WHERE rev_timestamp >= "20201201" && rev_timestamp < "20201208"
GROUP BY rev_actor
ORDER BY edits DESC | {"connection_id": 60741253} | null |
Wikidata - edits per user oct 2020 (namespaces 0 and 120) | null | USE wikidatawiki_p;
SELECT rev_actor, rev_page, actor_name, COUNT(*) as edits
FROM revision rv
JOIN page ON rv.rev_page = page_id
JOIN actor ON rv.rev_actor = actor_id
WHERE (rev_timestamp >= "20201001" AND rev_timestamp < "20201101")
AND (page_namespace = 0 OR page_namespace = 120)
GROUP BY rev_actor
ORDER BY edits ... | {"runningtime": "0.08", "resultsets": [{"rowcount": 10, "headers": ["page_title", "page_len"]}]} | null |
get namespace of revision with actor | null | USE wikidatawiki_p;
SELECT rev_actor, rev_page, page_namespace
FROM revision rv
JOIN page ON rv.rev_page = page_id
WHERE page_namespace = 120
LIMIT 5 | {"runningtime": "52.37", "resultsets": [{"rowcount": 491, "headers": ["page_title"]}]} | null |
990901 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... | {"runningtime": "0.35", "resultsets": [{"rowcount": 100, "headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace"]}]} | null |
990901 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 ... | {"runningtime": "10.79", "resultsets": [{"rowcount": 1, "headers": ["ss_total_edits"]}, {"rowcount": 1, "headers": ["SUM(user_editcount)"]}, {"rowcount": 817, "headers": ["userid", "name", "editcount", "admin", "bot"]}]} | null |
990901 # of fa articles | null | USE fawiki_p;
SELECT COUNT(page_id)
FROM page
WHERE page_is_redirect = 0
AND page_namespace = 0; | {"runningtime": "371.12", "resultsets": [{"rowcount": 29, "headers": ["up_user", "user_editcount", "user_name"]}]} | null |
990901 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 ... | {"runningtime": "216.65", "resultsets": [{"rowcount": 117, "headers": ["CONCAT('*{{lf|', REPLACE(REPLACE(p.page_title, '\"', '**DOUBLEQUOTE**'), '_', ' '), '}}')"]}]} | null |
990901 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... | {"runningtime": "1005.05", "resultsets": [{"rowcount": 63, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | null |
990901 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.... | {"runningtime": "1156.48", "resultsets": [{"rowcount": 19, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | null |
Remove {{لا صندوق معلومات}} | null | use arwiki_p;
select
CONCAT('# [[',page.page_title,']]')
from page
where page_namespace = 0
and page_is_redirect = 0
and page_id in (select tl_from from templatelinks where tl_title = 'لا_صندوق_معلومات')
and page_id in (select tl_from from templatelinks where tl_title = 'ص.م/فتح')
order by rand(); | {"runningtime": "2.09", "resultsets": [{"rowcount": 31, "headers": ["DIA", "TOTAL_EDI\u00c7\u00d5ES", "DAMAGING_BY_ORES"]}]} | null |
שרי האלפים שרי המאות, בדיקה של יגאל וביקורת | null | use hewiki_p;
select user_name, count(page_title)
from user join revision_userindex join page join actor
on user_id = actor_user
and rev_page = page_id
and rev_actor = actor_id
where page_namespace = 0
and not page_is_redirect
and rev_parent_id = 0
and rev_deleted = 0
group by user_name
having count(page_title) >= 50
o... | {"runningtime": "11920.08", "resultsets": [{"rowcount": 4342646, "headers": ["CONCAT(wbit_item_id)", "concat(\"Darz\")", "CONCAT('\"','\u062a\u0635\u0646\u064a\u0641 \u0628\u062a\u0627\u0639 \u0648\u064a\u0643\u064a\u0645\u064a\u062f\u064a\u0627','\"')"]}]} | null |
Wikidata revision with user group | null | USE wikidatawiki_p;
SELECT rev_actor, rev_page, actor_name, ug_group, COUNT(*) as edits
FROM revision rv
JOIN page ON rv.rev_page = page_id
JOIN actor ON rv.rev_actor = actor_id
JOIN user_groups ON actor_user = ug_user
WHERE (rev_timestamp >= "20201001" AND rev_timestamp < "20201101")
AND (page_namespace = 0 OR page_... | {"runningtime": "5.55", "resultsets": [{"rowcount": 288, "headers": ["CONCAT(\"[[\", page_title, \"]]\")", "rev_timestamp"]}]} | null |
Top Patrol NL Wiki | TOP Patrol NL Wiki | USE nlwiki_p;
SELECT act.actor_name, count(log_actor)
FROM logging a
LEFT JOIN actor act ON a.log_actor = act.actor_id
WHERE log_action = 'patrol'
GROUP BY log_actor
ORDER BY count(log_actor) DESC
LIMIT 500 | {"runningtime": "37.83", "resultsets": [{"rowcount": 35, "headers": ["DAY", "NEW_ACCUNTS", "REGISTERED_USERS_BLOCKED"]}]} | null |
Wikidata revision with user group | null | USE wikidatawiki_p;
SELECT rev_actor, actor_name, ug_group, COUNT(rev_actor) as edits
FROM revision rv
LEFT JOIN page ON rv.rev_page = page_id
LEFT JOIN actor ON rv.rev_actor = actor_id
LEFT JOIN user_groups ON actor_user = ug_user
WHERE (rev_timestamp >= "20201001" AND rev_timestamp < "20201101")
AND (page_namespace... | {"runningtime": "92.75", "resultsets": [{"rowcount": 35, "headers": ["DAY", "ACCUNTS_CREATED", "BLOCKS", "REGISTERED_USERS_BLOCKED"]}]} | null |
wikidatawiki pagelinks related to COVID-19 | Query wikidatawiki for pagelinks related to COVID-19 | use wikidatawiki_p;
SELECT
ips_site_id,
ips_site_page
FROM wb_items_per_site
WHERE ips_item_id in
(SELECT SUBSTRING(page.page_title,2)
FROM page
WHERE page_id in
(SELECT pl_from FROM pagelinks WHERE pl_title in ('Q84263196', 'Q8106
8910','Q82069695') AND pl_namespace = 0 AND pl_fro... | {"connection_id": 615198231} | null |
[enwn] Redlinks | Lists red links on the wiki. | use enwikinews_p;
select distinct pl_namespace, pl_title
from pagelinks
left join page as pg1
on pg1.page_namespace=pl_namespace and pg1.page_title=pl_title
left join page as pg2 on pl_from=pg2.page_id
where pg1.page_id is null
and pl_namespace not in (2,3)
and pg2.page_namespace!=8
and pg2.page_is_redirect=0; | {"runningtime": "0.14", "resultsets": [{"rowcount": 30, "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"]}]} | null |
[enwn] Broken mainspace redirects | List all broken mainspace redirects.
Happens when a user renames a page, from [[Foo]] to [[Bar]] and [[Bar]] is abandoned and deleted and [[Foo]] isn't.
Adapted from AntiComposite's https://quarry.wmflabs.org/query/50407 | USE enwikinews_p;
SELECT rd.page_title, rd_namespace, rd_title
FROM redirect
JOIN page rd ON rd_from = rd.page_id
LEFT JOIN page target ON target.page_namespace = rd_namespace AND target.page_title = rd_title
WHERE
rd.page_namespace = 0
AND target.page_id IS NULL
AND rd_interwiki = ""
AND rd_namespace >= 0... | {"runningtime": "0.12", "resultsets": [{"rowcount": 15, "headers": ["ul_key", "ul_value"]}]} | null |
Statistikkram | 1.) Anzahl Klammerlemmata
2.) Anzahl Klammerlemmata "(Begriffsklärung)"
3.) Häufigkeiten der Klammerlemata | USE dewiki_p;
SELECT COUNT(*) AS "Anzahl Gesamt"
FROM page
WHERE page_namespace = 0
AND page_title LIKE "%\_(%";
SELECT COUNT(*) AS "Anzahl Begriffsklärung"
FROM page
WHERE page_namespace = 0
AND page_title LIKE "%\_(Begriffsklärung)";
SELECT COUNT(*) AS Anzahl, CONCAT('(', REPLACE(REGEXP_REPLACE(SUBSTRIN... | {"runningtime": "0.14", "resultsets": [{"rowcount": 30, "headers": ["img_name", "img_size", "img_width", "img_height", "img_metadata", "img_bits", "img_media_type", "img_major_mime", "img_minor_mime", "img_description_id", "img_actor", "img_timestamp", "img_sha1"]}]} | null |
Statistikkram | 1.) Anzahl Klammerlemmata
2.) Anzahl Klammerlemmata "(Begriffsklärung)"
3.) Häufigkeiten der Klammerlemata | USE dewiki_p;
SELECT COUNT(*) AS "Anzahl Gesamt"
FROM page
WHERE page_namespace = 0
AND page_title LIKE "%\_(%";
SELECT COUNT(*) AS "Anzahl Begriffsklärung"
FROM page
WHERE page_namespace = 0
AND page_title LIKE "%\_(Begriffsklärung)";
SELECT COUNT(*) AS Anzahl, CONCAT('(', SUBSTRING_INDEX(page_title, '_(... | {"runningtime": "405.63", "resultsets": [{"rowcount": 63, "headers": ["page_title", "cl_to"]}]} | null |
Statistikkram Personen | 1.) Anzahl Klammerlemmata
2.) Häufigkeiten der Klammerlemata | USE dewiki_p;
SELECT COUNT(*) AS "Anzahl", "Gesamt"
FROM page, categorylinks
WHERE page_namespace = 0
AND page_title LIKE "%\_(%"
AND cl_from = page_id
AND cl_to IN ('Mann', 'Frau', 'Nichtbinäre_Person', 'Geschlecht_unbekannt')
UNION SELECT COUNT(*) AS Anzahl, CONCAT('(', REPLACE(REGEXP_REPLACE(SUBSTRING_... | {"connection_id": 615673683} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_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... | {"runningtime": "742.83", "resultsets": [{"rowcount": 1, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | null |
hewiki edits November 2020 (ve/all) | Based on queries #50040 and #50065. | use ptwiki_p;
set @ve_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'visualeditor'
);
set @cx_edit_tag = (
select
ctd_id
from
change_tag_def
where
ctd_name = 'contenttranslation'
);
select
substring(rev_timestamp, 1, 8) as day,
sum(ct_rev_id is not null) as v... | {"runningtime": "15.13", "resultsets": [{"rowcount": 2, "headers": ["up_value", "COUNT(up_value)"]}]} | null |
most thanked users in bnwiki | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ৫০০ ব্যবহারকারী | USE bnwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 500; | {"runningtime": "0.10", "resultsets": [{"rowcount": 5, "headers": ["gt_id", "gt_page_id", "gt_globe", "gt_primary", "gt_lat", "gt_lon", "gt_dim", "gt_type", "gt_name", "gt_country", "gt_region"]}]} | null |
When pages last had their link tables updated | null | select count(*), SUBSTR(page_links_updated, 1,6) from page group by SUBSTR(page_links_updated, 1,6), page_id order by SUBSTR(page_links_updated, 1,6) desc; | {"connection_id": 65146855} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.10", "resultsets": [{"rowcount": 10, "headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type"]}]} | null |
Disregard - Articles written by Kubura (hrwiki) | Find articles that have only been edited by one human editor. Such articles have higher chances of requiring attention. | # Find articles that have only been edited by one human editor. Such articles have higher chances of requiring attention.
USE hrwiki_p;
SELECT page_title, page_len, COUNT(rev_actor) FROM
(
SELECT p.page_title, p.page_len, r.rev_actor, a.actor_name
FROM
(
SELECT page_title, page_len, page_id
FROM page
... | {"runningtime": "0.09", "resultsets": [{"rowcount": 0, "headers": ["CONCAT(wbit_item_id)", "concat(\"Darz\")", "CONCAT('\"','\u062a\u0635\u0646\u064a\u0641 \u0628\u062a\u0627\u0639 \u0648\u064a\u0643\u064a\u0645\u064a\u062f\u064a\u0627','\"')"]}]} | null |
disregard - All articles by Kubura with only initial revision (take 2) (hrwiki) | null | use hrwiki_p;
select page_title, page_id from page
join revision_userindex on rev_page = page_id
join actor_revision on rev_actor = actor_id
where
page_namespace = 0
and page_is_new = 1
and actor_name = "Kubura"
order by page_id desc
limit 500 | {"connection_id": 617034145} | null |
Commons uploads per year | Number of currently existing files per year of newest file revision | USE commonswiki_p;
SELECT YEAR(img_timestamp) as `year`, COUNT(*), img_major_mime
FROM image
GROUP BY YEAR(img_timestamp), img_major_mime | {"runningtime": "0.65", "resultsets": [{"rowcount": 190, "headers": ["concat(\"M\",page_id)"]}]} | null |
Thanks for 2019 | Most thanked people in 2019
Blame Mz7, SQL, and stwalkerster for this | USE enwiki_p;
SELECT log_title, COUNT(log_id)
FROM logging_logindex
WHERE
log_type = "thanks" AND
log_timestamp >= "20190000000000"
GROUP BY log_title
ORDER BY 2 DESC | {"runningtime": "0.08", "resultsets": [{"rowcount": 2, "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"]}]} | null |
most thanked users in bnwiki | বাংলা উইকিপিডিয়ায় সবচেয়ে বেশি ধন্যবাদ পাওয়া ৫০০ ব্যবহারকারী | USE bnwiki_p;
SELECT log_title, COUNT(*)
FROM logging
WHERE log_type="thanks"
GROUP BY log_title
ORDER BY COUNT(*) DESC
LIMIT 500; | {"runningtime": "1.30", "resultsets": [{"rowcount": 150, "headers": ["actor_name", "count(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "62.14", "resultsets": [{"rowcount": 45, "headers": ["CONCAT(\"# [[\",REPLACE(article.page_title,\"_\",\" \"),\"]] ([[:en:\",REPLACE(article.page_title,\"_\",\" \"),\"|en]])\")", "oenem"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "1479.97", "resultsets": [{"rowcount": 100, "headers": ["CONCAT(\"# [[\",REPLACE(article.page_title,\"_\",\" \"),\"]] ([[:en:\",REPLACE(article.page_title,\"_\",\" \"),\"|en]])\")", "oenem"]}]} | 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": 622393428} | null |
Created pages in ts since May 2015 | null | use tswiki_p;
select
page_title,
rev_timestamp
from
revision,
page
where
rev_page = page_id and
page_namespace = 0 and
rev_parent_id = 0 and
rev_timestamp > 20150500000000
order by
rev_timestamp asc; | {"runningtime": "0.30", "resultsets": [{"rowcount": 1, "headers": ["actor_name", "actor_id"]}]} | null |
Wiedergänger | null | USE dewiki_p;
select
rc_timestamp as CreationTime,
rc_title as Title,
log_timestamp as DeletionTime,
log_comment.comment_text as DeletionComment
from recentchanges
inner join logging on log_title=rc_title
inner join comment as log_comment on log_comment_id = log_comment.comment_id
inner join pag... | {"runningtime": "476.85", "resultsets": [{"rowcount": 164, "headers": ["page_title", "cl_to"]}]} | null |
pages by name | query pages by name
| use hewiki_p;
select p.page_title from page p
where p.page_namespace=0 and p.page_title like 'ת%' and page_is_redirect = 1
limit 10000; | {"runningtime": "0.53", "resultsets": [{"rowcount": 176, "headers": ["site_global_key", "reverse(site_domain)"]}]} | null |
Lionster draft | null | set @category = "רבנים";
use hewiki_p;
select page_namespace, page_title from page inner join categorylinks
on page_id = cl_from
and cl_to = replace(@category, " ", "_")
and not page_namespace = 14
where exists
(select * from imagelinks
where il_from = page_id)
| {"runningtime": "12.53", "resultsets": [{"rowcount": 3, "headers": ["page_namespace", "page_title"]}]} | null |
Pages and subcategories directly on a specific category, Database management systems | null | use hewiki_p;
SELECT page_title FROM categorylinks JOIN page ON page_id = cl_from WHERE cl_to = 'רבנים' and page_namespace = 0 | {"runningtime": "736.63", "resultsets": [{"rowcount": 1559, "headers": ["page_title", "cl_to"]}]} | null |
Mathematics in hywiki | This is people with most edits to articles in [[Category:Բժշկություն]] on hywiki, and any of its subcategories (to depth 2) | use hewiki_p;
select page_title from categorylinks inner join page on page_id = cl_from
where (
cl_to = 'רבנים'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'רבנים' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page inner join categorylink... | {"runningtime": "0.08", "resultsets": [{"rowcount": 1, "headers": ["log_timestamp"]}]} | null |
enwp: FA articles | null | USE enwiki_p;
SELECT page_title, page_len
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = 'Featured_articles';
SELECT SUM(page_len)
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = 'Featured_articles'; | {"runningtime": "13.65", "resultsets": [{"rowcount": 10, "headers": ["log_title", "actor_name", "log_timestamp", "log_params", "c1", "c2", "p2"]}]} | null |
Most active test wikis on Incubator | This query lists the most active test projects on Incubator. It considers everything a test wiki prefix that begins with Wx (x may be any lower case letter), followed by a slash, followed by any number of lower case letters (this is a bit more relaxed than format actually required on Incubator, but the gain of simplici... | USE incubatorwiki_p;
SELECT REGEXP_SUBSTR(rc_title, 'W[a-z]/[a-z]+') AS prefix, COUNT(*) AS count
FROM recentchanges
WHERE rc_namespace IN (0, 1, 10, 11, 14, 15, 828, 829) AND rc_type < 5 -- exclude Wikidata edits and category changes
GROUP BY prefix
HAVING prefix <> ''
ORDER BY COUNT(*) DESC; | {"runningtime": "603.42", "resultsets": [{"rowcount": 125, "headers": ["url", "COUNT(*)"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "32.71", "resultsets": [{"rowcount": 18, "headers": ["actor_name", "year", "rights_given", "number_of_autoreviews", "number_of_autoreview_pages", "number_of_autoreviewed_page_days"]}]} | null |
বাংলা উইকিতে সবচেয়ে বেশী নিবন্ধ সৃষ্টি করা ব্যবহারকারী | ২৮ জানু ২০২০ | USE bnwiki_p;
SELECT
CONCAT("[[ব্যবহারকারী:",actor_name,"|",actor_name,"]]") AS ব্যবহারকারী_নাম,
COUNT(rev_id) AS মোট_নিবন্ধ
FROM actor INNER JOIN revision
ON revision.rev_actor = actor.actor_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... | {"runningtime": "387.93", "resultsets": [{"rowcount": 0, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'פיזיקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page inner join ... | {"runningtime": "0.30", "resultsets": [{"rowcount": 11, "headers": ["Contributors", "Edits", "Articles"]}, {"rowcount": 7, "headers": ["Articles", "Editors"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'פיזיקהגרעינית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from p... | {"runningtime": "1.17", "resultsets": [{"rowcount": 300, "headers": ["page_title"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'פיזיקה גרעינית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from ... | {"runningtime": "282.74", "resultsets": [{"rowcount": 895, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'פיזיקה גרעינית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from ... | {"runningtime": "0.10", "resultsets": [{"rowcount": 1, "headers": ["actor_id", "actor_user", "actor_name"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to in (select page_title from page inner join categorylinks on cl_from = page_id wher... | {"runningtime": "17.75", "resultsets": [{"rowcount": 1, "headers": ["MIN(rev_timestamp)"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'טכנולוגיה גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to in (select page_title from page inner join categorylinks on cl_from = page_id w... | {"runningtime": "0.12", "resultsets": [{"rowcount": 1, "headers": ["MIN(log_timestamp)"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'טכנולוגיה גרעינית'
)
and page_namespace=0
) | {"connection_id": 75253787} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'פיזיקה_גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'פיזיקה_גרעינית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from ... | {"connection_id": 75253869} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'טכנולוגיה_גרעינית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'טכנולוגיה_גרעינית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title... | {"runningtime": "272.60", "resultsets": [{"rowcount": 47, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'אוסטרופיזיקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'אוסטרופיזיקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page... | {"runningtime": "1.25", "resultsets": [{"rowcount": 4, "headers": ["(concat('* [[{{subst:GENDER:', actor_name, '|\u05de\u05e9\u05ea\u05de\u05e9|\u05de\u05e9\u05ea\u05de\u05e9\u05ea}}:', actor_name, ']]'))"]}, {"rowcount": 18, "headers": ["(concat('* [[{{subst:GENDER:', actor_name, '|\u05de\u05e9\u05ea\u05de\u05e9|\u05d... | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'אסטרופיזיקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'אסטרופיזיקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page i... | {"connection_id": 75326090} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'ביופיזיקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'ביופיזיקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page inner... | {"runningtime": "339.21", "resultsets": [{"rowcount": 2221, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'כימיה_פיזיקלית'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'כימיה_פיזיקלית' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from ... | {"connection_id": 75362921} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'מכניקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'מכניקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page inner join ... | {"runningtime": "178.19", "resultsets": [{"rowcount": 2177, "headers": ["CONCAT(\"#[[\",REPLACE(pl_title,\"_\",\" \"),\"]]\")"]}]} | null |
Most edited user talk pages 2020 | ... without reverts, reverted edits, blocked users, bots etc. Edits to user own talk page are ignored. | use fiwiki_p;
select
concat("Keskustelu käyttäjästä:", page_title) as page_title,
count(distinct(rev_id)) as edits,
count(distinct(actor_name)) as editors,
count(distinct(floor(rev_timestamp/1000000))) as days,
count(distinct(IF (comment_text LIKE "%usi osio%",rev_id,NULL))) as uusi_osio
from
... | {"runningtime": "87.43", "resultsets": [{"rowcount": 1043, "headers": ["actor_name", "total"]}]} | null |
Usernames containing invalid characters not yet renamed | null | USE centralauth_p;
SELECT * FROM localuser WHERE lu_name = 'Count Count'; | {"runningtime": "0.14", "resultsets": [{"rowcount": 20, "headers": ["rev_id", "rev_page", "rev_comment_id", "rev_actor", "rev_timestamp", "rev_minor_edit", "rev_deleted", "rev_len", "rev_parent_id", "rev_sha1"]}]} | null |
Quora in enwiki | null | use enwiki_p;
select
page_title,
el_to
from
externallinks,
page
where
page_title not in (
'Quora',
'Cython',
'The_Social_Network',
'Comparison_of_Q&A_sites'
) and
el_to like '%.quora.com%' and
el_from = page_id and
page_namespace = 0; | {"runningtime": "0.16", "resultsets": [{"rowcount": 21, "headers": ["page_title"]}]} | null |
Shooting/death/killing articles with id > 66000000 | null | use enwiki_p;
select * from page
where page_id > 66000000
and page_namespace = 0
and (
page_title like 'Death%'
or page_title like 'Shooting%'
or page_title like 'Killing%'
) | {"runningtime": "0.63", "resultsets": [{"rowcount": 5, "headers": ["linter_cat", "page_namespace", "count(*)"]}, {"rowcount": 3, "headers": ["linter_cat", "count(*)", "count(distinct page_namespace)"]}, {"rowcount": 4, "headers": ["page_namespace", "count(*)", "count(distinct linter_cat)"]}]} | null |
كثافة المقالات في ويكيبيديا العربية منذ 2018 | null | use arwiki_p;
SELECT concat(year(rev_timestamp), "-", month(rev_timestamp)),count(*)
from revision
inner join page
on page_id = rev_page
where (rev_timestamp like "2019%" or rev_timestamp like "2018%" or rev_timestamp like "2020%")
and rev_parent_id = 0
and page_namespace = 0
and page_is_redirect = 0
group by year(rev... | {"runningtime": "57.43", "resultsets": [{"rowcount": 20, "headers": ["rc_namespace", "rc_title", "days"]}]} | null |
search in subcategories | returning the titles of all pages in all subcategories of a catogry, in depth=6 | use hewiki_p;
select distinct page_title from categorylinks inner join page on page_id = cl_from
where (
(cl_to = 'תרמודינמיקה'
OR
cl_to IN (select page_title from page inner join categorylinks on cl_from = page_id where cl_to = 'תרמודינמיקה' and cl_type = 'subcat' )
OR
cl_to IN (select page_title from page i... | {"runningtime": "1584.89", "resultsets": [{"rowcount": 9, "headers": ["File name", "Date", "Size", "Uploader's name"]}]} | null |
Multiple commonscat uses on one page | null | USE enwiki_p;
SELECT page_title, COUNT(tl_title) AS tcount FROM page JOIN templatelinks ON tl_from = page_id
WHERE tl_title = "Commonscat"
GROUP BY page_id
HAVING tcount > 1 | {"runningtime": "33.80", "resultsets": [{"rowcount": 37, "headers": ["actor_user"]}]} | null |
টিটোর কমন্স আপলোড তালিকা, ১ ডিসেম্বর থেকে ১৫ ডিসেম্বর (২০২০) | Titodutta Wikimedia Commons upload between 1 December and 15 December 2020 | USE commonswiki_p;
SELECT img_name
FROM image
WHERE img_actor = 5449 AND
img_timestamp BETWEEN "20201201000000" AND "20201215235959"
ORDER BY img_timestamp; | {"runningtime": "2.75", "resultsets": [{"rowcount": 9, "headers": ["actor_user"]}]} | null |
zhwp: FA articles pagelinks | null | USE zhwiki_p;
SELECT pl_title, COUNT(*)
FROM pagelinks
WHERE pl_namespace = 0
AND pl_title IN (
SELECT page_title
FROM categorylinks
LEFT JOIN page ON cl_from = page_id
WHERE cl_to = '典范条目'
)
GROUP BY pl_title | {"runningtime": "0.09", "resultsets": [{"rowcount": 0, "headers": ["Table", "Non_unique", "Key_name", "Seq_in_index", "Column_name", "Collation", "Cardinality", "Sub_part", "Packed", "Null", "Index_type", "Comment", "Index_comment"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "0.10", "resultsets": [{"rowcount": 4, "headers": ["id", "select_type", "table", "type", "possible_keys", "key", "key_len", "ref", "rows", "Extra"]}]} | null |
This week new user sandboxs with external links (arwiki) | null | USE arwiki_p;
SELECT
CONCAT('# [[مستخدم:',article.page_title,']]') as "الصفحة", MIN(revision.rev_id) as "النسخة", actor.actor_name as "المستخدم", revision.rev_actor as "معرف المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len as "حجم الصفحة"
FROM revision
inner join actor
on actor_id = rev_actor... | {"runningtime": "81.39", "resultsets": [{"rowcount": 8932, "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"]}]} | null |
This week new user sandboxs with external links (arwiki) | null | USE arwiki_p;
SELECT
CONCAT('# [[مستخدم:',article.page_title,']]') as "الصفحة", MIN(revision.rev_id) as "النسخة", actor.actor_name as "المستخدم", revision.rev_actor as "معرف المستخدم",
revision.rev_timestamp as "تاريخ الإنشاء", article.page_len as "حجم الصفحة"
FROM revision
inner join actor
on actor_id = rev_actor... | {"runningtime": "475.71", "resultsets": [{"rowcount": 79, "headers": ["page_title", "cl_to"]}]} | null |
This week new user sandboxs with external links (arwiki) | null | USE arwiki_p;
SELECT
CONCAT('# [[مستخدم:',article.page_title,']]') as "الصفحة", article.page_len as "حجم الصفحة"
FROM revision
inner join actor
on actor_id = rev_actor
INNER JOIN page article ON
article.page_id = rev_page AND
article.page_namespace = 2
INNER JOIN externallinks ON(page_id=el_from)
WHERE rev_pare... | {"runningtime": "6.23", "resultsets": [{"rowcount": 100, "headers": ["page_title", "count(*)"]}]} | null |
টিটোর কমন্স আপলোড তালিকা, ১৬ ডিসেম্বর থেকে ৩১ ডিসেম্বর (২০২০) | Titodutta Wikimedia Commons upload between 1 December and 15 December 2020 | USE commonswiki_p;
SELECT img_name
FROM image
WHERE img_actor = 5449 AND
img_timestamp BETWEEN "20201216000000" AND "20201231235959"
ORDER BY img_timestamp; | {"runningtime": "40.61", "resultsets": [{"rowcount": 10000, "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"]}]} | null |
Orphaned subpages | https://en.wikipedia.org/w/index.php?title=Wikipedia:Request_a_query&diff=779220033&oldid=779198528
Show the title of the non-redirecting subpage, not the redirecting base page. | SELECT DISTINCT CONCAT('[[{{ns:', sp.namespace, '}}:', REPLACE(sp.pagetitle, '_', ' '), ']]') AS orphan
FROM s51454__TemplateParamBot_p.enwiki_subpages AS sp
JOIN page
ON page_namespace = sp.namespace
AND page_title = sp.pagetitle
WHERE page_is_redirect = 0
ORDER BY sp.namespace, sp.pageti... | {"connection_id": 630505430} | null |
whatever thematic weeks-new ukwiki for wmua report | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(user_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', rev_user_text, '|', ']]') as user_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,... | {"connection_id": 81115857} | null |
Пишемо_про_інформаційну_безпеку-week-new | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(user_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', rev_user_text, '|', ']]') as user_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,... | {"runningtime": "0.60", "resultsets": [{"rowcount": 200, "headers": ["title"]}]} | null |
whatever thematic weeks-new ukwiki for wmua report | null | USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(user_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT('[[Користувач:', actor_name, '|', ']]') as user_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
... | {"runningtime": "0.70", "resultsets": [{"rowcount": 200, "headers": ["title"]}]} | null |
Wikimedia Commons media with Czech description needing categories | null | SELECT CONCAT('*[[:File:', page_title, ']]') AS wikitext FROM commonswiki_p.page JOIN commonswiki_p.categorylinks ON cl_from = page_id JOIN commonswiki_p.templatelinks ON tl_from = page_id WHERE page_namespace = 6 AND cl_to IN (SELECT page_title FROM commonswiki_p.categorylinks JOIN commonswiki_p.page ON cl_from = page... | {"runningtime": "1326.16", "resultsets": [{"rowcount": 999, "headers": ["page_namespace", "page_title", "rc_timestamp", "rc_this_oldid", "comment_text"]}]} | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.