MySQL: Assign Opportunities to User based on Parent Account

Posted Leave a commentPosted in MySQL, SugarCRM

Query to Select List:   SELECT * FROM opportunities LEFT JOIN accounts_opportunities ON accounts_opportunities.opportunity_id = opportunities.id LEFT JOIN accounts ON accounts_opportunities.account_id = accounts.id WHERE accounts.assigned_user_id = ‘7077c616-4f2c-f966-d9b6-5581807bae86’;     UPDATE Query: UPDATE opportunities x LEFT JOIN accounts_opportunities y ON y.opportunity_id […]