Hello,
thank you! It can be/it is so simple. Best regards Olaf Am 18.10.2012 12:57, schrieb Olaf Kluge: > Sorry, > > > > where teilenr = a.teilenr of course… > > > > > > Hello everybody, > > today perhaps I have a simple question. > > In a table there are the following fields: > > Partnumber; quantity; price > > ABC; 1; 115€ > > ABC; 10; 100€ > > ABC; 20; 80€ > > Now I would like one sql-query-result, the price for the greatest quantity. > > I have the following: > > SELECT PREIS > > FROM TSTAFFELPREISE a where > > TEILENR ='210094LG' and vanz = (select max(vanz) from tstaffelpreise where > teilenr How about: SELECT FIRST 1 PREIS FROM TSTAFFELPREISE where TEILENR ='210094LG' ORDER BY VANZ DESC [Non-text portions of this message have been removed]