In Drupal "entity queries", you can filter using fields from referenced entities. This will effectively do a SQL join on the query. For example:

$query = \Drupal::entityQuery('node')
  ->condition('uid.entity:user.mail', '%@example.com', 'LIKE');
Read more
Subscribe to Drupal