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 rev_user_text, str_to_date(left(min(rev_timestamp), 8), '%Y%m%d') as sunrise, str_to_date(left(min(sunset), 8), '%Y%m%d') as sunset, old_edits, count(rev_id) as recent_edits, GROUP_CONCAT(DISTINCT(ug_group)) as groups from revision join ( select rev_user old_user, max(rev_timestamp) sunset, count(rev_id) as old_edits from revision where rev_user <> 0 and rev_timestamp < concat(year(curdate()) - 3, LPAD(month(curdate()) , 2, 0), '01000000') group by rev_user ) old on old_user = rev_user join user_groups on rev_user = ug_user where rev_user <> 0 and rev_timestamp > concat(year(curdate()) , LPAD(month(curdate()) , 2, 0), '01000000') and rev_user not in ( select rev_user from revision where rev_user <> 0 and rev_timestamp < concat(year(curdate()) , LPAD(month(curdate()) , 2, 0), '01000000') and rev_timestamp > concat(year(curdate()) - 3, LPAD(month(curdate()) , 2, 0), '01000000') ) group by rev_user_text
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...