Closed yudisentosa closed 3 years ago
DROP TABLE IF EXISTS student_tuition; CREATE TABLE student_tuition( transaction_id VARCHAR(11) NOT NULL PRIMARY KEY ,student_id CHAR(5) NOT NULL ,tuition_id VARCHAR(8) NOT NULL ,payment_date DATE ,payment_status VARCHAR(6) NOT NULL, FOREIGN KEY (student_id) REFERENCES student(student_id), FOREIGN KEY (tuition_id) REFERENCES tuition(tuition_id) ); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120001','00001','12GR3',NULL,'UNPAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120002','00002','11BEA50','2020-08-20','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120003','00003','10GR1','2020-08-07','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120004','00004','10GR1','2020-08-21','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120005','00005','12GR2','2020-09-03','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120006','00006','10GR2','2020-09-09','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120007','00007','11BEA100','2020-08-14','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120008','00008','11GR3','2020-08-04','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120009','00009','11GR1','2020-07-20','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120010','00010','10BEA50','2020-08-29','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120011','00011','10BEA100','2020-08-06','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120012','00012','12BEA100','2020-08-08','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120013','00013','12BEA50','2020-08-02','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120014','00014','12GR3','2020-08-26','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120015','00015','11GR3','2020-09-05','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120016','00016','10GR3','2020-08-19','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120017','00017','10GR1','2020-07-24','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120018','00018','10BEA50','2020-09-12','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120019','00019','10GR2','2020-08-05','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120020','00020','10GR1','2020-07-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120021','00021','11BEA50','2020-08-01','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120022','00022','11GR1','2020-09-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120023','00023','11GR2','2020-08-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120024','00024','11GR2','2020-08-12','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120025','00025','11GR2','2020-09-02','PAID');
DROP TABLE IF EXISTS student_tuition; CREATE TABLE student_tuition( transaction_id VARCHAR(11) NOT NULL PRIMARY KEY ,student_id CHAR(5) NOT NULL ,tuition_id VARCHAR(8) NOT NULL ,payment_date DATE ,payment_status VARCHAR(6) NOT NULL, FOREIGN KEY (student_id) REFERENCES student(student_id), FOREIGN KEY (tuition_id) REFERENCES tuition(tuition_id) ); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120001','00001','12GR3',NULL,'UNPAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120002','00002','11BEA50','2020-08-20','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120003','00003','10GR1','2020-08-07','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120004','00004','10GR1','2020-08-21','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120005','00005','12GR2','2020-09-03','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120006','00006','10GR2','2020-09-09','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120007','00007','11BEA100','2020-08-14','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120008','00008','11GR3','2020-08-04','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120009','00009','11GR1','2020-07-20','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120010','00010','10BEA50','2020-08-29','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120011','00011','10BEA100','2020-08-06','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120012','00012','12BEA100','2020-08-08','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120013','00013','12BEA50','2020-08-02','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('12SEM120014','00014','12GR3','2020-08-26','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120015','00015','11GR3','2020-09-05','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120016','00016','10GR3','2020-08-19','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120017','00017','10GR1','2020-07-24','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120018','00018','10BEA50','2020-09-12','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120019','00019','10GR2','2020-08-05','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('10SEM120020','00020','10GR1','2020-07-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120021','00021','11BEA50','2020-08-01','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120022','00022','11GR1','2020-09-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120023','00023','11GR2','2020-08-17','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120024','00024','11GR2','2020-08-12','PAID'); INSERT INTO student_tuition(transaction_id,student_id,tuition_id,payment_date,payment_status) VALUES ('11SEM120025','00025','11GR2','2020-09-02','PAID');