Creating Join with “AND”
$q->add_select('ratings.rating as account_rating');
$q->add_join('ratings', ['accounts_id' => $_REQUEST['account_id'], 'content_id' => 'items.id']);
$q->add_select('ratings.rating as account_rating');
$q->add_join('ratings', ['accounts_id' => $_REQUEST['account_id'], 'content_id' => 'items.id']);