Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Tewiki:Orphan pages list with creator name
by
Tester.eban.t
This query is marked as a draft
This query has been published
by
Bri
.
Toggle Highlighting
SQL
# forked from 79084 # pages that were orphans when created # filtered by creation date # it will search for articles created in the current month looking up to "SEARCH_SPAN_DAYS" in the past SET @SEARCH_SPAN_DAYS = 10; SET @ARTICLE_SPACE = 0; SET @DAY_ZERO = IF(DAY(CURRENT_DATE) > @SEARCH_SPAN_DAYS,CURRENT_DATE-@SEARCH_SPAN_DAYS,1); # Query SELECT page_title, page_id, CONCAT(DATE_FORMAT(rev_timestamp, "%Y-%m-%d")," ","foo") as "created" FROM page,revision WHERE rev_page=page_id and page_latest = rev_id and rev_parent_id=0 and rev_timestamp >= CONCAT(YEAR(CURRENT_DATE),LPAD(MONTH(CURRENT_DATE),2,'0'),LPAD(@DAY_ZERO,2,'0')) and page_title not in (select pl_title from pagelinks where pl_namespace=@ARTICLE_SPACE and pl_from_namespace=@ARTICLE_SPACE) and page_id not in (select pp_page from page_props where pp_propname="disambiguation") and page_id not in (select cl_from from categorylinks where cl_to LIKE "Orphaned_%") # ADDED and page_id not in (select cl_from from categorylinks where cl_to LIKE "Surnames") # ADDED and page_id not in (select cl_from from categorylinks where cl_to LIKE "Given_names") # ADDED and page_id not in (select cl_from from categorylinks where cl_to LIKE "Set_index%") # ADDED and page_id not in (select cl_from from categorylinks where cl_to LIKE "Redirects%") # ADDED and page_namespace = @ARTICLE_SPACE and not page_is_redirect order by page_title limit 100;
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...