Star

group by 语句结果中使用运算符的问题

举例如下

GO FROM 100 OVER someEdge BIDIRECT
YIELD
someEdge._src as src,
someEdge.times as times
|GROUP BY $-.src
YIELD
COUNT($-.src) as a,
SUM($-.times)*COUNT($-.src) as b

应该如何写才能算出b?
谢谢

可以这么写

go from 100 over like bidirect yield like._src as src, like.times as times, $$.person.name as name | group by $-.src yield SUM($-.times) as su, COUNT(*) as co | yield $-.su * $-.co

1赞

浙ICP备20010487号