-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.cql
53 lines (41 loc) · 1.91 KB
/
schema.cql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
CREATE KEYSPACE IF NOT EXISTS accounts WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : '1' };
CREATE TABLE IF NOT EXISTS accounts.social_media(
name text,
platform text,
url text,
time_created timestamp,
PRIMARY KEY ((name), platform, time_created)
);
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Lee Quan', 'Facebook', 'www.facebook.com/leequan', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Lee Quan', 'Facebook', 'www.facebook.com/leequan2', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Lee Quan', 'LinkedIn', 'www.linkedin.com/leequan', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Kang Yee', 'LinkedIn', 'www.linkedin.com/kangyee', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Kang Yee', 'YouTube', 'www.youtube.com/kangyee', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Kang Yee', 'YouTube', 'www.youtube.com/kangyee2', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Liang Han', 'Facebook', 'www.facebook.com/lianghan', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Liang Han', 'Facebook', 'www.facebook.com/lianghan2', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Liang Han', 'Facebook', 'www.facebook.com/lianghan3', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Liang Han', 'Reddit', 'www.reddit.com/u/lianghan', toTimeStamp(now()));
INSERT INTO accounts.social_media
(name, platform, url, time_created)
VALUES ('Liang Han', 'Reddit', 'www.reddit.com/u/lianghan2', toTimeStamp(now()));