Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
ArtLover12345
.
Toggle Highlighting
SQL
SET STATEMENT max_statement_time = 60 FOR # Get categories listed on file pages # SELECT pl.* # FROM pagelinks as pl # WHERE pl.pl_from_namespace = 6 # AND pl.pl_namespace = 14 # LIMIT 10 # Get all categories with paintings in title # SELECT count(*) # FROM page as p # WHERE p.page_namespace = 14 # AND lower(p.page_title) like "%painting%" # LIMIT 10 #51583 # Get all file pages linked from categories with painting in title # SELECT pl.*, p.*#count(*), count(distinct p.page_id) # FROM pagelinks pl # left join page as p on p.page_id = pl.pl_from # WHERE # p.page_namespace = 14 #AND pl.pl_namespace = 6 # AND lower(p.page_title) like "%painting%" # LIMIT 10 SELECT #pl.*, painting_cat.*, il.* count(*), count(distinct painting_cat.page_id), count(distinct il.il_to) FROM pagelinks pl INNER join (select page_id, page_title from page where page_namespace = 14 AND lower(page_title) like "%painting%") as painting_cat ON painting_cat.page_id = pl.pl_from INNER JOIN imagelinks as il ON il.il_from = pl.pl_from WHERE 0=0 #pl.pl_namespace = 6 LIMIT 100
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...