SHOW QUERY,这里有社区用户常用的 nGQL 查询语句

  • 语句 1
    • 场景:集合多个查询结果,一次性返回 2 条 nGQL 查询结果
    • 具体语句:
    GO 3  STEPS FROM "ADDRESS_1015" OVER related YIELD 
    case when $^.Staff.STAFF_NAME IS NOT EMPTY and $^.Staff.STAFF_ROLE == "派送人员" then related._src else null end AS dst, 
    case when $.busi_store.BUSI_STORE_NAME IS NOT EMPTY then properties($) else null end AS props;
    
  • 语句 2
    • 场景:获取节点的全部属性,并排序:先一条查出目标节点 ID,再根据目标节点的字段排序,然后取前 10条…
    • 具体语句:
    GO FROM "Tim Duncan" OVER like YIELD like._dst AS dst | FETCH PROP ON * $-.dst YIELD player.age AS age,vertex AS allProperties | ORDER BY $-.age | LIMIT 3 | YIELD $-.allProperties AS allProperties
    
  • 语句 3
    • 场景:查询没有入边只有出边的点
    • 具体语句:
    MATCH (v:table)<–() where not (v:table)–>() RETURN id(v)
    
1 个赞