Created
June 13, 2018 20:28
-
-
Save milimetric/5f3b5a801576e4f86c2a52018f37e676 to your computer and use it in GitHub Desktop.
history query example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with users_with_revisions as ( | |
select event_user_id, | |
event_timestamp | |
from mediawiki_history | |
where event_entity = 'revision' | |
and event_type = 'create' | |
and snapshot = '2018-05' | |
and wiki_db = 'enwiki' | |
) | |
select event_user_id | |
from users_with_revisions x | |
where x.event_user_id in | |
(select event_user_id | |
from users_with_revisions | |
where event_timestamp >= '2016-11-01' | |
and event_timestamp < '2016-12-01' | |
group by event_user_id | |
) | |
and event_timestamp >= '2016-12-01' | |
and event_timestamp < '2018-06-01' | |
group by event_user_id | |
; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment