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
BDA2017
.
Toggle Highlighting
SQL
USE dewiki_p; SHOW TABLES; #double join to merge on 2 tables #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; #counts occurances of something in table, returns single number (like Series.value_counts()) #SELECT COUNT(rev_id) FROM revision WHERE rev_user = "66249"; #puts everything that has same revision user underneath oneanother, then counts for each users (like .groupby.value_counts in) - rather than single user count, now count for all users SELECT COUNT(rev_id) FROM revision GROUP by rev_user LIMIT 10; #gives names to variable ("editcounts"), then order by that variable #SELECT COUNT(rev_id) AS editcounts FROM revision GROUP by rev_user ORDER BY editcounts DESC LIMIT 10; #SELECT COUNT(rev_id) AS editcounts, rev_user, user_name FROM revision JOIN user ON user_id = rev_user GROUP by rev_user ORDER BY editcounts DESC 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...