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
Jdcc-berkman
.
Toggle Highlighting
SQL
# http://jan.kneschke.de/projects/mysql/order-by-rand/ # https://stackoverflow.com/questions/249301/simple-random-samples-from-a-sql-database ### All non-deleted revisions in the article namespace SELECT * FROM revision JOIN page on revision.rev_page = page.page_id WHERE rev_deleted = 0 AND page_namespace = 0 AND RAND() < 0.0001 LIMIT 100; #SELECT * FROM revision JOIN page on revision.rev_page = page.page_id WHERE rev_deleted = 0 AND page_namespace = 0 WHERE RAND() <= (20000/23654841) LIMIT 10000; ### All non-deleted revisions in the article-talk namespace #SELECT * FROM revision JOIN page on revision.page_id = page.page_id WHERE rev_deleted = 0 AND page_namespace = 1 ORDER BY RAND() LIMIT 10000; ### All non-deleted revisions in the user namespace #SELECT * FROM revision JOIN page on revision.page_id = page.page_id WHERE rev_deleted = 0 AND page_namespace = 2 ORDER BY RAND() LIMIT 10000; ### All non-deleted revisions in the user-talk namespace #SELECT * FROM revision JOIN page on revision.page_id = page.page_id WHERE rev_deleted = 0 AND page_namespace = 3 ORDER BY RAND() LIMIT 10000;
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...