600复杂关系查询.mql 905 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. -- select * from /matrix/entity/car/camry
  2. -- /**
  3. -- output()
  4. -- **/;
  5. select id,wheel["sise","color","screw"] from /matrix/entity/car/camry where wheel.screw.sise > 39
  6. /**
  7. output()
  8. **/;
  9. select id,sise from /matrix/entity/screw
  10. /**
  11. output()
  12. **/;
  13. -- 47 matrix
  14. -- 大于40 小于60 应该是1个对象,限定一个与camry:13有碰撞的
  15. select id,wheel["sise","color"] from /matrix/entity/car/camry c join ("camry:13")-[:collide*1]-(h) on c.id = h.id where wheel.screw.sise > 39
  16. /**
  17. output()
  18. **/;
  19. -- 大于40 小于60 应该是1个对象,大于60
  20. select id,wheel["sise","color"] from /matrix/entity/car/camry where wheel.screw.sise > 39
  21. /**
  22. output()
  23. **/;
  24. -- 大于9999有2个对象,大于10000 小于20000的有1个对象
  25. select id,wheel["sise","color"] from /matrix/entity/car/camry where wheel.rotations.time('2021-09-13 00:00:00','').sum(count).assert($1 > 12000)
  26. /**
  27. output()
  28. **/;