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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE cswikisource_p; SELECT A.page_namespace, A.page_title, COUNT(*) AS links, SUM(IF(B.page_title IS NULL, 0, 1)) AS blue, SUM(B.page_is_redirect) AS redirs FROM page AS A JOIN pagelinks ON pl_from = A.page_id LEFT JOIN page AS B ON pl_title = B.page_title AND pl_namespace = B.page_namespace # to namespace WHERE pl_namespace = 0 # from page AND A.page_namespace = 0 AND A.page_title IN ('Ottův_slovník_naučný/Díl_dvacátýšestý'/*, ... */) # AND A.page_id INT (SELECT cl_from FROM categorylinks WHERE cl_to = 'Název_Kategorie') GROUP BY A.page_namespace, A.page_title; SELECT page_namespace, page_title, FROM page WHERE page_namespace = 0 LIMIT 1;
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...