Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 presto 在一行中获得最少的几个字段。在像 MySql 这样的其他 SQL 实现中,这个函数被称为 LEAST。Presto 中的等效功能是什么?
从 Presto 0.100 开始,您可以使用least:
least
SELECT LEAST(a, b);
对于之前的版本,请使用此等价物:
SELECT (CASE WHEN a > b THEN b ELSE a END);