Again, thanks to all, who helped. None of your advices gave the desired pair combination >single row preis/ lfd<, but just looking at the first row, gave the correct answer as I grouped by preis, lfd. I was irritated by the results, the command-line gave me. Even as I wanted the quantity of returned rows (numrows) to be a flag.
So now I use the sql-query : 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, lfd; (this gives me several lines ordered, so the min(preis),lfd is the first row) Oliver --------------------------------------------------------------------- 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