Skip to content

Instantly share code, notes, and snippets.

@garo
Created July 4, 2016 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garo/807e50db39d27b0ccfb7864342b4a71b to your computer and use it in GitHub Desktop.
Save garo/807e50db39d27b0ccfb7864342b4a71b to your computer and use it in GitHub Desktop.
CREATE TABLE test (
office text,
office_team text,
ts timestamp,
team_member text,
action text,
is_team_active boolean static,
PRIMARY KEY ((office, office_team), ts, team_member)
);
INSERT INTO test (office, office_team, ts, team_member, action, is_team_active) VALUES('finland', 'dbas', '2016-06-04T12:00:00Z', 'Garo', 'Entered office', true);
INSERT INTO test (office, office_team, ts, team_member, action) VALUES('finland', 'dbas', '2016-06-04T13:00:00Z', 'Garo', 'Exitted office');
UPDATE test SET is_team_active = false WHERE office = 'finland' and office_team = 'dbas';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment