On Tuesday, March 22, 2022, Torsten Förtsch <tfoertsch...@gmail.com> wrote: > > > Note the use of aliases, w and x. You are using a correlated subquery. >
Yep. There is an FAQ entry if you’d like a bit more exposition. https://wiki.postgresql.org/wiki/FAQ#Why_doesn.27t_PostgreSQL_report_a_column_not_found_error_when_using_the_wrong_name_in_a_subquery.3F David J.