List<ArrivalItemAvgEntryExitTimeEntity>items = context.
selectDistinct( ARRIVAL_ITEMS_ENTRY_EXIT_RT.WAREHOUSE,
ARRIVAL_ITEMS_ENTRY_EXIT_RT.ITEM,
percentileCont(percentile).withinGroupOrderBy(ARRIVAL_ITEMS_ENTRY_EXIT_RT.ENTRY_REMAINING_TIME).as("AVERAGE_ENTRY_REMAINING_TIME"),
percentileCont(percentile).withinGroupOrderBy(ARRIVAL_ITEMS_ENTRY_EXIT_RT.EXIT_REMAINING_TIME).as("AVERAGE_EXIT_REMAINING_TIME")). //
from(ARRIVAL_ITEMS_ENTRY_EXIT_RT). //
groupBy(ARRIVAL_ITEMS_ENTRY_EXIT_RT.WAREHOUSE). //
fetchInto(ArrivalItemAvgEntryExitTimeEntity.class);
The expected results are:
AVERAGE_ENTRY_REMAINING_TIME: 17.55
AVERYGE_EXIT_REMAINING_TIME: 12.25
But it returns 0.0 for both calculated columns

I also tried a normal select instead of selectDistinct, but I got the same result.
Any hint what I'm doing wrong here?
thanks
Christian Schneider