0

I'm using ESPER with JAVA and I'm trying to make a statement that performs a group-by DAY. the property is of DateTime type. I've tryed using

EPStatement cepStatement = cepAdm.createEPL("select sum((NVL(LST.value,TSUR.value)-10.0)/96.0) as add, LST.data.getDayOfMonth() as dia"+
                                                " from LST.win:time(60 min), TSUR.win:time(60 min) "+
                                                "where LST.data.getDayOfMonth() = TSUR.data.getDayOfMonth() and LST.data.getHourOfDay() = TSUR.data.getHourOfDay() "+
                                                "and NVL(LST.value, TSUR.value)>10.0 "+
                                                "Group by LST.data.getDayOfMonth()");

But I'm getting the error "Group-by expressions must refer to property names"...

NunoRibeiro
  • 511
  • 2
  • 7
  • 22

1 Answers1

0

Try to make the "LST.data.getDayOfMonth()" in the group by use an event property instead for example "LST.data.dayOFMonth". Espers JIRA page is at https://jira.codehaus.org/browse/ESPER in case you want to file an issue or request.

user650839
  • 2,594
  • 1
  • 13
  • 9