drupal 8 db select or condition group code example
Example: drupal 8 database query or condition
$orGroup = $query->orConditionGroup()
->condition('promoted', 1)
->condition('uid', [2,4,7,22], 'IN');
// Add the group to the query.
$query->condition($orGroup);