user2775114
user2775114

Reputation: 21

CQL Query to return maximum value in a columnfamily

Please find below columnfamily rating. I have one below use case. Column rating_total is having counter datatype and increments the value . I want to get
CQL Query to return maximum value in a columnfamily.

Use Case

Top Rated Product.

ColumnFamily

CREATE TABLE rating_count ( ratingid uuid, rating_total counter, PRIMARY KEY (ratingid) );

Please suggest if any process is available.

Upvotes: 0

Views: 2148

Answers (1)

catpaws
catpaws

Reputation: 2283

The example here isn't exactly like your use case, but perhaps it will give you some ideas: http://www.datastax.com/documentation/cql/3.1/cql/cql_using/use_counter_t.html

Upvotes: 1

Related Questions