Create subqueries in From and SELECT