SELECT substanz.bezeichnung, maxdat.MaxvonDatumWEG, weg.Einheitsgröße, weg.eh, weg.preis FROM substanz, weg, [select weg.substanzid , Max(WEG.DatumWEG) AS MaxvonDatumWEG from weg group by weg.substanzid ]. AS MAXDAT WHERE Substanz.Id = WEG.SubstanzId and maxdat.SubstanzId = WEG.SubstanzId and maxdat.MaxvonDatumWEG = weg.DatumWEG ORDER BY substanz.bezeichnung, weg.preis, MaxvonDatumWEG;