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
Maximilianklein
.
Toggle Highlighting
SQL
select randdates.date, u.user_id, u.user_name, u.user_registration, r.rev_timestamp, r.rev_id from ((select a.Date from ( select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c ) a where a.Date between '2017-01-01' and '2018-01-01' order by rand() limit 1) randdates left join ruwiki_p.user u on u.user_registration >= DATE_FORMAT(randdates.date,'%Y%m%d%H%i%s') and u.user_registration < DATE_FORMAT(date_add(randdates.date, interval 1 day),'%Y%m%d%H%i%s') left join ruwiki_p.revision_userindex r on u.user_id = r.rev_user and datediff( STR_TO_DATE(r.rev_timestamp, '%Y%m%d%H%i%s'), STR_TO_DATE(u.user_registration, '%Y%m%d%H%i%s')) < 2 ;
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...