Code:
select kd.IDKunde,
kd.VollerName,
ko.Datum,
ko.Kontostand
from tblKunden kd,
tblKontostand ko
where ko.IDKunde = kd.IDKunde
and ko.Datum = (select ko2.Datum
from tblKontostand ko2
where ko2.IDKunde = kd.IDKunde
and ko2.IDKontostand = ko.IDKontostand
order by ko2.datum desc
fetch first 1 row only
)
;
Alternative zur Aggregatfunktion.
pong