Re: invalid reference to FROM-clause entry for table

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Adw Spe <h.3stnc4kdbem6q_8p@outlook.com>
Cc: Sam Stearns <sam.stearns@dat.com>, "pgsql-sql@lists.postgresql.org" <pgsql-sql@lists.postgresql.org>, Peter Garza <peter.garza@dat.com>, Henry Ashu <henry.ashu@dat.com>
Date: 2024-10-05T02:35:02Z
Lists: pgsql-sql
On Friday, October 4, 2024, Adw Spe <h.3stnc4kdbem6q_8p@outlook.com> wrote:

> Maybe I’m wrong, but I think every subquery must at least have a
> SELECT-FROM pair.
>

You are indeed wrong - at least for PostgreSQL.  No query requires a from
clause in PostgreSQL.

David J.