title: Querying DynamoDB with unique hash attributes?
body: <p>I'm planning to have a <code>User</code> table with <code>UserName</code> as the hash key and a <code>LastLoginDate</code> attribute (among others).</p>
  
  <p>I would like to be able to query the table for something like:  All users that have not logged in for the last month.</p>
  
  <p>How would I do this with DynamoDB?</p>
  
  <p>I have been looking at local secondary indices, and thought of making <code>LastLoginDate</code> a secondary index.  But how I understand the <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html" rel="nofollow">documentation</a>, secondary indices only help order results for the same hash key, and in my case each user will have a unique <code>UserName</code>.  Does this make such a secondary index pointless?</p>
  
  <p>Thanks in advance!</p>