0
我有一张桌子在“卡桑德拉”chat_matches。并且想要将所有消息的from_id计数为不同的to_id与行数(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)
);
你想from_id,to_id,COUNT(*)GROUP BY from_id,to_id查询to_id? – nevsv
是的,想要获得总聊天数。 – Shanu