With common table expressions you can save the results to a temporary result set and use this results set for other queries.
WITH temporaryNamedResultSet AS ( select UserName from aspnet\_Users ) select \* from temporaryNamedResultSet
Enjoyed this? Read the extended cut on the Second Brain Stack Substack →