[Ur] Possible to have products in SQL aggregates?
Daniel Patterson
dbp at dbpmail.net
Fri May 31 18:39:51 EDT 2013
I have a table structure like:
A: aId
ABJoin: refA, refB
B: bId, refA, quantity: float
C: token, refB, quantity: float
The goal is, for a given token, to give a list of all the relevant As,
by joining C with B on refB = bId and then joining B and A through the
ABJoin table. I _want_ to see SUM(C.quantity * B.quantity) - ie the
total number of the specific A that is relevant for the referenced
token, but I'm not able to write that product. (I could if I were just
using SQL)
Is there a way to do this? I'd prefer not to bring everything into
code and then re-implement the join and aggregate...
More information about the Ur
mailing list