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
Certes
.
Change the WHERE line to choose the relevant portal, using underscores rather than spaces and omitting Portal: Example: WHERE page_namespace=100 AND page_title="A._H._Belo"
Toggle Highlighting
SQL
SET STATEMENT max_statement_time=1000 FOR SELECT PL1.pl_title article, MIN(CASE WHEN PL2.pl_from=PL1.pl_from THEN " " ELSE P2.page_title END) portal_1, MAX(CASE WHEN PL2.pl_from=PL1.pl_from THEN " " ELSE P2.page_title END) portal_2, COUNT(*) portal_count FROM page P1 JOIN pagelinks PL1 ON PL1.pl_from=P1.page_id AND PL1.pl_from_namespace=100 AND PL1.pl_namespace=0 JOIN pagelinks PL2 ON PL2.pl_title=PL1.pl_title AND PL2.pl_from_namespace=100 AND PL2.pl_namespace=0 JOIN page P2 ON P2.page_id=PL2.pl_from WHERE P1.page_namespace=100 AND P1.page_title="A._H._Belo" GROUP BY PL1.pl_title LIMIT 1000;
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...