2 Replies Latest reply: Dec 30, 2013 8:09 AM by 2ec1f4e1-eb28-4db9-a603-cbd591ffd53e RSS

    I am in trouble. Can any body help me to calculate sum(a*b/100) in coherence.

    2ec1f4e1-eb28-4db9-a603-cbd591ffd53e

      Hello,

       

      My name is Swadi. I have just started implementing coherence in one of the POC.

       

      I have gone through some parts of coherence but did not find a solution for that.

       

      Have some idea about GroupAggregator, EntryAggregator, ValueExtractor , ReflectionExtractor but that does not really solve the purpose.

       

      e.g

       

      Suppose there is a table with multiple columns, couple of them are "Price" and "Quantity". I need to calculate "Average price" of it.

       

       

      In SQL query I used to write

       

      Select product,customer, sum(price*qty)/sum(qty) as avgprice from order

      group by product,customer

       

      I need to write same logic in Coherence. Please help me.