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
ஃ
.
Toggle Highlighting
SQL
select ROW_NUMBER() over(order by page_title) num, case when page_namespace = 2 then CONCAT('simple.wikipedia.org/wiki/User:', replace(page_title, '_', ' '), '_') else -- Format as wikilink, check whether it is in User namespace CONCAT('[[User talk:', replace(page_title, '_', ' '), ']]') end as 'U2 worthy pages', -- Format as wikilink, check whether it is in User talk namespace page_len as 'Page length', DATE_FORMAT(rev_timestamp, '%Y-%m-%d %H:%i:%s') as 'Creation date', actor_name as 'Page creator' from revision -- Use revision table join (select -- join with page table page_namespace, page_id, page_title, page_len from page left join `user` -- join with user table, use ` to escape user keyword on user_name = replace(SUBSTRING_INDEX(page_title, '/', 1), '_', ' ') -- replace underscore with space where page_namespace in (2, 3) -- filter User and User talk namespaces and page_is_redirect = 0 -- exclude redirects -- AND page_title NOT RLIKE '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' and page_title not regexp '([0-9A-E][0-9A-E][0-9A-E]:[0-9A-E].|[1-9].|[1-9]{2}.|[1-9]{3}.)' -- exclude titles matching IP addresses and ISNULL(user_name)) as pgtmp -- Base pagename is a non existent username on pgtmp.page_id = rev_page -- join on page_id and rev_timestamp = (select -- filter the earliest timestamp from page history MIN(rev_timestamp) from revision where rev_page = pgtmp.page_id) join actor on rev_actor = actor_id -- join with actor table to get page creator's name order by page_title asc; -- arrange in ascending order
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...