title
stringlengths
1
212
description
stringlengths
1
4.39k
query
stringlengths
1
65.5k
extra_info
stringlengths
18
31.6k
wikidb
stringlengths
4
26
Lostam draft 1
null
USE hewiki_p; select * from page where page_title = "Angular.js"
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model"], "rowcount": 1}]}
null
Fa WP eliminator action review
null
use fawiki_p; select distinct log_id, user_name, CONCAT('{{ns:', ar_namespace, '}}:', ar_title) as link, log_comment, str_to_date(left(log_timestamp, 8), '%Y%m%d'), 'حذف تصویر' as issue from logging join user_groups on log_user = ug_user join user on log_user = user_id join archive on log_page = ar_page_id where ug_gro...
{"resultsets": [{"headers": ["log_id", "user_name", "link", "log_comment", "str_to_date(left(log_timestamp, 8), '%Y%m%d')", "issue"], "rowcount": 0}]}
null
Needed cats
null
use enwiki_p; select page_title, count(cl_from) cnt from page join categorylinks on page_title = cl_to left join langlinks on page_id = ll_from and ll_lang = 'fa' where page_namespace = 14 and ll_title is null group by page_title having cnt > 50 order by cnt desc limit 10;
{"resultsets": [{"headers": ["page_title", "cnt"], "rowcount": 10}]}
null
TV series suffixes in Fa WP page titles
null
use fawiki_p; select distinct page_title from page where page_is_redirect = 0 and page_namespace = 0 and page_title like '%(سری)'; select distinct page_title from page where page_is_redirect = 0 and page_namespace = 0 and page_title like '%(سریال)'; select distinct page_title from page where page_is_redirect = 0 and pa...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 0}, {"headers": ["page_title"], "rowcount": 415}, {"headers": ["page_title"], "rowcount": 131}]}
null
Zombie images
https://commons.wikimedia.org/wiki/User:Ilmari_Karonen/Queries/Zombie_images
-- 2> /dev/null; date; echo ' /* Files missing a description page * Runtime: 15 minutes <SLOW_OK> */ USE commonswiki_p; SELECT STRAIGHT_JOIN CONCAT("[[:File:", REPLACE(img_name, "_", " "), "]]", IF(page_latest=0, " (bad history)", "")) AS "File", IF(img_media_type IN ("AUDIO", "VIDEO"), "—",CONCAT("<b>[[{{ns:6}}:...
{"resultsets": [{"headers": ["File", "Status", "Timestamp", "Uploader", "Actions", "Usage", "NOT STATIC"], "rowcount": 30}]}
null
Double file extensions - Give thanks
http://commons.wikimedia.org/wiki/User:Dispenser/Double_extension
USE commonswiki_p; SELECT log_user_text, SUM(log_action="move") AS Moves, SUM(log_action="delete") AS Deletes, COUNT(*) FROM page, pagelinks, logging_logindex WHERE page_namespace=2 AND page_title="Dispenser/Double_extension" AND log_namespace=pl_namespace and log_title=pl_title AND log_action IN ("move", "delet...
{"resultsets": [{"headers": ["log_user_text", "Moves", "Deletes", "COUNT(*)"], "rowcount": 12}]}
null
InkScape default canvas (744x1052)
https://commons.wikimedia.org/wiki/User:Ilmari_Karonen/Queries/SVG_744x1052px
-- 2> /dev/null; date; echo ' /* InkScape default canvas (744x1052) * http://quarry.wmflabs.org/query/898 * * License: Public Domain * Run time: 1 min <SLOW_OK> */ USE commonswiki_p; SELECT CONCAT("File:", REPLACE(img_name, "_", " "), " | {{u|",img_user_text, DATE_FORMAT(img_timestamp,"}} on %Y-%m-%d") ) ...
{"resultsets": [{"headers": ["<gallery mode=packed>"], "rowcount": 4687}]}
null
Wikidata - wb_items_per_site - sample item
replaced by 2654
use wikidatawiki_p; SELECT ips_item_id, ips_site_id, site_language, ips_site_page from wb_items_per_site, sites WHERE ips_item_id = '5920298' #'7214533' AND ips_site_id = site_global_key #AND site_group = "wikipedia"
{"resultsets": [{"headers": ["ips_item_id", "ips_site_id", "site_language", "ips_site_page"], "rowcount": 51}]}
null
Hewiki redirections to red links
null
use hewiki_p; select page_namespace, page_title, rd_namespace, rd_title from page join redirect where rd_from = page_id and not exists (select * from page as p1 where p1.page_title = rd_title and p1.page_namespace = rd_namespace) and not (page_namespace = 0 and page_title= 'וק:חס') and not (page_namespace = 0 and page...
{"resultsets": [{"headers": ["page_namespace", "page_title", "rd_namespace", "rd_title"], "rowcount": 0}]}
null
wbc arw X
null
use lvwiki_p;/* select pl.pl_title, COUNT(pl.pl_title) from pagelinks pl where pl.pl_title="1951._gada_Tour_de_France" and pl.pl_title NOT IN (select pl3.pl_title from pagelinks pl3 where pl3.pl_namespace = 0 and pl3.pl_from=288933) limit 15; select *#pl3.pl_title from pagelinks pl join page p on p.page_id=pl.pl_from...
{"resultsets": []}
null
Most thanked users on rowiki
null
USE rowiki_p; SELECT log_title, COUNT(*) FROM logging WHERE log_type="thanks" GROUP BY log_title ORDER BY COUNT(*) DESC LIMIT 200;
{"resultsets": [{"headers": ["log_title", "COUNT(*)"], "rowcount": 200}]}
null
Longest titles in main namespace of plwiki
null
USE plwiki_p; SELECT page_title, LENGTH(page_title) AS length FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 ORDER BY length DESC LIMIT 10
{"resultsets": [{"headers": ["page_title", "length"], "rowcount": 10}]}
null
Long discussion pages on jawiki
null
USE jawiki_p; SELECT page_namespace,page_title,page_len FROM page WHERE page_namespace % 2 =1 AND page_title NOT LIKE "%過去ログ%" AND LOWER(page_title) NOT LIKE "%/archive%" AND LOWER(page_title) NOT LIKE "%/Archive%" AND LOWER(page_title) NOT LIKE "%/log%" AND LOWER(page_title) NOT LIKE "%/Log%" AND page_len > 100...
{"resultsets": [{"headers": ["page_namespace", "page_title", "page_len"], "rowcount": 726}]}
null
Vecās smilšu kastes
Code from http://quarry.wmflabs.org/query/2771
use lvwiki_p; select concat("[[:Lietotājs:",p.page_title,"]]"), p.page_len, concat("[//lv.wikipedia.org/w/index.php?title={{FULLPAGENAMEE:Lietotājs:",p.page_title,"}}&action=history Vēsture]"), concat("[//lv.wikipedia.org/w/index.php?title={{FULLPAGENAMEE:Lietotājs:",p.page_title,"}}&action=delete&wpReason=Veca%20smi...
{"resultsets": [{"headers": ["concat(\"[[:Lietot\u0101js:\",p.page_title,\"]]\")", "page_len", "concat(\"[//lv.wikipedia.org/w/index.php?title={{FULLPAGENAMEE:Lietot\u0101js:\",p.page_title,\"}}&action=history V\u0113sture]\")", "concat(\"[//lv.wikipedia.org/w/index.php?title={{FULLPAGENAMEE:Lietot\u0101js:\",p.page_ti...
null
rowiki files with possible problems (short page content)
null
USE rowiki_p; SELECT CONCAT('#[[:File:',page.page_title,']]') AS Filename, page_len FROM page WHERE page_namespace=6 AND page_is_redirect=0 AND page_len < 50 ORDER BY page_len ASC;
{"resultsets": [{"headers": ["Filename", "page_len"], "rowcount": 911}]}
null
replication lag in enwiki
null
USE enwiki_p; SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(rc_timestamp) AS replication_lag FROM recentchanges ORDER BY rc_timestamp DESC LIMIT 1;
{"resultsets": [{"headers": ["replication_lag"], "rowcount": 1}]}
null
subcategories and pages under Johann_Sebastian_Bach cat in enwiki
null
SELECT cl_from, cl_to, cl_timestamp, cl_type, p1.page_title as from_title, p2.page_id as to_page_id FROM categorylinks cl JOIN page p1 JOIN page p2 ON cl.cl_from = p1.page_id AND cl.cl_to = p2.page_title WHERE p2.page_title = "Johann_Sebastian_Bach" AND p2.page_namespace = 14;
{"resultsets": [{"headers": ["cl_from", "cl_to", "cl_timestamp", "cl_type", "from_title", "to_page_id"], "rowcount": 53}]}
null
Ten most recently created user accounts in enwiki_p
null
USE enwiki_p; SELECT u.user_id, u.user_name, NOW(), u.user_registration, u.user_editcount FROM user u ORDER BY u.user_id DESC LIMIT 10;
{"resultsets": [{"headers": ["user_id", "user_name", "NOW()", "user_registration", "user_editcount"], "rowcount": 10}]}
null
Ro.wiki cross-namespace redirects
null
USE rowiki_p; SELECT CASE rd_namespace WHEN -2 THEN "Media" WHEN -1 THEN "Special" WHEN 0 THEN ":" WHEN 1 THEN "Discuție" WHEN 2 THEN "Utilizator" WHEN 3 THEN "Discuție Utilizator" WHEN 4 THEN "Wikipedia" WHEN 5 THEN "Discuție Wikipedia" WHEN 6 THEN "File" WHEN 7 THEN "Discuție File" WHEN 8 THEN "MediaWiki" W...
{"resultsets": [{"headers": ["NS", "\u021aint\u0103", "Redirect", ""], "rowcount": 182}]}
null
Most edited articles (lvwiki)
From http://quarry.wmflabs.org/query/3588
use lvwiki_p; SELECT page_title as "Lapas_nosaukums", page_len as "Lapas_garums", count(*) AS labojumi FROM revision LEFT JOIN page ON revision.rev_page=page.page_id WHERE page_namespace=0 GROUP BY page_title ORDER BY labojumi DESC, page_title LIMIT 100
{"resultsets": [{"headers": ["Lapas_nosaukums", "Lapas_garums", "labojumi"], "rowcount": 100}]}
null
Small fawikivoyage Article
null
use fawikivoyage_p; SELECT page_title, page_len FROM page WHERE page_namespace = 0 AND page_len < 1000 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT pp_page FROM page_props WHERE pp_propname IN ('disambiguation') ) AND page_id NOT IN ( SELECT tl_from FROM templatelinks WHERE tl_title IN ('Stubbur') ) ORD...
{"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 300}]}
null
Top 25 most edited articles on plwiki
null
USE plwiki_p; SELECT rc_title, COUNT(*) AS num_edits FROM recentchanges WHERE rc_namespace = 0 GROUP BY rc_title ORDER BY num_edits DESC LIMIT 25;
{"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 25}]}
null
Template talks on plwiki
null
SELECT concat("# [[Dyskusja szablonu:",page_title,"]]") AS template_title, page_namespace FROM plwiki_p.page WHERE page_namespace = 11;
{"resultsets": [{"headers": ["template_title", "page_namespace"], "rowcount": 2001}]}
null
Wikidata - descriptions used on disambiguation items
runtime > 5 min
SELECT CURRENT_DATE; USE wikidatawiki_p; SELECT term_language, term_text, COUNT(*) FROM wb_terms JOIN wb_entity_per_page ON term_entity_id=epp_entity_id WHERE term_type='description' AND term_entity_type='item' AND epp_entity_type='item' AND epp_page_id IN ( SELECT pl_from FROM pagelinks W...
{"resultsets": [{"headers": ["CURRENT_DATE"], "rowcount": 1}, {"headers": ["term_language", "term_text", "COUNT(*)"], "rowcount": 5061}]}
null
Most linked Wikidata items from redirects
null
USE wikidatawiki_p; SELECT rd_title, COUNT(*), GROUP_CONCAT(targets.page_title ORDER BY targets.page_id ASC SEPARATOR ', ') FROM page AS redirects JOIN redirect ON rd_title = redirects.page_title AND rd_namespace = redirects.page_namespace JOIN page AS targets ON targets.page_id = rd_from WHERE redirects.page_na...
{"resultsets": [{"headers": ["rd_title", "COUNT(*)", "GROUP_CONCAT(targets.page_title ORDER BY targets.page_id ASC SEPARATOR ', ')"], "rowcount": 4041}]}
null
Wikimédia France - 2013-2014 round2 - Q3 - File usage per wiki
null
use commonswiki_p; SELECT gil_wiki as wiki, COUNT(DISTINCT page_title) AS FilesUsed, COUNT(page_title) as UsagesCount FROM page JOIN categorylinks JOIN globalimagelinks JOIN image ON image.img_name = page.page_title WHERE page.page_id=categorylinks.cl_from AND gil_to = page_title...
{"resultsets": [{"headers": ["wiki", "FilesUsed", "UsagesCount"], "rowcount": 152}]}
null
Free non-free files
null
USE enwiki_p; SELECT p.page_title FROM page p INNER JOIN categorylinks c1 ON c1.cl_from = p.page_id AND c1.cl_to = 'All_free_media' INNER JOIN categorylinks c2 ON c2.cl_from = p.page_id AND c2.cl_to = 'All_non-free_media' #INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to IN ('All_free_media', 'All_non-fr...
{"resultsets": [{"headers": ["page_title"], "rowcount": 464}]}
null
show tables
null
/*USE rowiki_p; show tables; */ use wikidatawiki_p; SELECT * FROM wb_items_per_site WHERE ips_item_id='25750';
{"resultsets": [{"headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"], "rowcount": 28}]}
null
Number of Wikimedia Commons files under CC 4.0 licenses
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page, image WHERE page.page_namespace = 6 AND page.page_title = image.img_name AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%4.0%' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Hewiki radio
null
use hewiki_p; select * from externallinks inner join page on el_from = page_id where el_to like "http://www.iba.org.il/%/player.aspx%" limit 100
{"resultsets": [{"headers": ["el_id", "el_from", "el_to", "el_index", "page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_content_model"], "rowcou...
null
Number of Wikimedia Commons files under CC-BY
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-BY-%' AND categorylinks.cl_to NOT LIKE 'CC-BY-SA%' AND categorylin...
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under CC-BY-NC
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-BY-NC%' AND categorylinks.cl_to NOT LIKE 'CC-BY-NC-SA%' AND catego...
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under CC-Zero
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-Zero' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under CC-BY-SA
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-BY-SA%' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under CC-BY-ND
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-BY-ND%' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under CC-BY-NC-SA
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-BY-NC-SA%' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Number of Wikimedia Commons files under any CC license
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(page_title) FROM page WHERE page.page_namespace = 6 AND page_id IN ( SELECT DISTINCT(cl_from) FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%' AND categorylinks.cl_to NOT LIKE '%aircraft%' );
{"resultsets": [{"headers": ["count(page_title)"], "rowcount": 1}]}
null
Total number of files on Wikimedia Commons
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(*) FROM image;
{"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]}
null
Wikimedia Commons CC files by img_major_mime
See https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(image.img_name), image.img_major_mime FROM image, page WHERE page.page_namespace = 6 AND page.page_title = image.img_name AND page_id IN ( SELECT DISTINCT cl_from FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%' ...
{"resultsets": [{"headers": ["count(image.img_name)", "img_major_mime"], "rowcount": 4}]}
null
Wikimedia Commons CC files by img_minor_mime
See https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(image.img_name), image.img_minor_mime FROM image, page WHERE page.page_namespace = 6 AND page.page_title = image.img_name AND page_id IN ( SELECT DISTINCT cl_from FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%' ...
{"resultsets": [{"headers": ["count(image.img_name)", "img_minor_mime"], "rowcount": 13}]}
null
Number of Wikimedia Commons uploaders using CC
https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT DISTINCT image.img_user FROM image, page WHERE page.page_namespace = 6 AND page.page_title = image.img_name AND page_id IN ( SELECT DISTINCT cl_from FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%' AND categorylinks....
{"resultsets": [{"headers": ["img_user"], "rowcount": 649883}]}
null
Wikimedia Commons CC files by img_media_type
See https://meta.wikimedia.org/wiki/State_of_the_Commons/2015
use commonswiki_p; SELECT count(image.img_name), image.img_media_type FROM image, page WHERE page.page_namespace = 6 AND page.page_title = image.img_name AND page_id IN ( SELECT DISTINCT cl_from FROM categorylinks WHERE categorylinks.cl_to LIKE 'CC-%' ...
{"resultsets": [{"headers": ["count(image.img_name)", "img_media_type"], "rowcount": 6}]}
null
Users with highest number of unpatrolled edits (Commons)
null
USE commonswiki_p; SELECT rc_user_text, COUNT(*) FROM recentchanges_userindex WHERE rc_patrolled = 0 GROUP BY rc_user ORDER BY COUNT(*) DESC;
{"resultsets": [{"headers": ["rc_user_text", "COUNT(*)"], "rowcount": 8558}]}
null
Wikidata - tables - wb_entity_per_page - describe table, sample data
null
use wikidatawiki_p; DESCRIBE wb_entity_per_page; SELECT * FROM wb_entity_per_page WHERE epp_entity_id = 78
{"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}, {"headers": ["epp_entity_id", "epp_entity_type", "epp_page_id", "epp_redirect_target"], "rowcount": 2}]}
null
Wikidata - tables - wb_items_per_site - describe table, sample data
null
use wikidatawiki_p; SELECT CURRENT_DATE; DESCRIBE wb_items_per_site; SELECT * FROM wb_items_per_site WHERE ips_item_id = 5 LIMIT 20; SELECT ips_site_id, count(*) from wb_items_per_site GROUP BY ips_site_id order by count(*) desc;
{"resultsets": [{"headers": ["CURRENT_DATE"], "rowcount": 1}, {"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}, {"headers": ["ips_row_id", "ips_item_id", "ips_site_id", "ips_site_page"], "rowcount": 20}, {"headers": ["ips_site_id", "count(*)"], "rowcount": 621}]}
null
Wikidata - list of properties (English labels)
null
use wikidatawiki_p; SELECT CURRENT_DATE; SELECT CONCAT('P', term_entity_id), term_text from wb_terms WHERE term_entity_type = 'property' AND term_language = 'en' and term_type = 'label' ORDER bY term_entity_id desc;
{"resultsets": [{"headers": ["CURRENT_DATE"], "rowcount": 1}, {"headers": ["CONCAT('P', term_entity_id)", "term_text"], "rowcount": 1873}]}
null
Pāradresācijas uz ārējiem resursiem
null
use lvwiki_p; SELECT page_id, page_namespace, page_title, el_to FROM page JOIN externallinks ON el_from=page_id WHERE page_is_redirect=1 ORDER BY el_index
{"resultsets": [{"headers": ["page_id", "page_namespace", "page_title", "el_to"], "rowcount": 0}]}
null
Enwiki accounts with >1 edit
null
USE enwiki_p; SELECT count(user_id) FROM user WHERE user_editcount >= 1 ;
{"resultsets": [{"headers": ["count(user_id)"], "rowcount": 1}]}
null
test
null
USE rowiki_p; SELECT page_title, rd_title, COUNT(*) as edits FROM revision INNER JOIN page ON rev_page = page_id INNER JOIN redirect ON rev_page = rd_from WHERE page_namespace = 0 and rd_title = "Lista_botaniștilor_după_abrevierea_de_autor" AND page_is_redirect = 1 GROUP BY page_title HAVING COUNT(*) > 4;
{"resultsets": [{"headers": ["page_title", "rd_title", "edits"], "rowcount": 0}]}
null
Number of users per global group
null
SELECT gug_group, COUNT(*) FROM centralauth_p.global_user_groups GROUP BY gug_group ORDER BY 2 DESC;
{"resultsets": [{"headers": ["gug_group", "COUNT(*)"], "rowcount": 23}]}
null
Users in Wikiviajes por Venezuela 2014
List creators and creation date for Wikimedia commons files in category "Wikiviajes por Venezuela 2014"
#1 SELECT rev_user_text, rev_user, rev_id, rev_timestamp, page_title, cl_to #2 FROM commonswiki_p.page p #3 INNER JOIN commonswiki_p.categorylinks cl ON p.page_id = cl.cl_from #4 INNER JOIN commonswiki_p.revision r ON p.page_id = r.rev_page #5 WHERE p.page_namespace = 6 #6 AND cl.cl_to IN ("Wikiviajes_por_Venezuela...
{"resultsets": [{"headers": ["rev_user_text", "rev_user", "rev_id", "rev_timestamp", "page_title", "cl_to"], "rowcount": 14160}]}
null
Most linked redirects in lvwiki
http://quarry.wmflabs.org/query/1278
USE lvwiki_p; SELECT page_title, COUNT(*), rd_title FROM (SELECT * FROM page WHERE page_is_redirect = 1 AND page_namespace = 0) AS redirs JOIN (SELECT * FROM pagelinks WHERE pl_from_namespace = 0) AS pages ON pl_title = page_title AND pl_namespace = page_namespace JOIN redirect ON rd_from = page_id GROUP BY page...
{"resultsets": [{"headers": ["page_title", "COUNT(*)", "rd_title"], "rowcount": 500}]}
null
Muml draft
null
use hewiki_p; select * from categorylinks join page on cl_from = page_id and cl_to = "ערכים_מומלצים" where exists (select * from pagelinks where cl_from = pl_from and exists (select * from categorylinks as cl1 where cl1.cl_from = pl_title and cl1.cl_to = "פירושונים")) and not exists (select * from categorylinks ...
{"resultsets": [{"headers": ["cl_from", "cl_to", "cl_sortkey", "cl_timestamp", "cl_sortkey_prefix", "cl_collation", "cl_type", "page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len"...
null
Most used modules (lvwiki)
Can be some other Wikipedia's stats, if I need them
USE ruwiki_p; SELECT Concat('[[Module:',tl_title,']]'), COUNT(tl_title) FROM templatelinks where tl_namespace=828# and tl_from_namespace=0 and tl_title not like "Statistical/%" group by tl_title order by COUNT(tl_title) desc limit 200 /* USE cswiki_p; SELECT Concat('* [[Module:',tl_title,']] - '), COUNT(tl_title) FROM ...
{"resultsets": [{"headers": ["Concat('[[Module:',tl_title,']]')", "COUNT(tl_title)"], "rowcount": 200}]}
null
XSS vulnerability demo
Quarry does not escape HTML tags.
-- https://bugzilla.wikimedia.org/show_bug.cgi?id=72414 SELECT "<script>alert('foo');</script>";
{"resultsets": [{"headers": ["<script>alert('foo');</script>"], "rowcount": 1}]}
null
wplv ruwiki pages
null
use ruwiki_p; select p.page_title, count(l.ll_lang) from langlinks l join page p on l.ll_from=p.page_id where p.page_title in (select p2.page_title from templatelinks tl join page p2 on tl.tl_namespace=p2.page_namespace and p2.page_id=tl.tl_from where tl.tl_from_namespace=10 and tl.tl_namespace=1 and ...
{"resultsets": [{"headers": ["page_title", "count(l.ll_lang)"], "rowcount": 0}]}
null
Artiklid, mille arutelu on ümbersuunamine
null
USE etwiki_p; SELECT CONCAT('* [[', art.page_title ,']], [[Arutelu:', talk.page_title, ']]') as talkpage FROM page AS talk JOIN page AS art ON talk.page_title = art.page_title WHERE art.page_is_redirect = 0 AND art.page_namespace = 0 AND talk.page_namespace = 1 AND talk.page_is_redirect = 1;
{"resultsets": [{"headers": ["talkpage"], "rowcount": 308}]}
null
Survived editors on plwiki
null
USE plwiki_p; SELECT CONCAT(month, '-', year) AS monthly, SUM(period < 7) AS less_than_1_week, SUM(period BETWEEN 7 AND 30) AS 1_week_to_1_month, SUM(period BETWEEN 31 AND 365) AS 1_month_to_1year, SUM(period > 365) AS more_than_1_year FROM ( SELECT SUBSTR(first, 5, 2) AS month, SUBSTR(first, 1, 4) AS year, TIMESTAMPDI...
{"resultsets": [{"headers": ["monthly", "less_than_1_week", "1_week_to_1_month", "1_month_to_1year", "more_than_1_year"], "rowcount": 157}]}
null
enWS PoM April 2015 edit-in-namespace detail summary
enWS PoM April 2015 edit-in-namespace detail summary
SELECT edt.rev_user_text as 'Editor', ndx.page_title as 'Work', sum(edp.page_namespace = 104) as 'Page-space: edits', sum(edp.page_namespace = 106) as 'Index-space: edits', sum(edp.page_namespace = 0) as 'Main-space: edits', COUNT(edp.page_id)-sum(edp.page_namespace in (0,104,106)) AS 'Other edi...
{"resultsets": [{"headers": ["Editor", "Work", "Page-space: edits", "Index-space: edits", "Main-space: edits", "Other edits"], "rowcount": 25}]}
null
Wikidata - table - page_props - describe, sample data
null
use wikidatawiki_p; describe page_props; SELECT * FROM page_props LIMIT 50; SELECT * FROM page_props WHERE pp_page = 133; #page_id of item Q5 SELECT pp_propname, COUNT(*) FROM page_props GROUP BY pp_propname; SELECT pp_value, COUNT(*) As ct_of_items_with_this_number_of_sitelinks FROM page_props WHERE pp_propname="wb-...
{"resultsets": [{"headers": ["Field", "Type", "Null", "Key", "Default", "Extra"], "rowcount": 4}, {"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 50}, {"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 3}, {"headers": ["pp_propname", "COUNT(*)"], "rowcount": 20},...
null
Mathematics Genealogy Project id not in Wikidata
Test
SELECT DISTINCT CONVERT(enp.page_title USING UTF8) AS page_title FROM cawiki_p.`page` enp, cawiki_p.templatelinks entl, cawiki_p.page_props, wikidatawiki_p.page wdp LEFT JOIN wikidatawiki_p.pagelinks wdpl ON wdpl.pl_from = wdp.page_id AND wdpl.pl_title = 'P549' AND wdpl.pl_namespace = 120 WHERE enp.page_namespace = 0 A...
{"resultsets": [{"headers": ["page_title"], "rowcount": 0}]}
null
6073 re-run
null
USE rowiki_p; SELECT page_title#, cl_to FROM categorylinks JOIN (SELECT * FROM page WHERE page_namespace = 0) AS pages ON page_id = cl_from LEFT JOIN (SELECT * FROM page_props WHERE pp_propname = 'defaultsort') AS sorted ON pp_page = cl_from WHERE cl_to LIKE 'Nașteri%' #WHERE cl_to LIKE 'Decese%' AND pp_value IS...
{"resultsets": [{"headers": ["page_title"], "rowcount": 1665}]}
null
Uncategorized commons images used in rowiki
null
USE commonswiki_p; SELECT concat("File:",page_title) FROM page INNER JOIN templatelinks ON tl_from = page_id and tl_title = 'Uncategorized' -- files transcluding {{Uncategorized}} inner join image on page_namespace = 6 and page_title = img_name LEFT OUTER JOIN globalimagelinks on gil_to = page_title WHERE gil_wiki =...
{"resultsets": [{"headers": ["concat(\"File:\",page_title)"], "rowcount": 1407}]}
null
nothing, as usual :) just another space for testing
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries#Links_to_a_particular_page
USE lvwiki_p; select count(rev_page) from revision where rev_comment like "Typo labošana. Skatīt arī%";/*USE lvwiki_p; SELECT *#p.page_title, COUNT(pl.pl_from) from pagelinks pl# ON p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace left join redirect r on r.rd_from=pl.pl_from #šo pagelinks jāsavieno ar ...
{"resultsets": [{"headers": ["count(rev_page)"], "rowcount": 1}]}
null
50 most edited pages on rowiki in the last month
null
USE rowiki_p; SELECT rc_title, COUNT(*) AS num_edits FROM recentchanges WHERE rc_namespace = 0 GROUP BY rc_title ORDER BY num_edits DESC LIMIT 50;
{"resultsets": [{"headers": ["rc_title", "num_edits"], "rowcount": 50}]}
null
Visvairāk novēršanas
TODO: lapu aizsardzība (https://www.mediawiki.org/wiki/Manual:Page_restrictions_table)
use lvwiki_p; Select Count(r.rev_page), f.page_title from revision r join page f on f.page_id=r.rev_page where f.page_namespace=0 and (r.rev_comment like "Reverted%" or r.rev_comment like "Atcēlu%" or r.rev_comment like "Novērsu%") group by r.rev_page order by Count(r.rev_page) DESC limit 100; /*ar lapu aizsardzību use...
{"resultsets": [{"headers": ["Count(r.rev_page)", "page_title"], "rowcount": 100}]}
null
Latest created Wikiproject Latvia articles (enwiki)
null
use enwiki_p; select p.page_title, p.page_id from page p where p.page_namespace=0 and p.page_title in (select pla.page_title from categorylinks cla join page pla on cla.cl_from=pla.page_id# and cla.tl_from_ where p.page_title=pla.page_title and pla.page_namespace=1 and cla.cl_type="page" and cla.cl_to="WikiProjec...
{"resultsets": [{"headers": ["page_title", "page_id"], "rowcount": 100}]}
null
number of user and user_talk pages on rowiki
null
use rowiki_p; Select Count(*) from page where page_namespace = 2; Select Count(*) from page where page_namespace = 3; Select Count(*) from rowiki_p.user;
{"resultsets": [{"headers": ["Count(*)"], "rowcount": 1}, {"headers": ["Count(*)"], "rowcount": 1}, {"headers": ["Count(*)"], "rowcount": 1}]}
null
Latvijas ciemi
vaicājums1 use lvwiki_p; select *#pl.pl_title from pagelinks pl join page p on p.page_id=pl.pl_from right join page pv on pv.page_title=pl.pl_title where pl.pl_title not like "%ciemu_uzskaitījums"#pl.pl_from=248353 and and pl.pl_namespace=0 and pl.pl_from_namespace=0 and p.page_title like "%ciemu_uzskaitījums" li...
use lvwiki_p; select pl.pl_title from pagelinks pl join page p on p.page_id=pl.pl_from #right join page pv on pv.page_title=pl.pl_title where pl.pl_title not like "%ciemu_uzskaitījums"#pl.pl_from=248353 and and pl.pl_namespace=0 and pl.pl_from_namespace=0 and p.page_title like "%ciemu_uzskaitījums" and pl.pl_...
{"resultsets": [{"headers": ["pl_title"], "rowcount": 7538}]}
null
Articles by a given user on plwiki
null
USE plwiki_p; SELECT CONCAT('# [[', page_title, ']]') AS page_title, page_len FROM page, revision WHERE page.page_id = revision.rev_page AND rev_user_text = 'The Polish' AND page_namespace = 0 AND rev_parent_id = 0 AND page_is_redirect = 0 ORDER BY page_len
{"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 104}]}
null
Templates transcluded on the most pages (lvwiki)
From Wikipedia:Database reports/Templates transcluded on the most pages/Configuration
use lvwiki_p; SELECT tl_title, COUNT(*) FROM templatelinks WHERE tl_namespace = 10 and tl_from_namespace=10# tl_from_namespace=0 GROUP BY tl_title ORDER BY COUNT(*) DESC LIMIT 1000;
{"resultsets": [{"headers": ["tl_title", "COUNT(*)"], "rowcount": 1000}]}
null
Most used template redirects in rowiki
null
USE rowiki_p; select DISTINCT concat("*[[Format:",page_title,"]]") as Format, count(*) as total from page join templatelinks on page_title = tl_title and tl_namespace = 10 where page_namespace = 10 AND page_is_redirect = 1 and page_title not in (select pt_title from protected_titles where pt_namespace = 10) group by ...
{"resultsets": [{"headers": ["Format", "total"], "rowcount": 200}]}
null
pages with duplicate argument which are not in main, file or category namespace on commons
null
Use commonswiki_p; select page_title, page_namespace from page JOIN categorylinks ON cl_from = page_id WHERE cl_to = "Pages_using_duplicate_arguments_in_template_calls" AND NOT (page_namespace = 0 OR page_namespace = 6 OR page_namespace = 14) Limit 500;
{"resultsets": [{"headers": ["page_title", "page_namespace"], "rowcount": 476}]}
null
Did you know 2015 subpages on plwiki
null
USE plwiki_p; SELECT CONCAT('Wikiprojekt:',page_title) AS page_title FROM page WHERE page_title LIKE 'Czy_wiesz/ekspozycje/2015%' AND page_namespace = 102 ORDER BY page_title;
{"resultsets": [{"headers": ["page_title"], "rowcount": 365}]}
null
Miršanas gadu kateg. bez mirgads veidnes
null
use lvwiki_p; Select p.page_title from page p where p.page_namespace=14 and p.page_title like "%gadā_dzimušie" and p.page_id not in (select tl.tl_from from templatelinks tl where tl.tl_title="Dzimgads" and tl.tl_namespace=10 and tl.tl_from_namespace=14) limit 1000;
{"resultsets": [{"headers": ["page_title"], "rowcount": 20}]}
null
Daily anonymous mobile edits, Portuguese Wikipedia
see http://quarry.wmflabs.org/query/1242 , http://quarry.wmflabs.org/query/2256 http://quarry.wmflabs.org/query/2634 https://quarry.wmflabs.org/query/3376 http://www.gossamer-threads.com/lists/wiki/wikitech/582998 https://meta.wikimedia.org/wiki/Research:Mobile_anonymous_apocalypse
USE ptwiki_p; SELECT LEFT(rev_timestamp, 8) AS date, COUNT(*) FROM revision_userindex INNER JOIN tag_summary ON ts_rev_id = rev_id AND ts_tags LIKE "%mobile web edit%" WHERE rev_timestamp BETWEEN "20150101" AND "20151213" AND rev_user = 0 GROUP BY date;
{"resultsets": [{"headers": ["date", "COUNT(*)"], "rowcount": 271}]}
null
WD Descriptions with //
null
USE wikidatawiki_p; SELECT CONCAT("Q",term_entity_id), term_language, term_text FROM wb_terms WHERE term_type="description" AND term_entity_type="item" AND term_text LIKE "% //%";
{"resultsets": [{"headers": ["CONCAT(\"Q\",term_entity_id)", "term_language", "term_text"], "rowcount": 22}]}
null
WD Descriptions with --
null
USE wikidatawiki_p; SELECT CONCAT("Q",term_entity_id), term_language, term_text FROM wb_terms WHERE term_type="description" AND term_entity_type="item" AND term_text LIKE "% --%";
{"resultsets": [{"headers": ["CONCAT(\"Q\",term_entity_id)", "term_language", "term_text"], "rowcount": 13}]}
null
List of items using "nl-informal"
null
USE wikidatawiki_p; SELECT concat("Q", term_entity_id), term_type FROM wb_terms WHERE term_language="nl-informal" AND term_entity_type="item"
{"resultsets": [{"headers": ["concat(\"Q\", term_entity_id)", "term_type"], "rowcount": 4}]}
null
unused non-redirected categories on rowiki
defect
USE rowiki_p; #select * from page /*join categorylinks*/ where page_id = "39407"; #select * from category where cat_title = "Pagini_de_categorisit"; /* show columns from category; show columns from categorylinks;*/ SELECT CONCAT("Categorie:",cat_title) FROM category JOIN page ON cat_title = page_title AND page_namesp...
{"resultsets": [{"headers": ["CONCAT(\"Categorie:\",cat_title)"], "rowcount": 3382}]}
null
Most frequent used categories on plwiki
null
USE plwiki_p; SELECT * FROM category ORDER BY cat_pages DESC LIMIT 400;
{"resultsets": [{"headers": ["cat_id", "cat_title", "cat_pages", "cat_subcats", "cat_files"], "rowcount": 400}]}
null
Unpatrolled edits on plwiki
null
USE plwiki_p; SELECT page_title FROM page WHERE page_title LIKE '%-%' AND page_namespace = 14 ORDER BY page_title ASC; SELECT page_title FROM page WHERE page_title LIKE '%_-_%' AND page_namespace = 14 ORDER BY page_title ASC; SELECT page_title FROM page WHERE page_title LIKE '%–%' AND page_namespace = 14 ORDER BY page_...
{"resultsets": [{"headers": ["page_title"], "rowcount": 8162}, {"headers": ["page_title"], "rowcount": 8162}, {"headers": ["page_title"], "rowcount": 787}, {"headers": ["page_title"], "rowcount": 787}]}
null
Most frequent external links in articles on plwiki
null
USE plwiki_p; SELECT url, COUNT(*) FROM ( SELECT SUBSTRING_INDEX(SUBSTRING(el_to, LOCATE('://', el_to) + 3), '/', 1) url FROM externallinks WHERE el_from IN ( SELECT page_id FROM page WHERE page_namespace = 0 ) ) tmp_table GROUP BY url HAVING COUNT(*) > 100 ORDER BY COUNT(*) DESC;
{"resultsets": [{"headers": ["url", "COUNT(*)"], "rowcount": 2454}]}
null
rowiki tables, columns
null
use rowiki_p; #show tables; #SHOW COLUMNS FROM protected_titles; #SHOW COLUMNS FROM page_restrictions; #SHOW COLUMNS FROM pagelinks; #SHOW COLUMNS FROM page; #SHOW COLUMNS FROM hitcounter; #SHOW COLUMNS FROM page_props /* SHOW COLUMNS FROM externallinks; SHOW COLUMNS FROM revision; */ #SHOW COLUMNS FROM templatelinks; ...
{"resultsets": [{"headers": ["pp_page", "pp_propname", "pp_value", "pp_sortkey"], "rowcount": 2}]}
null
Edgars2007's testing area - links to orphan articles
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries
use lvwiki_p; SELECT pl.pl_namespace, pl.pl_title, count(pl.pl_from), pl.pl_from_namespace#p.page_title, COUNT(pl.pl_from) from pagelinks pl where pl.pl_namespace=0 and pl.pl_from_namespace=0 and /*pl.pl_from_namespace=0 and - svarīgi arī veidnēs izvākt*/ pl.pl_title in (SELECT p2.page_title from pagelinks pl2 join ...
{"resultsets": [{"headers": ["pl_namespace", "pl_title", "count(pl.pl_from)", "pl_from_namespace"], "rowcount": 0}]}
null
Giornali
null
USE itwiki_p; SELECT count(*) FROM externallinks WHERE el_to LIKE "%.ft.com%" OR el_to LIKE "%.wsj.com%" OR el_to LIKE "%.nytimes.com%" OR el_to LIKE "%ilsole24ore.com%";
{"resultsets": [{"headers": ["count(*)"], "rowcount": 1}]}
null
File:Screen shot YYYY-MM-DD at hh:mm:ss
null
USE commonswiki_p; SELECT p.page_title FROM page p LEFT JOIN categorylinks c ON p.page_id = c.cl_from AND c.cl_to IN ('Screenshots_with_bad_file_names', 'Screenshots_of_PD_files_with_bad_file_names_needing_rename', ...
{"resultsets": [{"headers": ["page_title"], "rowcount": 608}]}
null
Sandbox
Sandbox stuff.
USE plwiki_p; SELECT page_id, page_title FROM page JOIN categorylinks WHERE cl_to="Artykuły_wymagające_uzupełnienia_źródeł_od_2007-01" AND page_namespace=0;
{"resultsets": [{"headers": ["page_id", "page_title"], "rowcount": 3041146}]}
null
Nothing
SELECT #CONCAT('#[[:Attēls:',DISTINCT(lvwiki_p.page.page_title),']]') as "Nosaukums lvwiki", DISTINCT(lvwiki_p.page.page_title) as "Nosaukums lvwiki", commonswiki_p.image.img_name as "Nosaukums Commons", lvwiki_p.imagelinks.il_from FROM lvwiki_p.image, commonswiki_p.image, lvwiki_p.categorylinks, lvwiki_p.page jo...
use lvwiki_p; Select p.page_namespace, p.page_title from page p where p.page_is_redirect=0 and p.page_title regexp '[āēīū]\\)' order by p.page_namespace, p.page_title; use lvwiki_p; Select p.page_namespace, p.page_title from pagelinks pl join page p on p.page_is_redirect=0 and pl.pl_title=p.page_title where pl.pl_titl...
{"resultsets": [{"headers": ["page_namespace", "page_title"], "rowcount": 20}, {"headers": ["page_namespace", "page_title"], "rowcount": 97}]}
null
Count of thanks at Telugu, Kannada, Odiya, Konkani, Marathi wikis in last six months
null
USE tewiki_p; SELECT LEFT(log_timestamp, 6) as month, COUNT(*) FROM logging WHERE log_type="thanks" GROUP BY month; USE knwiki_p; SELECT LEFT(log_timestamp, 6) as month, COUNT(*) FROM logging WHERE log_type="thanks" GROUP BY month; USE orwiki_p; SELECT LEFT(log_timestamp, 6) as month, COUNT(*) FROM logging WHERE log...
{"resultsets": [{"headers": ["month", "COUNT(*)"], "rowcount": 29}, {"headers": ["month", "COUNT(*)"], "rowcount": 29}, {"headers": ["month", "COUNT(*)"], "rowcount": 28}, {"headers": ["month", "COUNT(*)"], "rowcount": 3}, {"headers": ["month", "COUNT(*)"], "rowcount": 26}]}
null
<lang> Mathematiker w/o MGP id
null
SELECT DISTINCT concat('[[', replace(enp.page_title, '_', ' '), ']]<br/>') AS title FROM eswiki_p.`page` enp, eswiki_p.categorylinks encl, eswiki_p.page_props, wikidatawiki_p.page wdp LEFT JOIN wikidatawiki_p.pagelinks wdpl ON wdpl.pl_from = wdp.page_id AND wdpl.pl_title = 'P549' AND wdpl.pl_namespace = 120 WHERE enp.p...
{"resultsets": [{"headers": ["title"], "rowcount": 60}]}
null
مقاله‌ها با عنوان‌هایی با بیش از یک ویرگول یا یک ویرگول و نویسه‌ای غیرفارسی‌عربی
https://fa.wikipedia.org/w/index.php?title=%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%D8%AA%D8%A7%D8%A8%D9%84%D9%88%DB%8C_%D8%A7%D8%B9%D9%84%D8%A7%D9%86%D8%A7%D8%AA_%D8%B1%D8%A8%D8%A7%D8%AA%E2%80%8C%D9%87%D8%A7&oldid=16388729#.D8.A7.D9.86.D8.AA.D9.82.D8.A7.D9.84_.D8.B9.D9.86.D9.88.D8.A7.D9.86.2F.D9.88.D...
use fawiki_p; select page_title from page left join redirect on rd_from = page_id where page_namespace = 0 and rd_from is Null and page_title like '%،%' and ( page_title like '%،%،%' or not page_title rlike '^[؀-ۿ\s_]*$' ) ;
{"resultsets": [{"headers": ["page_title"], "rowcount": 6671}]}
null
tests
null
/*use rowiki_p; SELECT * FROM page WHERE page_title = 'Olt'*/ use frwiki_p; select page_title, ll_title, page_len from page join langlinks on page_id=ll_from and page_namespace=0 and ll_lang="pl" join categorylinks on cl_from=page_id join revision on page.page_id = revision.rev_page where cl_to = "Astéroïde_de_la_ceint...
{"resultsets": [{"headers": ["page_title", "ll_title", "page_len"], "rowcount": 15}]}
null
Commons files with no machine-readable licenses that are used more than 20 times
null
USE commonswiki_p; SELECT page_title, COUNT(*) AS links FROM categorylinks INNER JOIN page ON cl_from = page_id INNER JOIN globalimagelinks ON page_title = gil_to WHERE cl_to="Files_with_no_machine-readable_license" GROUP BY gil_to HAVING links > 20 ORDER BY links DESC;
{"resultsets": [{"headers": ["page_title", "links"], "rowcount": 2}]}
null
Commons files with no machine-readable sources that are used more than 1000 times
null
USE commonswiki_p; SELECT page_title, COUNT(*) AS links FROM categorylinks INNER JOIN page ON cl_from = page_id INNER JOIN globalimagelinks ON page_title = gil_to WHERE cl_to="Files_with_no_machine-readable_source" GROUP BY gil_to HAVING links > 1000 ORDER BY links DESC;
{"resultsets": [{"headers": ["page_title", "links"], "rowcount": 1758}]}
null
Hewiki partial people articles list without defaultsort
null
USE hewiki_p; SELECT distinct(concat('# [[', replace(page_title, "_", " "), ']]')) as 'שם_הערך_לבדיקה_של_מיון_מהיר' FROM categorylinks INNER JOIN page ON page_id=cl_from AND page_namespace=0 LEFT JOIN page_props ON pp_propname ='defaultsort' AND pp_page=cl_from WHERE (cl_to LIKE '%אישים%' OR cl_to LIKE '%שחקני%') AND p...
{"resultsets": [{"headers": ["\u05e9\u05dd_\u05d4\u05e2\u05e8\u05da_\u05dc\u05d1\u05d3\u05d9\u05e7\u05d4_\u05e9\u05dc_\u05de\u05d9\u05d5\u05df_\u05de\u05d4\u05d9\u05e8"], "rowcount": 147}]}
null
Small elwiki articles not marked as stubs
null
use elwiki_p; SELECT page_title, page_len FROM page WHERE page_namespace = 0 AND page_len < 1000 AND page_is_redirect = 0 AND page_id NOT IN ( SELECT pp_page FROM page_props WHERE pp_propname IN ('αποσαφήνιση') ) AND page_id NOT IN ( SELECT pp_page FROM page_props WHERE pp_propname IN ('π.Χ.') ) AND page_id N...
{"resultsets": [{"headers": ["page_title", "page_len"], "rowcount": 3000}]}
null
رده‌های فاقد پیوند زبانی که برچسب {{رده بهتر}} ندارند
بهینه‌تر (سریع‌تر) و دقیق‌تر (مورد انتظارتر) از آنچه در [[وپ:اس‌کیوال]] وجود داشت
USE fawiki_p; SELECT page_title FROM page LEFT JOIN langlinks ON page_id = ll_from WHERE page_namespace = 14 AND ll_from IS NULL AND NOT EXISTS ( SELECT NULL FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'رده_بهتر' )
{"resultsets": [{"headers": ["page_title"], "rowcount": 35912}]}
null
رده‌هایی غیرتغییرمسیر که از عنوان «کشور کره» استفاده کرده‌اند
null
USE fawiki_p; SELECT page_title FROM page WHERE page_namespace = 14 AND page_title LIKE '%کشور_کره%' AND NOT EXISTS ( SELECT NULL FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'رده_بهتر' )
{"resultsets": [{"headers": ["page_title"], "rowcount": 166}]}
null
الگوهایی استفاده‌شده در جعبهٔ اطلاعات آرگون
null
use fawiki_p; select * from templatelinks left join page on page_title = tl_title and page_namespace = tl_namespace where tl_from = 627265 -- الگو:جعبه اطلاعات آرگون
{"resultsets": [{"headers": ["tl_from", "tl_namespace", "tl_title", "tl_from_namespace", "page_id", "page_namespace", "page_title", "page_restrictions", "page_counter", "page_is_redirect", "page_is_new", "page_random", "page_touched", "page_links_updated", "page_latest", "page_len", "page_no_title_convert", "page_conte...
null