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
Superyetkin
.
Toggle Highlighting
SQL
USE trwiki_p; SELECT CONCAT('Dosya:', C.page_title) AS title, IFNULL(B.count, 0) AS count, B.temp FROM ( SELECT p.page_id, p.page_title FROM page p WHERE p.page_namespace = 6 AND EXISTS (SELECT 1 FROM templatelinks tl WHERE tl.tl_from= p.page_id AND tl.tl_from_namespace = 6 AND tl.tl_namespace = 10 AND tl.tl_title = 'SR') ) C LEFT JOIN (SELECT p.page_id, COUNT(*) AS count, CAST(GROUP_CONCAT(p2.page_title ORDER BY p2.page_title DESC) AS CHAR(200)) AS temp FROM page p LEFT JOIN imagelinks il ON il.il_from_namespace = 10 AND il.il_to = p.page_title LEFT JOIN page p2 ON il.il_from = p2.page_id WHERE p.page_namespace = 6 AND p2.page_title LIKE 'GSR/%' GROUP BY p.page_title ) B ON C.page_id = B.page_id ORDER BY B.count DESC, C.page_title ASC LIMIT 5000
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...