<div dir="ltr">Sorry for the typo. I am looking for something like group by in a sql query where i can group by hid and sum up the values<div>Is this something available .</div><div><br></div><div>Regards,</div><div>Raj</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 February 2014 17:03, Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">See below.<br>
<div class=""><br>
On 11/02/2014, Raja Sekhar <<a href="mailto:raja.amirapu@gmail.com">raja.amirapu@gmail.com</a>> wrote:<br>
</div><div class="">> Hi,<br>
> I have values like this<br>
><br>
> id hid value1 value2 value3 value4<br>
> 1 1 100 100 100 100<br>
> 2 1 100 100 100 100<br>
> 3 2 150 150 150 150<br>
> 4 2 150 150 150 150<br>
><br>
> the end result should be e<br>
> all hids with 1's should summed up<br>
> all hids with 2's should summed up depends on so on<br>
><br>
> i.e<br>
> valuessum1 valuesum2 valuesum3 valuesum4<br>
> 200 200 200 200<br>
> 200 200 200 200<br>
<br>
</div>A second line with "300 300 300 300" would make more sense.<br>
<br>
Expecting a feature to iterate over fields with names differing in a<br>
suffix ordinal is a bit much. You can use Java's reflection or decide<br>
on a data model where the valueN fields are stored in a List.<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> I did this with accumulate by comparing the hids and using the sum function<br>
><br>
> I looking for group by hid and sum l<br>
><br>
> Regards,<br>
> Raj<br>
><br>
><br>
><br>
><br>
><br>
> On 11 February 2014 15:49, Wolfgang Laun <<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>> wrote:<br>
><br>
>> On 11/02/2014, Raja Sekhar <<a href="mailto:raja.amirapu@gmail.com">raja.amirapu@gmail.com</a>> wrote:<br>
>> > Hi All,<br>
>> > How can i perform aggregation on group with drools fusion.<br>
>><br>
>> By performing all the necessary steps.<br>
>><br>
>> A more detailed answer might be provided for a more detailed question.<br>
>><br>
>> -W<br>
>><br>
>> ><br>
>> > Regards,<br>
>> > Raja Sekhar A<br>
>> ><br>
>> > --<br>
>> > Raja Sekhar Amirapu<br>
>> > ------------------------------------------------------<br>
>> > "If any anyone can do it, i can do it. If no one else can do it, i must<br>
>> do<br>
>> > it"<br>
>> ><br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Raja Sekhar Amirapu<br>
> ------------------------------------------------------<br>
> "If any anyone can do it, i can do it. If no one else can do it, i must do<br>
> it"<br>
><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Raja Sekhar Amirapu<br>------------------------------------------------------<div>"If any anyone can do it, i can do it. If no one else can do it, i must do it"<br>
</div></div>
</div>