Thread: SELECT
View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:27 AM
jacek_witkowski@wp.pl
 
Posts: n/a
Default SELECT

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.

Reply With Quote