$db = db()->createCommand("
UPDATE bet
SET status = subquery.winr
FROM (:subquery) AS subquery
WHERE bet.id = subquery.id
", ['subquery' => new Expression($this->leadersQuery()->select(['id', 'winr'])->createCommand()->rawSql)])->execute();
//->update(/*the truth is out there*/); needed