Re: Sort and remove duplicates
- From: Martijn Lievaart <m@xxxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 22:54:43 +0200
On Fri, 28 Sep 2007 06:10:54 -0700, JimJx wrote:
Hi everyone,
Got what should be an easy problem.
I have a db (MySQL) that I need to sort on the first field and remove
dups from.
For example, let's say I have Red,1,2,3,4,5 and Blue,1,2,3,4,5 and
Green,1,2,3,4,5 and Green,2,2,2,2,2
How can I come out with Blue,1,2,3,4,5;Green,1,2,3,4,5;Red,1,2,3,4,5??
I know that there is a simple way to do this but my brain is not
functioning right now.
select field1, min(field2), min(field3) ... from table group by field1;
HTH,
M4
.
- References:
- Sort and remove duplicates
- From: JimJx
- Sort and remove duplicates
- Prev by Date: Re: looping questions
- Next by Date: Re: looping questions
- Previous by thread: Re: Sort and remove duplicates
- Next by thread: Read attachment
- Index(es):
Relevant Pages
|
|