title: CQL SELECT greater-than query on indexed non-key column
body: <p>EDIT1: added a case to describe the problem after the original question.</p>
  
  <p>I wish to query on a column which is not part of my key. If I understand correctly, I need to define a secondary index on that column. However, I wish to use a greater than condition (not just equality condition) and that still seems unsupported.</p>
  
  <p>Am I missing something? 
  How would you address this issue?</p>
  
  <p>My desired Setup:</p>
  
  <pre><code>Cassandra 1.1.6
  CQL3
  
  CREATE TABLE Table1(
               KeyA int,
               KeyB int,
               ValueA int,
               PRIMARY KEY (KeyA, KeyB)
             );
  
  CREATE INDEX ON Table1 (ValueA);
  
  SELECT * FROM Table1 WHERE ValueA &gt; 3000;
  </code></pre>
  
  <p>Since defining a secondary index on ColumnFamilies with Composite Keys is still not supported in Cassandra 1.1.6 I have to settle on a temporary solution of dropping one of the keys but I still have the same problem with non equality conditions.</p>
  
  <p>Is there another way to address this?</p>
  
  <p>Thank you for your time.</p>
  
  <p>Relevant sources:
  <a href="http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt" rel="nofollow noreferrer">http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt</a>
  <a href="http://www.datastax.com/docs/1.1/ddl/indexes" rel="nofollow noreferrer">http://www.datastax.com/docs/1.1/ddl/indexes</a></p>
  
  <hr>
  
  <p>EDIT1</p>
  
  <p>Here's a case that will explain the problem. As rs-atl noted, it might be a data model problem. Let's say I keep a column family of all the users on stackoverflow. for each user I keep a batch of stats (Reputation, NumOfAnswers, NumOfVotes... all of them are int). I want to query on those stats to get the relevant users.</p>
  
  <pre><code>CREATE TABLE UserStats(
               UserID int,
               Reputation int,
               NumOfAnswers int,
               .
               .
               .
               A lot of stats...
               .
               .
               .
               NumOfVotes int,
               PRIMARY KEY (UserID)
             );
  </code></pre>
  
  <p>Now I'm interested in slicing UserID's based on those stats. I want all the users with over 10K reputation, I want all the users with less than 5 answers, etc. etc.</p>
  
  <p>I hope that helps. Thanks again.</p>