Hi @Jonathan Brotto
As long as we use one of the SQL comparison operators (=, <, >, <=, >=) to compare the values of two expressions, the expressions before and after the operator must be a single value.
The keywords SOME, ANY, ALL allow the use of comparison operators to compare a single value with the result returned by a subquery, where the result returned by the subquery can be multiple rows.
Basic syntax: scalar_expression { = | <> | != | > | >= | !> | < | <= | !< } All | Any |Some ( subquery )
.
The keyword SOME and the keyword ANY have the exact same function
In fact, subqueries implemented by aggregate functions are usually more efficient than direct ANY or All queries. ANY and ALL are related to aggregate functions as follows:
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".