I usally use MAX() or MIN() if a DBMS hasn't an ANY() aggregate function.
Is there something less expensive in mySQL and MS-SQL?
There is no ANY aggregate in ANSI SQL-92
There is the ANY qualifier to match SOME and ALL
MIN and MAX are proper aggregates... completely unrelated and shouldn't be compared
Edit:
Only MySQL has this ambiguity of an "ANY" aggregate: SQL Server, Sybase, Oracle, PostGres do not. See Do all columns in a SELECT list have to appear in a GROUP BY clause
2.1m questions
2.1m answers
60 comments
57.0k users