A query (SELECT statement) that supplies the rows to be inserted. Refer to the SELECT statement for a description of the syntax.
"
So directly replace the actual SELECT query with a DELETE-RETURNING doesn't seem to work. You will need to perform the DELETE separately and then funnel those records through a SELECT statement. A subquery may work though a CTE is likely considered best practice.