I am trying to get max date using criteria builder in a subquery. But I am getting this error Required type: Expression Provided: Expression
Subquery<LocalDate> subRoot = criteriaQuery.subquery(LocalDate.class);
subRoot.select(criteriaBuilder.max(root.get("date")));
I am trying to get max date from sub query which is required in my parent query.