0
我有Cassandradb一個見下表提到:怎麼做cassandradb計數表的查詢
CREATE TABLE remaining (owner varchar,buddy varchar,remain counter,primary key(owner,buddy));
通常我做一些INC/DEC操作保持場,使用CQL象下面這樣:
update remaining set remain=remain + 1 where owner='userA' and buddy='userB';
update remaining set remain=remain + 1 where owner='userA' and buddy='userC';
....
,現在我需要找出用戶A的所有哥們它是REMAIN場大於1.當我使用:
select buddy,remain from remaining where owner='userA' and remain > 0;
給我一個錯誤:
No indexed columns present in by-columns clause with Equal operator
如何以cassandradb的方式做到這一點?