MF
Size: a a a
MF
DE
MF
IZ
select hr2.id
from hotel_rooms hr2
join check_in_hotel c on hr2.id = c.room_id
where hr2.id = hr.id
and ? = hr2.seat_count
IZ
IZ
MF
IZ
MF
MF
TT
DE
TT
create table hotels
(
id bigint not null primary key auto_increment,
name varchar(40) not null unique,
description text,
location_id bigint not null
);
create table hotel_rooms
(
id bigint not null primary key auto_increment,
number int not null,
price int not null,
seat_count int not null,
hotel_id bigint not null,
description text,
foreign key (hotel_id) references hotels (id)
);
create table check_in_hotel
(
id bigint not null primary key auto_increment,
start_date datetime not null,
end_date datetime not null,
room_id bigint not null,
tour_id bigint not null,
tourist_id bigint not null,
description text,
foreign key (room_id) references hotel_rooms (id)
);
S
create table hotels
(
id bigint not null primary key auto_increment,
name varchar(40) not null unique,
description text,
location_id bigint not null
);
create table hotel_rooms
(
id bigint not null primary key auto_increment,
number int not null,
price int not null,
seat_count int not null,
hotel_id bigint not null,
description text,
foreign key (hotel_id) references hotels (id)
);
create table check_in_hotel
(
id bigint not null primary key auto_increment,
start_date datetime not null,
end_date datetime not null,
room_id bigint not null,
tour_id bigint not null,
tourist_id bigint not null,
description text,
foreign key (room_id) references hotel_rooms (id)
);
DE
TT
DE
DE
DE
DE