select * from input_data

Create table ResourceType(
	id serial Primary key,
	type varchar
)
Create table Meter_read(
	id Serial Primary key,
	Verification_id int,
	foreign key (Verification_id) References Verification(id),
	DateTimeOffset date,
	FirstTariffValue decimal,
	SecondTariffValue decimal,
	ThirdTariffValue decimal
)

Create Table Verification(
	id serial Primary key,
	Verifiction_date date,
	ValidTo date
)



Create table Meter(
	id Serial Primary key,
	resourse_id int,
	apartments_id int,
	house_id int,
	Foreign key (resourse_id) references ResourceType(id),
	foreign key (apartments_id) References Apartments(id),
	foreign key (house_id) References House(id),
	Manufacturer varchar,
	Model varchar,
	SerialNumber varchar,
	VerificationInterval int,
	InstallationDate date,
	DismantlingDate date,
	IsFirstTariffInUse bool,
	IsSecondTariffInUse bool,
	IsThirdTariffInUse bool
)

Create table Apartments(
	ID SERIAL Primary key,
	house_id int,
	Number varchar,
	foreign key (house_id) References House(id)
)

Create table House(
	id serial Primary key,
	Street varchar,
	Number varchar
)