Phoenix 常用函数

AVG ( numericTerm )     


COUNT (Term)     


COUNT (DISTINCT  Term)


MAX ( term )


MIN ( term )


SUM ( numericTerm )


PERCENTILE_CONT( 0.9 ) WITHIN GROUP (ORDER BY X ASC)

PERCENTILE_DISC( 0.9 ) WITHIN GROUP (ORDER BY X DESC)

PERCENT_RANK( 100 ) WITHIN GROUP (ORDER BY X ASC)

FIRST_VALUE( name ) WITHIN GROUP (ORDER BY salary DESC)

LAST_VALUE( name ) WITHIN GROUP (ORDER BY salary DESC)

NTH_VALUE( name, 2 ) WITHIN GROUP (ORDER BY salary DESC)

STDDEV_POP
( X )


STDDEV_SAMP( X )


ARRAY_ELEM(my_array_col, 5)


ARRAY_LENGTH(my_array_col)


10 > ANY(my_array)


10 > ALL(my_array)


MD5(my_column)


INVERT(my_column)


ENCODE(myNumber, 'BASE62')


DECODE('000000008512af277ffffff8', 'HEX')


COALESCE(last_update_date, CURRENT_DATE())


ROUND(number, 2)


CEIL(number, 3)


FLOOR(date, 'DAY', 7)


TRUNC(timestamp, 'SECOND', 30)


TO_NUMBER('123')


SUBSTR('Hello World', -5)


TRIM('  Hello  ')


LTRIM('  Hello')


RTRIM('Hello   ')


LPAD('John',30)


LENGTH('Hello')


REGEXP_SUBSTR('na1-appsrv35-sj35', '[^-]+') evaluates to 'na1'


REGEXP_REPLACE('abc123ABC', '[0-9]+', '#') evaluates to 'abc#ABC'


REGEXP_SPLIT('one,two,three', ',') evaluates to ['one','two','three']


UPPER('Hello')


LOWER('HELLO')


REVERSE('Hello')


TO_CHAR(myDate, '2001-02-03 04:05:06')


TO_DATE('Sat, 3 Feb 2001 03:05:06 GMT', 'EEE, d MMM yyyy HH:mm:ss z')


CURRENT_DATE()


CURRENT_TIME()


CONVERT_TZ(myDate, 'UTC', 'Europe/Prague')


TIMEZONE_OFFSET('Indian/Cocos', myDate)

转载于:https://www.cnblogs.com/leeeee/p/7276390.html

你可能感兴趣的:(Phoenix 常用函数)