Hi there,
I came across with a problem and stuck on it , I want to get the last record in a group of value.
For example :
I have a table called 'flight_times' , the table has those columns respectively : id, aircraft_id , departure, arrival ,flight_time, effective_from.
I want to group that table by departure and arrival , then want to get the records that has the latest effective_from value.
When I try to use groupBy statement , it always gives the first record . That is a big problem for me.
Any helps ?