Basic PostgreSQL Tutorial
Basic PostgreSQL Tutorial
Section 7. Subquery
Subquery – write a query nested inside another query.
ANY – retrieve data by comparing a value with a set of values returned
by a subquery.
ALL – query data by comparing a value with a list of values returned by
a subquery.
EXISTS – check for the existence of rows returned by a subquery.
CAST – convert from one data type into another e.g., from a string into
an integer, from a string into a date.