Select 在XDB中按时间获取分组查询中的最后时间戳

Select 在XDB中按时间获取分组查询中的最后时间戳,select,group-by,timestamp,influxdb,Select,Group By,Timestamp,Influxdb,我有一个数据库,价格和时间戳以纳秒为单位,测量单位为xdb。当我进行按时间分组的选择时,如下所示: select first(price),last(price) from priceseries where time>=1496815212834974866 and time<=1496865599580302882 group by time(1s) 从时间>=1496815212834974866和时间的价格系列中选择第一个(价格)、最后一个(价格) 当使用聚合函数时,这意味

我有一个数据库,价格和时间戳以纳秒为单位,测量单位为xdb。当我进行按时间分组的选择时,如下所示:

select first(price),last(price) from priceseries where time>=1496815212834974866 and time<=1496865599580302882 group by time(1s)
从时间>=1496815212834974866和时间的价格系列中选择第一个(价格)、最后一个(价格)
  • 当使用聚合函数时,这意味着使用
    分组依据
    选择第一个(价格)、最后一个(价格),其中时间>=和时间
    
  • 当使用聚合函数时,这意味着使用
    分组依据
    选择第一个(价格)、最后一个(价格),其中时间>=和时间