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
Ulyngs
.
Toggle Highlighting
SQL
USE dawiki_p; #just means 'use this wiki' #SHOW TABLES; #DESCRIBE page; #SELECT * FROM page LIMIT 10; #make sure to limit search, otherwise we'll get everything back #SELECT * FROM revision LIMIT 10; #this is from revision table - this is much bigger than the pages one #SELECT * FROM revision ORDER by rev_timestamp DESC LIMIT 10; #show in time order - the 'DESC' or 'ASC' call comes after #SELECT rev_page FROM revision ORDER by rev_timestamp DESC limit 10; #SELECT rev_page, page_title, rev_timestamp FROM revision JOIN page ON rev_page = page_id ORDER by rev_timestamp ASC limit 10; #I want rev_page, page_title, and rev_timestamp - however, page_title is in revision table and the others in page table #so I get in one and the join the other and say where to join #SELECT * FROM user limit 10; #note that most fields here I'm not authorised to access (e.g. password) SELECT rev_page, page_title, rev_timestamp, rev_user, user_name FROM revision JOIN page ON rev_page = page_id JOIN user ON rev_user= user_id ORDER by rev_timestamp ASC limit 10;
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...