1、查询语句
GO xxx | GROUP BY $-.a YIELD $-.a as a, sum($-.b) as b | ORDER BY b
2、现在想在groupby后将聚合后的数据过滤
GO xxx | GROUP BY $-.a YIELD $-.a as a, sum($-.b) as b | YIELD $-.a,$-.b WHERE $-.b > 100 | ORDER BY b
报错:
[ERROR (-12)]: SemanticError: $-.b', not exist prop b’
(root@nebula) [basketballplayer]> GO FROM "player100" OVER follow BIDIRECT YIELD $$.player.name as Name, $$.player.age as Age | \
GROUP BY $-.Name YIELD $-.Name as Player, sum($-.Age) AS age_sum | \
YIELD $-.Player as Player, $-.age_sum as age_sum WHERE $-.age_sum > 40 | \
ORDER BY $-.age_sum
+--------------------+---------+
| Player | age_sum |
+--------------------+---------+
| "Shaquille O'Neal" | 47 |
+--------------------+---------+
| "Tony Parker" | 72 |
+--------------------+---------+
| "Manu Ginobili" | 82 |
+--------------------+---------+