title: "ORDER BY is only supported when the partition key is restricted by an EQ or an IN." cassandra
body: <p>I have created my table like this..</p>
  
  <pre><code>CREATE TABLE test1.mytest (
      id text,
      year text,
      time bigint,
      crtby text,
      data text,
      postid text,
      upby text,
      PRIMARY KEY ((id, year), time)
  ) WITH CLUSTERING ORDER BY (time DESC)
  
  
  </code></pre>
  
  <p>I want to sort my data based on time key.</p>
  
  <pre><code>
  SELECT * FROM test1.mytest WHERE id ='b' ORDER BY time asc ALLOW FILTERING ;
  </code></pre>
  
  <p>when i try the above command i am getting </p>
  
  <pre><code>InvalidRequest: Error from server: code=2200 [Invalid query] message="ORDER BY is only supported when the partition key is restricted by an EQ or an IN."
  </code></pre>