On Wed, 23 Mar 2022 at 04:03, PALAYRET Jacques <jacques.palayret@xxxxxxxx> wrote: > For example, in Oracle it is not possible to have a SELECT statement without a FROM clause (using DUAL table), so maybe " ambiguous " columns are not handled in the same way. But if your original complaint, the column was not ambiguous. The CTE had no column named "id". I really highly recommend that you write queries giving each relation a short alias then make a habit to always prefix your column names with the alias. If you don't do this then you can have all sorts of problems when you one day want to start dropping old unused columns out of your tables. If you alias these then dropping the columns will properly cause queries that reference these columns to ERROR. Without aliases, your queries might just start doing something you don't want them to do and you might not realise that for a very long time. David