<query name="getStudyTasksByParticipantId">
from StudyTask st
join (select max(lastUpdatedDate)as lastUpdatedDate, study, clinicalStudyRegistration from
StudyTask where clinicalStudyRegistration.participant.id in (:participantIds)
group by study, clinicalStudyRegistration ) lst
where st.lastUpdatedDate = lst.lastUpdatedDate
order by st.lastUpdatedDate desc
</query>
当我运行此查询时,它会给出类似unexpected token: ( at line 3 col 30
.
这个查询有什么问题