cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Gupta <>
Subject How to find last inserted value using CQL3
Date Thu, 30 Jan 2014 18:30:39 GMT
I am trying to find last value inserted in a Cassandra1.2 table using CQL3 but can't find a

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")

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

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.

View raw message