I have table like this
ind_id loc_id date_created ip_address
1 20 10-12-2008 170.30
1 15 01-08-2009 175.25
2 20 11-12-2002 145.80
1 20 18-02-2003 160.50
3 20 22-10-2002 145.70
1 20 11-06-2002 130.45
2 15 19-01-2001 170.30
1 20 13-11-2000 180.45
select ind_id, min(date_create d) from table group by ind_id.
I ma getting 1 13-11-2000
2 19-01-2001
3 22-10-2002
But I want records of ind_id's with minimum date_created along all other data.
Like: 1 20 13-11-2000 180.45
2.........
3............
ind_id loc_id date_created ip_address
1 20 10-12-2008 170.30
1 15 01-08-2009 175.25
2 20 11-12-2002 145.80
1 20 18-02-2003 160.50
3 20 22-10-2002 145.70
1 20 11-06-2002 130.45
2 15 19-01-2001 170.30
1 20 13-11-2000 180.45
select ind_id, min(date_create d) from table group by ind_id.
I ma getting 1 13-11-2000
2 19-01-2001
3 22-10-2002
But I want records of ind_id's with minimum date_created along all other data.
Like: 1 20 13-11-2000 180.45
2.........
3............
Comment