This query is marked as a draft This query has been published by Pppery.

SQL

AخA
 
set @namespace = 10;
set @slashnum = 2;
select * from page where page_namespace = @namespace and not exists (select 1 from page a where a.page_namespace = @namespace and a.page_title = SUBSTRING_INDEX(page.page_title,"/",@slashnum)) 
-- These should be cleaned up someday
and (@namespace != 10 or 
     (page_title not like "%/meta/%"
    and page_title not like "Alberta_provincial_election,%" 
    and page_title not like "British_Columbia_provincial_election,%"
    and page_title not like "Canadian_federal_election,%" ))
and (@namespace != 828 or 
    (page_title not like "Sandbox/%"
    and page_title not like "User:%"
     and (@slashnum != 2 or page_title not like "Location_map/data/%")))
limit 10000;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...