Chris Mague 7 年之前
父节点
当前提交
0d4c256577
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Readme.md

+ 5 - 0
Readme.md

@@ -54,3 +54,8 @@ List out all subnets by instance count
 ```
 MATCH (i: Node)-[r:subnet]-(s:Subnet)-[q:subnet]-(v:Vpc)-[o:owned]-(a:AwsAccount) WITH s, v, a, count(i) as nc RETURN s.cidr, v.name, a.name, nc ORDER by nc DESC
 ```
+
+Find all non-default VPCs ordered by instance count
+```
+MATCH (n:Vpc) OPTIONAL MATCH  (n)<-[:subnet]-(:Subnet)<-[:subnet]-(x:Node) WITH count(x) as node_count, n WHERE n.default="false" RETURN n.name, n.default, node_count ORDER by node_count DESC
+```