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
Bertievidgen
.
Toggle Highlighting
SQL
#SHOW DATABASES; USE simplewiki_p; #SHOW TABLES; #DESCRIBE page; #SELECT * FROM revision ORDER by rev_timestamp LIMIT 10; #select everything from revision, orderd by the timestamps, limited to 10 entries #SELECT rev_page FROM revision ORDER by rev_timestamp ASC limit 10 #select only the rev_page from revision, ordered by the timestamps, limited to 10 entries (displayed in ascending order). #DESC = 'descending order' (so limit to 10, in descending order) #select the revision pages from the table 'revision', order them by the revision timestamps and then put in descending order, limiting to 10 entries. #SELECT rev_page, page_title, rev_timestamp FROM revision JOIN page ON rev_page = page_id ORDER by rev_timestamp ASC limit 10 #join them together if ... No, not sure what we are meant to be doing here. #SELECT * FROM user limit 10; #select all entries from 'user', limited to 10 entries. #we can also do a double join... # #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; #SELECT COUNT(rev_id) FROM revision WHERE rev_user="66249"; #the command WHERE is much like IF - "only do x IF y is true". #SELECT = 'report' the COUNT for the column rev_id in the table revision, but only where (IF) the rev_user = specificUserOne. SELECT COUNT(rev_id) FROM revision GROUP by rev_user 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...