Maybe you could try using (lateral) joins to express the subselects? Or maybe a windowing function …
Lateral joins would still be fragments, though.
Maybe you could try using (lateral) joins to express the subselects? Or maybe a windowing function …
Lateral joins would still be fragments, though.