Created
March 9, 2015 13:03
-
-
Save lbadura/a7403462a50e00ed2ba4 to your computer and use it in GitHub Desktop.
WAPU/WAPA
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
select count(distinct ua.account_id) as wapa from user_activities ua | |
join paylogs p on p.account_id = ua.account_id | |
where ua.date >= '2015-03-02' and ua.date <= '2015-03-08' | |
and p.date >= '2015-03-02' and p.date <= '2015-03-08' | |
and p.status in('paying', 'expried'); | |
select count(distinct ua.user_id) as wapu from user_activities ua | |
join paylogs p on p.account_id = ua.account_id | |
where ua.date >= '2015-03-02' and ua.date <= '2015-03-08' | |
and p.date >= '2015-03-02' and p.date <= '2015-03-08' | |
and p.status in('paying', 'expried'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment