I have a table chat_matches in "cassandra". And want to get the count of all messages from_id to distinct to_id with count of rows(group by to_id).
CREATE TABLE chat_matches(
chat_id uuid,
from_id bigint,
to_id bigint,
message text,
message_send_time timestamp,
PRIMARY KEY ((chat_id,from_id),message_send_time)
);