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
MarioGom
.
Reusable snippet with a virtual namespace table for English Wikipedia.
Toggle Highlighting
SQL
WITH namespace AS ( SELECT 0 AS namespace_id, "" AS namespace_name, FALSE AS namespace_talk, FALSE AS namespace_deprecated, FALSE AS namespace_virtual UNION SELECT 0, "", FALSE, FALSE, FALSE UNION SELECT 1, "Talk", TRUE, FALSE, FALSE, UNION SELECT 2, "User", FALSE, FALSE, FALSE, UNION SELECT 3, "User talk", TRUE, FALSE, FALSE, UNION SELECT 4, "Wikipedia", FALSE, FALSE, FALSE, UNION SELECT 5, "Wikipedia talk", TRUE, FALSE, FALSE, UNION SELECT 6, "File", FALSE, FALSE, FALSE, UNION SELECT 7, "File talk", TRUE, FALSE, FALSE, UNION SELECT 8, "MediaWiki", FALSE, FALSE, FALSE, UNION SELECT 9, "MediaWiki talk", TRUE, FALSE, FALSE, UNION SELECT 10, "Template", FALSE, FALSE, FALSE, UNION SELECT 11, "Template talk", TRUE, FALSE, FALSE, UNION SELECT 12, "Help", FALSE, FALSE, FALSE, UNION SELECT 13, "Help talk", TRUE, FALSE, FALSE, UNION SELECT 14, "Category", FALSE, FALSE, FALSE, UNION SELECT 14, "Category talk", TRUE, FALSE, FALSE, UNION SELECT 100, "Portal", FALSE, FALSE, FALSE, UNION SELECT 101, "Portal talk", TRUE, FALSE, FALSE, UNION SELECT 118, "Draft", FALSE, FALSE, FALSE, UNION SELECT 119, "Draft talk", TRUE, FALSE, FALSE, UNION SELECT 710, "TimedText", FALSE, FALSE, FALSE, UNION SELECT 711, "TimedText talk", TRUE, FALSE, FALSE, UNION SELECT 828, "Module", FALSE, FALSE, FALSE, UNION SELECT 829, "Module talk", TRUE, FALSE, FALSE, UNION SELECT 108, "Book", FALSE, TRUE, FALSE, UNION SELECT 109, "Book talk", TRUE, TRUE, FALSE, UNION SELECT 2300, "Gadget", FALSE, TRUE, FALSE, UNION SELECT 2301, "Gadget talk", TRUE, TRUE, FALSE, UNION SELECT 2302, "Gadget definition", FALSE, TRUE, FALSE, UNION SELECT 2303, "Gadget definition talk", TRUE, TRUE, FALSE, UNION SELECT -1 , "Special", FALSE, FALSE, TRUE, UNION SELECT -2 , "Media", FALSE, FALSE, TRUE ) ) SELECT * FROM namespace;
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...