I am trying to find last value inserted in a Cassandra1.2 table using CQL3 but 
can't find a solution.

There is WRITETIME(<col name>) but that gives me time when that column was 
written.


CREATE TABLE "dev"."eventTable" (
  "eventName" text,
  "eventTime" timestamp,
  "rawEvent" text,
  PRIMARY KEY ("eventName", "eventTime")
) WITH CLUSTERING ORDER BY ("eventTime" ASC);


select WRITETIME("rawEvent"), "eventTime", "rawEvent"
from "eventTable"
where "eventName" = 'myevent'
ORDER BY "eventTime" DESC;

This returns bunch of events and their writetime, how to get last (or max) 
writetime using CQL?

Thanks,
Rahul Gupta


________________________________
This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Reply via email to