Are SELECT type queries the only type that can be nested?
Basic answer There are CTEs (Common Table Expressions) in Postgres – like in any major modern RDBMS, That includes MySQL since version 8.0. Since version 9.1 Postgres also features data-modifying CTEs, which can be “nested”. Unlike subqueries CTEs pose as optimization barriers. The query planner cannot inline trivial commands into the main command or reorder … Read more