<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">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</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 &lt;<a href="mailto:raja.amirapu@gmail.com">raja.amirapu@gmail.com</a>&gt; wrote:<br>
</div><div class="">&gt; Hi,<br>
&gt; I have values like this<br>
&gt;<br>
&gt; id hid value1 value2 value3 value4<br>
&gt; 1 1     100     100    100     100<br>
&gt; 2 1      100    100     100     100<br>
&gt; 3 2       150   150     150     150<br>
&gt; 4 2      150    150     150     150<br>
&gt;<br>
&gt; the end result should be e<br>
&gt; all hids with 1&#39;s should summed up<br>
&gt; all hids with 2&#39;s should summed up depends on so on<br>
&gt;<br>
&gt; i.e<br>
&gt;  valuessum1 valuesum2 valuesum3 valuesum4<br>
&gt;   200               200            200          200<br>
&gt;  200                 200            200          200<br>
<br>
</div>A second line with &quot;300 300 300 300&quot; 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&#39;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>
&gt;<br>
&gt; I did this with accumulate by comparing the hids and using the sum function<br>
&gt;<br>
&gt; I looking for group by hid and sum l<br>
&gt;<br>
&gt; Regards,<br>
&gt; Raj<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 11 February 2014 15:49, Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On 11/02/2014, Raja Sekhar &lt;<a href="mailto:raja.amirapu@gmail.com">raja.amirapu@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi All,<br>
&gt;&gt; &gt; How can i perform aggregation on group with drools fusion.<br>
&gt;&gt;<br>
&gt;&gt; By performing all the necessary steps.<br>
&gt;&gt;<br>
&gt;&gt; A more detailed answer might be provided for a more detailed question.<br>
&gt;&gt;<br>
&gt;&gt; -W<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt; Raja Sekhar A<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Raja Sekhar Amirapu<br>
&gt;&gt; &gt; ------------------------------------------------------<br>
&gt;&gt; &gt; &quot;If any anyone can do it, i can do it. If no one else can do it, i must<br>
&gt;&gt; do<br>
&gt;&gt; &gt; it&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Raja Sekhar Amirapu<br>
&gt; ------------------------------------------------------<br>
&gt; &quot;If any anyone can do it, i can do it. If no one else can do it, i must do<br>
&gt; it&quot;<br>
&gt;<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>&quot;If any anyone can do it, i can do it. If no one else can do it, i must do it&quot;<br>
</div></div>
</div>