使用下表定义:
CREATE TABLE device_by_create_date (
year int,
comm_nr text,
created_at timestamp,
PRIMARY KEY ((year, comm_nr), created_at)
) WITH CLUSTERING ORDER BY (created_at DESC)
Comm_nr
是唯一标识符。
我希望看到按created_at
列排序的数据,而添加数据时并非如此。
示例条目:
表 CQL:
如何发出select * from table;
查询,返回按created_at
行排序的数据?