Hi Wolfgang,

   I believe both suggestions (mine and yours) are equivalent, just different ways of writing down the solution for the problem. If you identify any significant difference in the results, please let me know... :)

    Edson


2010/8/11 Wolfgang Laun <wolfgang.laun@gmail.com>
2010/8/11 Edson Tirelli <tirelli@post.com>:
>
>    "Group by" is implicit in rules, just by writing patterns in order. So,
> if you write a rule that starts with Customer(), it will automatically do a
> "group by" customer:
> when
>    Customer(...)
>    ...
> then

Hmm, I think vijrams meant "grouping of the accumulated sums" which will
require the PurchaseSum facts I proposed. Only then it is possible to obtain
all sums-per-day grouped by customer.

I don't see why "customers that purchased more than 100 on a given date"
should fire in Customer order.

Even with my solution some additional quirks will be necessary to get
the data grouped by Customer.

-W

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com