Hello to everybody,
I have a table called tbl with three fields id,idcat,insertdate
i need with _one_ query to obtain for each individual idcat the last in date, and i also need to have the record id.
this is the table
|id |idcat|insertdate
|11 |1 |1/1/2004
|21 |1 |2/1/2004
|33 |2 |3/1/2004
|46 |2 |4/1/2004
|15 |2 |5/1/2004
|66 |3 |6/1/2004
|78 |3 |7/1/2004
and this is how the result must be
|id |idcat|insertdate
|21 |1 |2/1/2004
|15 |2 |5/1/2004
|78 |3 |7/1/2004
I have tried many solutions with aggregation query but non have worked
can anybody help me?