You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOAD DATA INPATH './examples/teacher1k.csv' INTO TABLE teacher1k FIELDS TERMINATED BY "," ;
28
+
LOAD DATA INPATH './examples/teacher1k.csv' INTO TABLE teacher FIELDS TERMINATED BY "," ;
29
29
```
30
30
31
31
(3) Query :
32
32
```
33
33
// test where
34
-
(1) select teacher_name,teacher_age from teacher1k where teacher_age > 25;
34
+
(1) select teacher_name,teacher_age from teacher where teacher_age > 25;
35
35
36
36
// test like in
37
-
(2) select teacher_name,teacher_age,subject from teacher1k where teacher_name is not null and teacher_name like 'teacher_2_3%' and teacher_age not in (20,21,22,23,24,25)
37
+
(2) select teacher_name,teacher_age,subject from teacher where teacher_name is not null and teacher_name like 'teacher_2_3%' and teacher_age not in (20,21,22,23,24,25)
38
38
39
39
// test subquery
40
-
(3) select t1.teacher_name,t1.teacher_age from (select * from teacher1k where teacher_name like 'teacher_2_3%') t1 where t1.teacher_age < 25
40
+
(3) select t1.teacher_name,t1.teacher_age from (select * from teacher where teacher_name like 'teacher_2_3%') t1 where t1.teacher_age < 25
41
41
42
42
//test group by
43
-
(4) select teacher_name, sum(teacher_age) from teacher1k where grade=1 group by teacher_name
43
+
(4) select teacher_name, sum(teacher_age) from teacher where grade=1 group by teacher_name
44
44
45
45
//test join
46
-
(5) select t1.teacher_name, t2.subject, t1.teacher_age from (select teacher_name, teacher_age from teacher1k where teacher_age >=26 ) t1 join (select teacher_name, subject from teacher1k where teacher_name like 'teacher_2_3%')t2 on t1.teacher_name=t2.teacher_name
46
+
(5) select t1.teacher_name, t2.subject, t1.teacher_age from (select teacher_name, teacher_age from teacher where teacher_age >=26 ) t1 join (select teacher_name, subject from teacher where teacher_name like 'teacher_2_3%')t2 on t1.teacher_name=t2.teacher_name
0 commit comments