RayforceDB – 一款采用类 Lisp 语法的纯 C 语言分析型数据库
RayforceDB – a pure C analytics database with a Lisp-like syntax

原始链接: https://rayforcedb.com/

; 汇总高价值流量,然后遍历交易对手 (set flow (select {from: trades where: (> Notional 1000000) by: Counterparty Volume: (sum Notional)})) (.graph.var-expand network flow 1 3) import rayforce as rf trades = rf.read_csv("trades.csv") flow = (trades .where(rf.col("Notional") > 1_000_000) .group_by("Counterparty") .agg(rf.col("Notional").sum())) network.expand(flow, min_depth=1, max_depth=3) ray_t *trades = ray_read_csv("trades.csv"); ray_graph_t *g = ray_graph_new(trades); ray_op_t *amount = ray_scan(g, "Notional"); ray_op_t *limit = ray_const_i64(g, 1000000); ray_op_t *hot = ray_gt(g, amount, limit); ray_t *result = ray_execute(g, ray_filter(g, trades, hot)); 示例结果 5 行 · 已优化 交易对手 (Counterparty) | 深度 (Depth) | 交易量 (Volume) LYNX_02 | 1 | 84.20M ALPHA_17 | 2 | 61.08M NODE_08 | 2 | 44.71M FORT_04 | 3 | 27.19M EDGE_12 | 3 | 12.42M

抱歉。
相关文章

原文
; Aggregate high-value flow, then traverse counterparties
(set flow
  (select {from: trades
           where: (> Notional 1000000)
           by: Counterparty
           Volume: (sum Notional)}))

(.graph.var-expand network flow 1 3)

EXAMPLE RESULT5 rows · optimized

CounterpartyDepthVolume

LYNX_02184.20M

ALPHA_17261.08M

NODE_08244.71M

FORT_04327.19M

EDGE_12312.42M

联系我们 contact @ memedata.com