title: Cassandra: Error: code=2200 [Invalid query] message="PRIMARY KEY column cannot be restricted as preceding column
body: <p>Table Schema:</p>
  
  <pre><code>CREATE TABLE com (
      receiverid text,
      senderid text,
      commatriid text,
      comtype tinyint,
      comid text,
      displaystatus tinyint,
      comdate timestamp,
      cominfoid bigint,
      comstatus tinyint,
      dateactioned timestamp,
      datedeleted timestamp,
      dateread timestamp,
      dateupdated timestamp,
      disclosedmatriid tinyint,
      filteredmsg tinyint,
      message text,
      recentstatus tinyint,
      regionallang tinyint,
      transmsg text,
      PRIMARY KEY (receiverid, senderid, commatriid, comtype, comid, displaystatus, comdate)
  ) WITH CLUSTERING ORDER BY (senderid ASC, commatriid ASC, comtype ASC, comid ASC, displaystatus ASC, comdate ASC);
  </code></pre>
  
  <p>Select query with where clause:</p>
  
  <pre><code>SELECT ComInfoId,ComId,ComType,SenderId,ReceiverId,ComMatriId,ComDate,ComStatus FROM com WHERE ComMatriId='M1'AND SenderId='M79984222' and ReceiverId='M2' and ComDate &lt;= '2017-11-14 09:20:05+0000';
  </code></pre>
  
  <p>ERROR:</p>
  
  <blockquote>
    <p>InvalidRequest: Error from server: code=2200 [Invalid query]
    message="PRIMARY KEY column "comdate" cannot be restricted as
    preceding column "comtype" is not restricted"</p>
  </blockquote>
  
  <p>what is primary key column restricted as proceding column?
  if remove the comDate date in where clause ,i m able to retrive the data</p>