If I have a table like below:
ID A B C D(ate)
ASDF 1 2 1 12/12/2016
ASEF 1 2 3 12/13/2016
AFDS 2 3 1 12/13/2016
ASFA 2 3 4 12/14/2016
And I want to get the latest based on a pair (A, B) and the latest date (D), how would I set up a table to work well with this request, and what kind of query would I use to retrieve that?
The output would give me values for the IDs ASEF and ASFA.
I'm using the aws-go-sdk to run this, but I should be able to convert any solution to that SDK.