Vielleicht brauchst du sowas?:
(ungetestet)Code:With x as (Select GNR, TNR, ZNR, Max(VGZT) MaxVGZT From YourFile Group By GNR, TNR, ZNR), y as (select * from YourFile) Select y.seq, y.PNR, Sum(x.MaxVGZT) From X, Y where x.gnr = y.gnr And x.tnr = y.tnr and x.znr = y.znr;
Bookmarks