Advertisement
ran5000

Untitled

Sep 26th, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. insert into active_users (`user_id`)
  2. select profile_collaborators.user_id
  3. from accounts
  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'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement