-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsql_script.sql
43 lines (40 loc) · 1.05 KB
/
sql_script.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
create database edm;
use edm;
create table algebraTrain
(
rowNumber int,
anonStudentId varchar(50),
problemHierarchy varchar(50),
problemName varchar(100),
problemView int,
stepName varchar(50),
stepStartTime varchar(50),
firstTransactionTime varchar(50),
correctTransactionTime varchar(50),
stepEndTime varchar(50),
stepDuration double,
correctStepDuration double,
errorStepDuration double,
correctFirstAttempt int,
incorrects int,
hints int,
corrects int,
kc varchar(2000),
opportunity varchar(100)
);
LOAD DATA LOCAL INFILE '/home/anjali/Downloads/algebra_2005_2006_train.csv'
INTO TABLE edm.algebraTrain FIELDS TERMINATED BY ','
ENCLOSED BY '"' LINES TERMINATED BY '\n';
DELETE FROM edm.algebraTrain where rowNumber = 0;
drop table edm.algebraTrain_clean;
create table edm.algebraTrain_clean
(
anonStudentId varchar(50),
unit varchar(50),
problem varchar(50),
correctFirstAttempt int,
kc varchar(2000)
);
use edm;
create view algebraTrainSample2 as
select * from algebraTrain limit 0,30;