View difference between Paste ID: Rm5qXpez and qYAeNdfv
SHOW: | | - or go back to the newest paste.
1-
insert into active_personas (`persona_id`) 
1+
insert into active_users (`user_id`) 
2-
select persona_id from users 
2+
3-
where id in (
3+
4
join profile_collaborators 
5
join business_profiles 
6
ON accounts.id = profile_collaborators.account_id 
7
and accounts.active_business_profile_id = business_profiles.id
8
where accounts.last_request_at > '2012-07-01 00:00:00' 
9
or business_profiles.subscription_type != 'free'