CTEs / WITH
Define temporary result sets that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement.
They work almost like subqueries.
Although, subqueries are typically used within the context of a larger query and are not reusable, whereas CTE...
wooblygeek.hashnode.dev3 min read