Hi!:

I have the following SQL statement:

select f.itemRelation, f.inventDimId, avg(f.Amount) from
(select itemRelation, inventDimId, accountRelation, max(toDate)as 
maxdate from PriceDiscTable
group by itemRelation, inventDimid, accountRelation)
as x
inner join PriceDiscTable as f
on f.itemRelation = x.itemRelation
and f.inventDimid = x.inventDimId
and f.accountRelation = x.accountRelation
and f.toDate = x.maxdate
group by f.itemRelation, f.inventDimId
order by f.itemRelation

How I can translate this code to X++?.

Regards.


Reply via email to