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
.
"New" here means "not linked to a portal which was created earlier"
Toggle Highlighting
SQL
SET STATEMENT max_statement_time=1000 FOR SELECT P1.page_id, P1.page_title FROM categorylinks JOIN page P1 ON P1.page_id=cl_from WHERE cl_to="Single-page_portals" AND cl_type="page" AND ((SELECT COUNT(*) FROM pagelinks PL1 WHERE PL1.pl_from=cl_from AND PL1.pl_from_namespace=100 AND PL1.pl_namespace=0 AND NOT EXISTS (SELECT 1 FROM pagelinks PL2 JOIN page P2 ON P2.page_id=PL2.pl_from WHERE PL2.pl_title=PL1.pl_title AND PL2.pl_from<PL1.pl_from AND PL2.pl_from_namespace=100 AND PL2.pl_namespace=0 AND P2.page_title NOT LIKE CONCAT(P1.page_title, "/%"))) < 20) LIMIT 1000; /* AND cl_from=58196467 /* Portal:Malda_district */
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...