In PostgreSQL we can create arrays with the ARRAY constructor. An array constructor is an expression that builds an array value using values for its member elements.
subqueries
Fix Msg 512 “Subquery returned more than 1 value” in SQL Server
If you get error Msg 512 that reads “Subquery returned more than 1 value…” in SQL Server, it’s because you’re using a subquery that returns more than one value in a scenario where this is not allowed.
SQL EXISTS Operator for Beginners
In SQL, the EXISTS operator specifies a subquery to test for the existence of rows. It returns TRUE when the subquery returns one or more rows.
A subquery is a query that is nested inside another query (or even another subquery)
This article contains some basic examples of the EXISTS operator.