1094.subquery.aggr.mql 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. -- SELECT id,prom.time('2024-01-01 09:09:09.090', '2024-01-03 19:19:19.191').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb where id='bucketpromdb:wecisen1'
  2. -- /**
  3. -- output()
  4. -- matchcount(id, "bucketpromdb:wecisen1", "prom.1.2", 2880, 1)
  5. -- **/
  6. -- ;
  7. -- select count(id),prom.avg().max().sum().count().min() from (
  8. -- SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb
  9. -- ) group by prom
  10. -- /**
  11. -- timeout(60m)
  12. -- output()
  13. -- todomatch(id, 3, prom, null)
  14. -- match(count, 3)
  15. -- match(count, 1, "prom.0.2", 2880, "prom.0.8", 23040, "prom.0.11", 8)
  16. -- **/
  17. -- ;
  18. -- select id.count(),prom from (
  19. -- SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb
  20. -- ) group by prom
  21. -- /**
  22. -- timeout(60m)
  23. -- output()
  24. -- todomatch(id, 3, prom, null)
  25. -- match(id, 3)
  26. -- match(id, 1, "prom.0.2", 2880, "prom.7.2", 2880)
  27. -- **/
  28. -- ;
  29. -- select count(id),prom.avg().max().sum().count().min() from (
  30. -- SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb
  31. -- ) group by prom
  32. -- /**
  33. -- timeout(60m)
  34. -- output()
  35. -- todomatch(id, 3, prom, null)
  36. -- match(count, 3)
  37. -- match(count, 1, "prom.0.2", 2880, "prom.0.8", 23040, "prom.0.11", 8)
  38. -- **/
  39. -- ;
  40. -- select id.count(),prom.count() from (
  41. -- SELECT id,prom.time('2024-01-02 00:00:00', '2024-01-10 00:00:00').find(name='test1').unit('sum','1d') FROM /test/bucketpromdb
  42. -- ) group by prom
  43. -- /**
  44. -- timeout(60m)
  45. -- output()
  46. -- match(id, 3, "prom.0.2", 0)
  47. -- match(id, 1, "prom.0.2", 8)
  48. -- **/
  49. -- ;