101.综合测试.mql 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. -- SELECT
  2. -- contract.attr15 AS "平均合同金额"
  3. -- FROM /mingdao1/contract contract
  4. -- LIMIT 0, 20000
  5. -- /**
  6. -- output()
  7. -- **/
  8. -- ;
  9. -- SELECT
  10. -- avg(contract.attr15) AS "平均合同金额"
  11. -- FROM /mingdao1/contract contract
  12. -- LIMIT 0, 20000
  13. -- /**
  14. -- output()
  15. -- **/
  16. -- ;
  17. -- create ('trans:01056319') - [:trans_account_id_account_account_id] -> ('account:00004428')
  18. -- /**
  19. -- output()
  20. -- **/
  21. -- ;
  22. -- match (a:'trans:01056319') - [:trans_account_id_account_account_id] -> (b:'account:00004428') return a.id,b.id
  23. -- /**
  24. -- output()
  25. -- **/
  26. -- ;
  27. -- select id, staff_perf.time('2025-04-01 00:00:00','2025-04-11 00:00:00') from /mingdao1/staff
  28. -- WHERE staff_perf.time('2025-04-01 00:00:00','2025-04-11 00:00:00').find(name = 'CN003570S').unit('avg', '1d').assert($1 > 3)
  29. -- MATCH (yearmonth:/birddata/yearmonth WHERE date like 'xxx2012*')-[:yearmonth_customerid_customers_customerid*1..1]->(customer:/birddata/customers WHERE segment = 'xxxLAM')
  30. -- RETURN customer.customerid AS "customer_id", yearmonth.consumption AS "consumption" INTO /t0;
  31. -- /**
  32. -- output()
  33. -- **/
  34. -- ;
  35. -- select id from /birddata/yearmonth WHERE date like '2012*' limit -1
  36. -- -- 158808 rows, usetime=55.781458454s
  37. -- /**
  38. -- output()
  39. -- **/
  40. -- ;
  41. -- select id from /birddata/customers WHERE segment = 'LAM' limit -1
  42. -- -- 3658 rows, usetime=1m44.720676302s
  43. -- /**
  44. -- output()
  45. -- **/
  46. -- ;
  47. -- select id,date,customerid, consumption,yearmonth_customerid_customers_customerid from /birddata/yearmonth where customerid=7653 and date like '2012*'
  48. -- /**
  49. -- output()
  50. -- **/
  51. -- ;
  52. -- select * from /birddata/customers WHERE segment = 'LAM' and customerid=7653
  53. -- /**
  54. -- output()
  55. -- **/
  56. -- ;
  57. -- MATCH (yearmonth:/birddata/yearmonth WHERE date like '2012*' and customerid=7653)-[:yearmonth_customerid_customers_customerid*1..1]->(customer:/birddata/customers WHERE segment = 'LAM' and customerid=7653)
  58. -- /**
  59. -- output()
  60. -- **/
  61. -- ;
  62. -- MATCH (yearmonth:/birddata/yearmonth WHERE date like '2012*')-[:yearmonth_customerid_customers_customerid*1..1]->(customer:/birddata/customers WHERE segment = 'LAM')
  63. -- RETURN customer.customerid AS "customer_id", yearmonth.consumption AS "consumption" INTO /t0;
  64. -- SELECT t0.customer_id AS "Customer ID", sum(t0.consumption) AS "Total Consumption" FROM /t0 t0
  65. -- GROUP BY t0."customer_id" ORDER BY "Total Consumption" ASC LIMIT 0, 1
  66. -- /**
  67. -- output()
  68. -- **/
  69. -- ;
  70. -- select id.id from /birddata/yearmonth id WHERE date like '2012*' and customerid=7653
  71. -- /**
  72. -- timeout(10m)
  73. -- output()
  74. -- **/
  75. -- ;
  76. -- SELECT consumption.consumption AS "consumption_amount" INTO /t0 FROM /birddata/yearmonth consumption WHERE customerid = 6 AND date between '201308' AND '201311' LIMIT 0, 20000;
  77. -- select * from /t0
  78. -- SELECT consumption.consumption AS "consumption_amount" , customerid, date
  79. -- FROM /birddata/yearmonth consumption where customerid = 6 and
  80. -- date >= '201305' AND date <= '20131100'
  81. -- MATCH (yearmonth:/birddata/yearmonth WHERE date like '2012*')
  82. -- -[:yearmonth_customerid_customers_customerid*1..1]->
  83. -- (customer:/birddata/customers WHERE segment = 'LAM' and customerid=7653)
  84. -- select id, staff_perfx.time('2025-04-01 00:00:00','2025-04-11 00:00:00') from /mingdao1/staff
  85. -- select * from /birddata/yearmonth where yearmonth_customerid_customers_customerid is not null
  86. -- select id, staff_perf.time('2025-04-01 00:00:00','2025-04-13 00:00:00') from /mingdao1/staff with timeout=2m limit 1000
  87. select * from /mingdao1/staff WHERE is_admin_of_project is not null
  88. /**
  89. timeout(2m)
  90. output()
  91. **/
  92. ;