$ids1 = array_column($result1, 'id');
$ids2 = array_column($result2, 'id');
// ...
$idsn = array_column($resultn, 'id');
$intersection = array_intersect($ids1, $ids2, ..., $idsn);
Или если упростить:
$ids = array_intersect(
...array_map(function(array $collection) {
return array_column($collection, 'id');
}, $results)
);
updated:
$result = null;
foreach($sql_queries as $sql_query) {
$query_result = $wpdb->get_results($sql_query);
$ids = array_column($query_result, 'id');
if (null === $result) {
$result = $ids;
} else {
$result = array_intersect(
$result, $ids
);
}
$result = array_merge($result, $query_result);
}