-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreating_Tables.sql
44 lines (37 loc) · 897 Bytes
/
Creating_Tables.sql
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
DROP table if exists game_users;
CREATE table game_users
(
user_id int
,created date
,country varchar
)
;
COPY game_users FROM 'C:\Program Files\PostgreSQL\17\Datas/game_users.csv' DELIMITER ',' CSV HEADER;
DROP table if exists game_actions;
CREATE table game_actions
(
user_id int
,action varchar
,action_date date
)
;
COPY game_actions FROM 'C:\Program Files\PostgreSQL\17\Datas/game_actions.csv' DELIMITER ',' CSV HEADER;
DROP table if exists game_purchases;
CREATE table game_purchases
(
user_id int
,purch_date date
,amount decimal
)
;
COPY game_purchases FROM 'C:\Program Files\PostgreSQL\17\Datas/game_purchases.csv' DELIMITER ',' CSV HEADER;
DROP table if exists exp_assignment;
CREATE table exp_assignment
(
exp_name varchar
,user_id int
,exp_date date
,variant varchar
)
;
COPY exp_assignment FROM 'C:\Program Files\PostgreSQL\17\Datas/exp_analysis.csv' DELIMITER ',' CSV HEADER;