I have a table structure
CREATE TABLE user_location_by_date(
user_id int,
date text,
time timeuuid,
lat float,
lng float,
PRIMARY KEY((user_id, date),time)
)
When I try to run this query
select * from user_location_by_date where user_id=1 order by time desc limit 1;
I get this error
Partition key parts: date must be restricted as other parts are
I suppose to use where user_id=1 and date= in order to able run the query. If i dont know when is the location last inserted date. How I can get the latest location of the user?