title: How to query: filtering on multiple primary partition keys and range on primary sort key
body: <p><strong>Background</strong>
  I have a dynamoDB table consisting of a Primary Partition Key <code>clientID</code> ("N") and a Primary Sort Key <code>createdAt</code>("S") (as UTC ISO 8601 date) + some additional attributes.</p>
  
  <p><strong>Problem</strong>
  I Want to query back, all items where <code>createdAt BETWEEN</code> two dates and only for around 100 specific <code>clientID</code>s at a time. </p>
  
  <ul>
  <li><strong>Dead end 1:</strong> First I thought about using <a href="http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html" rel="nofollow">BatchGetItem</a>, however though I know what <code>clientID</code>s I want to query, I cannot specify the sort keys, since I'm looking for anything, that happen within a timeframe. </li>
  <li><strong>Dead end 2</strong>: Secondly I though about using <a href="http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html" rel="nofollow">Query</a>, however that one does not allow me to look for multiple <code>clientID</code>s at the same time (in looked at the ´IN´ operator, <a href="https://github.com/awslabs/dynamodb-document-js-sdk/issues/33" rel="nofollow">but that one does not do what I was hoping for</a>). So in other words, how can I achieve this, without having to do a <code>Query</code> for every single <code>ClientID</code> in the timeframe?</li>
  </ul>