title: Primary Key related CQL3 Queries cases & errors when sorting
body: <p>I have two issues while querying Cassandra:</p>
  
  <h2>Query 1</h2>
  
  <pre><code>&gt; select * from a where author='Amresh' order by tweet_id DESC;
  Order by with 2ndary indexes is not supported
  </code></pre>
  
  <p>What I learned: secondary indexes are made to be used only with a <code>WHERE</code> clause and not <code>ORDER BY</code>? If so, then how can I sort?</p>
  
  <h2>Query 2</h2>
  
  <pre><code>&gt; select * from a where user_id='xamry' ORDER BY tweet_device DESC;
  Order by currently only supports the ordering of columns following their
  declared order in the PRIMARY KEY.
  </code></pre>
  
  <p>What I learned: The <code>ORDER BY</code> column should be in the 2nd place in the primary key, maybe? If so, then what if I need to sort by multiple columns? </p>
  
  <p>Table:   </p>
  
  <pre><code>CREATE TABLE a(
    user_id      varchar,
    tweet_id     varchar,
    tweet_device varchar,
    author       varchar,
    body         varchar,
    PRIMARY KEY(user_id,tweet_id,tweet_device)
  );
  
  INSERT INTO a (user_id, tweet_id, tweet_device, author, body)
      VALUES ('xamry', 't1', 'web', 'Amresh', 'Here is my first tweet');
  INSERT INTO a (user_id, tweet_id, tweet_device, author, body)
      VALUES ('xamry', 't2', 'sms', 'Saurabh', 'Howz life Xamry');
  INSERT INTO a (user_id, tweet_id, tweet_device, author, body)
      VALUES ('mevivs', 't1', 'iPad', 'Kuldeep', 'You der?');
  INSERT INTO a (user_id, tweet_id, tweet_device, author, body)
      VALUES ('mevivs', 't2', 'mobile', 'Vivek', 'Yep, I suppose');
  
  Create index user_index on a(author);
  </code></pre>