This query works with views with subselects, and it's a lot faster, on a complex schema the previous query was taking around 8 mins, this query takes less than half a second(403.072 ms). Also reorder view embedding tests