| Subject | AW: [firebird-support] Simple Question? | 
|---|---|
| Author | Olaf Kluge | 
| Post date | 2012-10-18T10:57:14Z | 
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
Is there an better way to get the result?
Thanks in advance.
Best regards
Olaf
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
            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
Is there an better way to get the result?
Thanks in advance.
Best regards
Olaf
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]