with report as ( <your query here> ), reportLimited as ( select * from report where foo = value ) select * from reportLimited