It is possible use a CTE inside a select of another CTE with spatial functions? Something like this;
with geoma as ( select ST_SetSRID(ST_MakePoi