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
Huji
.
Toggle Highlighting
SQL
use fawiki_p; select log_user, user_name, str_to_date(left(log_timestamp, 8), '%Y%m%d') account_creation, str_to_date(left(firstedit, 8), '%Y%m%d') first_edit, str_to_date(left(lastedit, 8), '%Y%m%d') last_edit, total_edits, datediff(str_to_date(left(firstedit, 8), '%Y%m%d'), str_to_date(left(log_timestamp, 8), '%Y%m%d')) as pickled_days from logging join ( select rev_user, min(rev_timestamp) as firstedit from revision group by rev_user ) f on f.rev_user = log_user join ( select rev_user, max(rev_timestamp) as lastedit from revision group by rev_user ) l on l.rev_user = log_user join ( select rev_user, count(*) as total_edits from revision group by rev_user ) t on t.rev_user = log_user join user on log_user = user_id where log_action = 'newusers' and datediff(str_to_date(left(firstedit, 8), '%Y%m%d'), str_to_date(left(log_timestamp, 8), '%Y%m%d')) > 365 * 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...