DROP TABLE IF EXISTS student_attandance;
CREATE TABLE student_attandance(
student_id CHAR(5) NOT NULL
,date DATE NOT NULL
,attandance_detail VARCHAR(9) NOT NULL,
PRIMARY KEY(student_id, date),
FOREIGN KEY(student_id) REFERENCES class_student(student_id)
);
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2020-07-23','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-07-31','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-01','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-02','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-03','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00023','2020-08-07','Ijin');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-08-25','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-08-28','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00004','2020-09-25','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2020-09-30','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-10-16','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-10-29','Alfa');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00005','2020-10-30','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00001','2020-11-03','Ijin');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2020-11-09','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-11-11','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00011','2020-11-18','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-12-07','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2020-12-10','ijin');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-12-15','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2021-01-18','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00021','2021-01-29','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00017','2021-02-12','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2021-02-24','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00016','2021-03-03','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00004','2021-03-05','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00009','2021-03-23','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00023','2021-03-25','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00014','2021-03-30','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00013','2021-04-01','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00012','2021-04-21','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00001','2021-04-27','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00011','2021-04-30','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2021-05-04','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00003','2021-05-13','Alfa');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2021-05-13','Alfa');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00025','2021-05-20','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00005','2021-05-21','Sakit');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00018','2021-06-07','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00024','2021-06-25','Terlambat');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00003','2021-07-07','Alfa');
INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00009','2021-07-14','Sakit');
DROP TABLE IF EXISTS student_attandance; CREATE TABLE student_attandance( student_id CHAR(5) NOT NULL ,date DATE NOT NULL ,attandance_detail VARCHAR(9) NOT NULL, PRIMARY KEY(student_id, date), FOREIGN KEY(student_id) REFERENCES class_student(student_id) ); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2020-07-23','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-07-31','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-01','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-02','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-08-03','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00023','2020-08-07','Ijin'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-08-25','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-08-28','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00004','2020-09-25','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2020-09-30','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-10-16','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2020-10-29','Alfa'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00005','2020-10-30','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00001','2020-11-03','Ijin'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2020-11-09','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-11-11','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00011','2020-11-18','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2020-12-07','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2020-12-10','ijin'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00015','2020-12-15','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00022','2021-01-18','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00021','2021-01-29','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00017','2021-02-12','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00020','2021-02-24','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00016','2021-03-03','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00004','2021-03-05','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00009','2021-03-23','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00023','2021-03-25','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00014','2021-03-30','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00013','2021-04-01','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00012','2021-04-21','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00001','2021-04-27','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00011','2021-04-30','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00010','2021-05-04','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00003','2021-05-13','Alfa'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00019','2021-05-13','Alfa'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00025','2021-05-20','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00005','2021-05-21','Sakit'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00018','2021-06-07','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00024','2021-06-25','Terlambat'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00003','2021-07-07','Alfa'); INSERT INTO student_attandance(student_id,date,attandance_detail) VALUES ('00009','2021-07-14','Sakit');