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
Nettrom
.
Get revisions after a given timestamp for a given page, with a flag for whether a user is in the bot group.
Toggle Highlighting
SQL
USE enwiki_p; /* Python code commented out SELECT r.rev_user, r.rev_user_text, r.rev_timestamp, r.rev_sha1, IFNULL(ug.ug_group, 'no') AS is_bot FROM page p JOIN revision_userindex r ON p.page_id=r.rev_page LEFT JOIN (SELECT * FROM user_groups WHERE ug_group='bot') ug ON r.rev_user=ug.ug_user WHERE p.page_namespace=0 AND p.page_title=%(title)s AND r.rev_timestamp >= %(timestamp)s ORDER BY r.rev_timestamp ASC; */ SELECT r.rev_user, r.rev_user_text, r.rev_timestamp, r.rev_sha1, IFNULL(ug.ug_group, 'no') AS is_bot FROM page p JOIN revision_userindex r ON p.page_id=r.rev_page LEFT JOIN (SELECT * FROM user_groups WHERE ug_group='bot') ug ON r.rev_user=ug.ug_user WHERE p.page_namespace=0 AND p.page_title='Anarchism' AND r.rev_timestamp >= '20150416000000' ORDER BY r.rev_timestamp ASC; /* Python code commented out: SELECT r.rev_sha1 FROM revision r JOIN page p ON r.rev_page=p.page_id WHERE p.page_namespace=0 AND p.page_title=%(title)s AND r.rev_timestamp < %(timestamp)s ORDER BY r.rev_timestamp DESC LIMIT %(k)s; */ SELECT r.rev_sha1 FROM revision r JOIN page p ON r.rev_page=p.page_id WHERE p.page_namespace=0 AND p.page_title='Anarchism' AND r.rev_timestamp < '20150416000000' ORDER BY r.rev_timestamp DESC LIMIT 15;
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...