Need help converting SQL "OVER (PARTITION BY )" to JPQL equivalent - JPA
Having trouble converting this query:
-----------
select
sdi,
val,
vldtn,
TO_CHAR(sdt, 'yyyy-mm-dd hh:mi:ss AM')
from
(
select
sdi,
val,
vldtn,
sdt,
max(sdt) over (partition by sdi) as MaxDate1
from
r_ins
) x
where x.sdt = x.MaxDate1
and sdi in (1234,2345,3456,4567,5678,6789,7890);
-----------
to JPQL equivalent using JPA
Able to convert simple queries but I do not know how to handle the "over (partition by sdi)" portion of the query.
Can anyone help
TIA
Jer