Re: Re[2]: Join or smth.

2002-05-28 Thread Christoph Lütjen
select id, product, min(price), store from tablename group by product Better? Regards Chris - Original Message - From: "Ciprian Trofin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 1:24 PM Subject: Re[2]: Join or smth. > Doesn't work the way I want

Re: Re[2]: Join or smth.

2002-05-28 Thread Richard Clarke
I'm sure this question should be put in the docs. It's asked at least once a fortnight. Welcome to the wonderful world of Mysql variables. create temporary table productorder select *,(@a:= IF(@b=product,@a+1,1)) as cnt, @b:=product from products order by product,price; mysql> select * from produ