1092valid.mql 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. SELECT id,prom.last(20d).find(name='test1').unit('count','1d') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  2. /**
  3. output()
  4. matchcount(id, "bucketpromdb:wecisen1", "prom.1.2", 288, 1)
  5. **/
  6. ;
  7. SELECT id,prom.date('2024-01-02').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  8. /**
  9. output()
  10. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 2880, 1)
  11. **/
  12. ;
  13. SELECT id,prom.date('2024-01-01', '2024-01-03').time('09:00:00','19:00:00').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  14. /**
  15. output()
  16. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 2400, 1)
  17. **/
  18. ;
  19. SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-04 00:00:00').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  20. /**
  21. output()
  22. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 5760, 1)
  23. **/
  24. ;
  25. SELECT id,prom.date('2024-01-02').time('09:09:00','09:19:00').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  26. /**
  27. output()
  28. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 20, 1)
  29. **/
  30. ;
  31. SELECT id,prom.date('2024-01-02').time('09:09:00','10:19:00').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  32. /**
  33. output()
  34. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 140, 1)
  35. **/
  36. ;
  37. SELECT id,prom.time('2024-01-01 09:09:09.090', '2024-01-03 19:19:19.191').find(name='test1') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  38. /**
  39. output()
  40. matchcount(id, "bucketpromdb:wecisen1", "prom.len", 6980, 1)
  41. **/
  42. ;