A clustering key is every primary-key column after the partition key. It orders rows inside one partition, while the partition key determines where that partition is stored. In PRIMARY KEY (restaurant, ordered_at, food), restaurant is the partition key; ordered_at and food are clustering keys. section 2.2.2 section 3.3.2
Rows follow clustering-key order in the sequence named. The default is ascending natural order: food reviews sort first by ordered_at, then alphabetically by food. Specify an order deliberately when query results need a different sequence, such as newest items first. section 2.2.2 section 3.3.2
Show recent article summaries first
An article-summary table partitions rows by author_id and uses id as its clustering key. WITH CLUSTERING ORDER BY (id DESC) puts the most recent article IDs first for each author. section 5.3.2
Listing 5.4 article_summaries_by_author stores summaries by author
cqlsh: reviews> CREATE TABLE article_summaries_by_author(
author_id TIMEUUID,
id TIMEUUID,
title TEXT,
author_name TEXT,
score TINYINT,
image image,
PRIMARY KEY (author_id, id)
) WITH CLUSTERING ORDER BY (id DESC);
This CQL definition places author_id first as the partition key, then orders each author's article summaries by id descending. section 5.3.2
Clustering order also shapes valid reads. With a multi-column primary key, restrictions must begin with the partition key and continue through consecutive columns. Skipping an earlier clustering-key column prevents restricting a later one because the on-disk order cannot be used efficiently. section 7.1.1

