IN()
Matches input data to a list of values. 默认情况下,匹配时大小写敏感。
IN( ITEM_NAME, ‘Chisel Point Knife’, ‘Medium Titanium Knife’, ‘Safety Knife’, 0 )
ITEM_NAME | 返回值 |
---|---|
Stabilizing Vest | 0 (FALSE) |
Safety knife | 1 (TRUE) |
Medium Titanium knife | 1 (TRUE) |
| NULL |
MAX()
Returns the latest date, the largest numeric value or the highest string value within a port or group. You can apply a filter to limit the rows in the search. You can nest only one other aggregate function within MAX.
Note: The MAX function uses the same sort order that the Sorter transformation uses. However, the MAX function is case sensitive, and the Sorter transformation may not be case sensitive.
语法:
MAX(date/numeric_value/string [ , filter_condition])
过滤条件是可选的,过滤条件必须是数字值或者等于TRUE,FALSE,NULL。
当通过的所有值为空,或者是过滤条件为假或者空时,返回值是NULL。
Group By:
Max函数基于在transformation中定义的group by port分组,一组一个返回值,如果没有定义group by port,则将所有值看成一组,返回一个值。
例子:
返回 flashlights的最高价格:
MAX( PRICE, ITEM_NAME='Flashlight' )
ITEM_NAME | PRICE |
---|---|
Flashlight | 10.00 |
Regulator System | 360.00 |
Flashlight | 55.00 |
Diving Hood | 79.00 |
Halogen Flashlight | 162.00 |
Flashlight | 85.00 |
Flashlight | NULL |
返回值: 85.00 |