title: Querying for greatest value of Range key on AWS DynamoDb
body: <p>What is the DynamoDB equivalent of</p>
  
  <pre><code>SELECT MAX(RANGE_KEY) FROM MYTABLE WHERE PRIMARYKEY = "value"
  </code></pre>
  
  <p>The best I can come up with is</p>
  
  <pre><code>from boto.dynamodb2.table import Table as awsTable
  
  tb = awsTable("MYTABLE")
  rs = list(tb.query_2(PRIMARYKEY__eq="value", reverse=True, limit=1))
  MAXVALUE = rs[0][RANGE_KEY]
  </code></pre>
  
  <p>Is there a better way to do this?</p>