Skip to content

Instantly share code, notes, and snippets.

@natbusa
Created October 3, 2013 11:29
Show Gist options
  • Select an option

  • Save natbusa/6808340 to your computer and use it in GitHub Desktop.

Select an option

Save natbusa/6808340 to your computer and use it in GitHub Desktop.
Create a
CREATE TABLE followers (
key text,
created timestamp,
messages_count int,
likes_count int,
PRIMARY KEY (key)
);
insert into followers (key, created, messages_count, likes_count) values ('123_567','2011-02-03T04:05:00+0000',2,5) ;
insert into followers (key, created, messages_count, likes_count) values ('123_890','2011-08-21T18:05:00+0000',1,2) ;
insert into followers (key, created, messages_count, likes_count) values ('222_567','2012-03-03T07:05:00+0000',3,0) ;
cqlsh:test> select * from followers ;
key | created | likes_count | messages_count
---------+--------------------------+-------------+----------------
123_890 | 2011-08-21 20:05:00+0200 | 2 | 1
222_567 | 2012-03-03 08:05:00+0100 | 0 | 3
123_567 | 2011-02-03 05:05:00+0100 | 5 | 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment