Thread: SELECT
View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 10:27 AM
strawberry
 
Posts: n/a
Default Re: SELECT

jacek_witkowski@wp.pl wrote:
> Hello I have the following problem:
> For the data in the TABLE:
>
> ID DATA TEXT
> 3 1994-02-11 Some not important text
> 3 1995-02-11 Some not important text
> 3 1996-02-11 Some not important text
> 3 1998-04-11 Very important text
> 4 1992-02-11 Some not important text
> 4 1994-02-11 Some not important text
> 4 1999-02-11 The test
> 5 1996-02-11 Some not important text
> 5 1997-02-11 Strange
>
>
> I do the following query:
> SELECT ID, MAX(DATA), TEXT FROM TABLE ORDER BY ID GROUP BY ID;
>
> I got the result:
> 3 1998-04-11 Some not important text
> 4 1999-02-11 Some not important text
> 5 1997-02-11 Some not important text
>
> My question is : How to get the result
>
> 3 1998-04-11 Very important text
> 4 1999-02-11 The test
> 5 1997-02-11 Strange
>
>
> Any ideas.
>
> Best
>
> Spidernet.


The answer is the same as the answer to just about every other query-
related question in this NG. Try reading around a bit before posting!

Reply With Quote