DROP TABLE IF EXISTS tuition_price_history;
CREATE TABLE tuition_price_history(
tuition_id VARCHAR(8) NOT NULL
,effective_date DATE NOT NULL
,price VARCHAR(9) NOT NULL,
INDEX(tuition_id,effective_date),
FOREIGN KEY (tuition_id) REFERENCES tuition(tuition_id)
);
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10BEA100','2000-07-24','$0,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10BEA50','2000-07-24','$1.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR1','2000-07-24','$2.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR2','2000-07-24','$3.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR3','2000-07-24','$4.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11BEA100','2000-07-24','$0,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11BEA50','2000-07-24','$1.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR1','2000-07-24','$2.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR2','2000-07-24','$3.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR3','2000-07-24','$4.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12BEA100','2000-07-24','$0,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12BEA50','2000-07-24','$1.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR1','2000-07-24','$2.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR2','2000-07-24','$3.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR3','2000-07-24','$4.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR1','2015-07-21','$1.500,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR2','2015-07-21','$2.500,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR3','2015-07-21','$3.500,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR1','2015-07-21','$2.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR2','2015-07-21','$5.000,00');
INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR3','2015-07-21','$7.000,00');
DROP TABLE IF EXISTS tuition_price_history; CREATE TABLE tuition_price_history( tuition_id VARCHAR(8) NOT NULL ,effective_date DATE NOT NULL ,price VARCHAR(9) NOT NULL, INDEX(tuition_id,effective_date), FOREIGN KEY (tuition_id) REFERENCES tuition(tuition_id) ); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10BEA100','2000-07-24','$0,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10BEA50','2000-07-24','$1.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR1','2000-07-24','$2.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR2','2000-07-24','$3.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('10GR3','2000-07-24','$4.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11BEA100','2000-07-24','$0,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11BEA50','2000-07-24','$1.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR1','2000-07-24','$2.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR2','2000-07-24','$3.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR3','2000-07-24','$4.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12BEA100','2000-07-24','$0,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12BEA50','2000-07-24','$1.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR1','2000-07-24','$2.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR2','2000-07-24','$3.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR3','2000-07-24','$4.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR1','2015-07-21','$1.500,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR2','2015-07-21','$2.500,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('11GR3','2015-07-21','$3.500,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR1','2015-07-21','$2.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR2','2015-07-21','$5.000,00'); INSERT INTO tuition_price_history(tuition_id,effective_date,price) VALUES ('12GR3','2015-07-21','$7.000,00');