Consider a simple user-defined aggregation function MySum:{sum x}, and consider the table
data:([]y:1 8 27 64 125;x1:1 2 3 4 5;x2:1 4 9 16 25).
Why does the following not work?
select MySum{x}x2 from data
`rank
You can use :
q)select enlist MySum x2 from data
Why 'select Mysum x2 from data' doesn't work?
From KDB WIKI: "The following functions receive special treatment within select
count,first,last,sum,prd,min,max,med,avg,wsum,wavg,var,dev,cov,cor "
For Details, read: http://code.kx.com/q/ref/qsql/#select
Section: Special functions within select
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With