Posted by Hilarion on 10/26/70 11:24
> > SELECT MIN( id ) AS res_id
> > FROM some_table
> > GROUP BY prod_nr
> > ORDER BY 1
> Thank you very much!
No problem.
> Without the ordering works great.
Should also work with ordering (if you need it), but
depending on SQL engine you are using you may have to
change "ORDER BY 1" to "ORDER BY res_id" or
"ORDER BY MIN( id )".
Hilarion
[Back to original message]
|