

SELECT id, prom.date('2024-11-28').find(name='key1.key2.key3').min().max().avg() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2)
match(id, "bucketpromdb:wecise", "prom.0.5", 2.7)
match(id, "bucketpromdb:wecise", "prom.0.8", 2.622222222222222)
**/
;

SELECT
  id, prom.time('2024-11-28 11:24:00', '2024-11-28 11:25:00').find(name='key1.key2.key3').sum()
FROM
  /test/bucketpromdb  where id='bucketpromdb:wecise'
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2.7)
**/
;

SELECT id, prom.date('2024-11-28').avg().sigma() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2.663157894736843)
match(id, "bucketpromdb:wecise", "prom.0.5", 0.15630781478860528)
**/
;

SELECT id, prom.date('2024-11-28').min().max().count() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2)
match(id, "bucketpromdb:wecise", "prom.0.5", 2.7)
match(id, "bucketpromdb:wecise", "prom.0.8", 19)
**/
;

SELECT id, prom.date('2024-11-28').sum() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 50.600000000000016)
**/
;

SELECT id, prom.date('2024-11-28').max() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2.7)
**/
;


SELECT id, prom.date('2024-11-28').min() FROM  /test/bucketpromdb
/**
output()
match(id, "bucketpromdb:wecise", "prom.0.2", 2)
**/
;


