I am trying to teach myself kdb/q programming. I can't seem to figure out how to take a simple table (columns symbol
, price
, and shares
) and multiply price * shares
to get volume
. I've read Q for Mortals, code.kx.com, etc and am stuck. Could someone please give me a hint or point me in a direction of where I could figure out this simple problem! Thanks
Where t is the table name:
update volume: price*shares from t
Or
t: select symbol, price, shares, volume:price*shares from t