Moves the input of a query form, from the cut's start inward,
into a SELECT subquery projecting everything it binds.
Orderings in that part stay outside, since a subquery does not keep its order.
Aggregate variables are only projected when the outer query references them.
Moves the input of a query form, from the cut's
startinward, into a SELECT subquery projecting everything it binds. Orderings in that part stay outside, since a subquery does not keep its order. Aggregate variables are only projected when the outer query references them.