Maybe this is a very simple question but I didn't find a suitable solution for this. I have a secondary key /range key /sort key, what ever and its value is a number. So in the Table a several items with this key and I want to get the Item with the greatest number/value. I found this at stack overflow but this does not look like something from the aws documentation. In this documentation you can find gt or ge but I don't want to compare the value with a number, I want the greatest ... Maybe you can help
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If the property you want to query is your sort/range key, you only need to set ScanIndexForward=false
(order descending) and set the Limit
to 1