GetInterval 函数

GetInterval 函数返回时间系列使用的时间间隔。

语法

GetInterval(ts TimeSeries) 
returns lvarchar;
ts
源时间系列。

描述

时间系列值使用的日历可以记录一秒、分钟、小时、天、周、月或年的时间间隔。日历的底层时间间隔描述时间系列记录数据的频率。

返回结果

描述时间系列时间间隔的 LVARCHAR 字符串。

示例

以下查询每天查找未交易的所有库存:
select stock_name
from daily_stocks
where GetInterval(stock_data) <> 'day';