ran5000 icon

Untitled

ran5000 | PRO | 09/25/12 01:53:43 PM UTC | 0 ⭐ | 357 👁️ | Never ⏰ | []
MySQL |

440 B

|

None

|

0 👍

/

0 👎

insert into active_personas (`persona_id`) 
select persona_id from users 
where id in (
select profile_collaborators.user_id
from accounts
join profile_collaborators 
join business_profiles 
ON accounts.id = profile_collaborators.account_id 
and accounts.active_business_profile_id = business_profiles.id
where accounts.last_request_at > '2012-07-01 00:00:00' 
or business_profiles.subscription_type != 'free')
and persona_id is not null;

Comments