関数名 | 説明 |
abs (x) | 数値の絶対値を計算します。 |
cbrt (x) | 数値の立方根を計算します。 |
sqrt (x) | 数値の平方根を計算します。 |
cosine_similarity (x,y) | ベクトルxとyの間のコサイン類似度を計算します。
例えば * | SELECT cosine_similarity(MAP(ARRAY['x','y'], ARRAY[1.0,0.0]), MAP(ARRAY['x','y'], ARRAY[0.0,1.0]))
は0を返します。 |
degrees (x) | ラジアンを度に変換します。 |
radians (x) | 度をラジアンに変換します。 |
e () | 数値の自然対数を計算します。 |
exp (x) | 自然対数の指数を返します。 |
ln (x) | 数値の自然対数を計算します。 |
log2 (x) | 2を底とする対数を計算します。 |
log10 (x) | 10を底とする対数を計算します。 |
log (x,b) | bを底とする対数を計算します。 |
pi () | 小数点以下14桁のπ値を返します。 |
pow (x,b) | 数値のb乗を計算します。 |
rand () | 乱数を返します。 |
random (0,n) | [0,n)の範囲の乱数を返します。 |
round (x) | 四捨五入した値を返します。 |
round (x, N) | 数値の小数点以下N桁を保持します。 |
floor (x) | 数値を切り捨てて整数にします。 |
ceiling(x) | 数値を切り上げて整数にします。 |
truncate (x) | 数値の小数部分を切り捨てます。 |
acos (x) | 数値の逆余弦を計算します。 |
asin (x) | 数値の逆正弦を計算します。 |
atan (x)
| 数値の逆正接を計算します。 |
atan2 (y,x) | 2つの数値の除算結果の逆正接を計算します。 |
cos (x) | 数値の余弦を計算します。 |
sin (x) | 数値の正弦を計算します。 |
cosh (x) | 数値の双曲余弦を計算します。 |
tan (x) | 数値の正接を計算します。 |
tanh (x) | 数値の双曲正接を計算します。 |
infinity () | 正の無限大の数値を返します。 |
is_nan (x) | 対象値がNaN(Not a Number)であるかどうかを判断します。 |
nan () | NaN値(Not a Number)を返します。 |
mod (x, y) | xとyの除算の余りを計算するために使用します。 |
sign (x) | xの符号を返します。1、0、-1で表します。 |
width_bucket (x, bound1, bound2, n) | ある範囲の数値(bound1 - bound2)を同じサイズのn個のBucketに分割し、xが属するBucketを返します。 例えば * | select timeCost,width_bucket(timeCost,10,1000,5) |
width_bucket (x, bins) | 配列(bins)を使用してBucketの範囲を指定し、xが属するBucketを返します。 例えば * | select timeCost,width_bucket(timeCost,array[10,100,1000]) |
to_base (x, radix) | BASEエンコードに基づいてxをradix進数の文字列に変換します。 |
from_base(x, radix) | BASEエンコードに基づいて文字列stringをradix進数の数値に変換します。 |
* | SELECT diff [1] AS today, round((diff [3] -1.0) * 100, 2) AS growth FROM (SELECT compare(pv, 86400) as diff FROM (SELECT COUNT(*) as pv FROM log))
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback