As it gives unexpected token: DAY. Anybody suggest what should be the alternative of DAY here
select p from Patient p where p.id in(select a.patient.id from p.assessments a where (a.appointmentDate <=(CURRENT_DATE + interval 6 DAY) and a.appointmentDate >=(CURRENT_DATE)) and a.chatBotStatus='LINK_CREATED')
As I am new in data JPA so any answer will be appreciable