Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

CREATE TABLE Tenancy_histories(

id integer Primary Key AUTOINCREMENT,


profile_id int(11),
house_id int(11) ,
move_in_date date not null,
move_out_date date,
rent int(11) Not null,
Bed_type varchar(225),
move_out_reason varchar(225),
FOREIGN KEY (profile_id)
REFERENCES Profiles(profile_id),
FOREIGN KEY (house_id)
REFERENCES Houses(house_id)
);

INSERT INTO Tenancy_histories


(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42047','42490','7500','bed','MOVE_OUT','5');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42160','','11000','room','','2');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42305','42702','12000','room','RENT_CHANGE','4');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42120','','8000','bed','','1');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42139','42365','9000','bed','MOVE_OUT','3');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42363','','10200','room','','8');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42328','','6500','bed','','6');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42318','42735','7200','bed','MOVE_OUT','7');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42292','','7500','bed','','9');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42175','','7500','bed','','10');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42245','42535','8000','bed','INTERNAL_TRANSFER','19');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42059','','11000','room','','15');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42060','','12000','room','','12');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42376','42734','13500','room','MOVE_OUT','18');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42101','','6500','bed','','13');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42117','','6500','bed','','17');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42045','','10500','room','','14');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42293','42617','8000','bed','MOVE_OUT','16');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42273','','7500','bed','','20');
INSERT INTO Tenancy_histories
(move_in_date ,move_out_date ,rent ,move_out_reason,profile_id,id)
VALUES('42277','','9500','bed','','11');

You might also like