从Go lang的dynamodb表中获取所有唯一值

how do i implement below sql in go lang on dynamo db .

select *
from MyTable t
inner join (
    select username, max(date) as MaxDate
    from MyTable
    group by username
) tm on t.username = tm.username and t.date = tm.MaxDate

input

col1   col2
------------
a        jan-01-2019
b        jan-01-2019
b        jan-01-2018
a        jan-01-2016

result would be something like below

col1   col2
------------
a        jan-01-2019
b        jan-01-2019

I recommend you start looking through the DynamoDB best practices documentation first and then watch this video at least 5 times, maybe more. Then come back and ask a new question. The best thing you can do is learn to use the tool correctly first, regardless of which NoSQL database you look at.

Right now, you are not giving us enough to go on and it looks like you need to do some more homework. It'd be different if you and I were at a whiteboard, then I could tease information out of you. Since we are not, the onus is on you to do more and describe better, sorry.