WITH xx AS
( SELECT * FROM xxx WHERE xx='XX'
)
SELECT * FROM xx