Oliver,
>
> select min(preis),lfd from database where marke='marke'
> and typ not like 'R%'
> and typ not like 'X%'
> and typ not like 'C%'
> group by preis
>
> this doesn´t bring the expected pair "preis / lfd" but all available
> "preis/lfd" grouped ascending.
>
you're grouping by the same column you're trying to aggregate with MIN(),
so it's normal that you're getting all of the values of 'preis' in the
result. You might want to GROUP BY a different column, e.g. 'typ' or
'marke' in your example.
HTH,
Peter
sql, query
--
GPG ID D40940EC
FPR 89CC E331 FFD0 3138 9CB2 FE0D 122E 9EC9 D409 40EC
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php