f1:{[date] .k3.tl .df.exec[`TXC_E_HIST_PROD;("select OrdersSent:count OrderQty, OrdersExecuted:sum CalcCumQty>0.0, SharesSent:sum OrderQty, SharesExecuted:sum CalcCumQty by date, ExDestination from order where date=?, PARENT_OID in ?";(.util.dateq2k date; (OrderIDTable date)`OrderID))]};
f2:{[date] .k3.tl .df.exec[`TXC_I_HIST_PROD;("select OrdersSent:count OrderQty, OrdersExecuted:sum CalcCumQty>0.0, SharesSent:sum OrderQty, SharesExecuted:sum CalcCumQty by date, ExDestination from order where date=?, PARENT_OID in ?";(.util.dateq2k date; (OrderIDTable date)`OrderID))]};
t1: raze f1 each 2008.11.17 + til 5;
t2: raze f2 each 2008.11.17 + til 5;
`ExDestination`date xasc select OrdersSent:sum OrdersSent, OrdersExecuted:sum OrdersExecuted, SharesSent:sum SharesSent, SharesExecuted:sum SharesExecuted by date, ExDestination from (0! t1),(0! t2)
|