
CREATE TABLE "Reservations" (
	"Code" INTEGER, 
	"Room" TEXT, 
	"CheckIn" TEXT, 
	"CheckOut" TEXT, 
	"Rate" REAL, 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Adults" INTEGER, 
	"Kids" INTEGER, 
	PRIMARY KEY ("Code"), 
	FOREIGN KEY("Room") REFERENCES "Rooms" ("RoomId")
)


CREATE TABLE "Rooms" (
	"RoomId" TEXT, 
	"roomName" TEXT, 
	beds INTEGER, 
	"bedType" TEXT, 
	"maxOccupancy" INTEGER, 
	"basePrice" INTEGER, 
	decor TEXT, 
	PRIMARY KEY ("RoomId")
)

CREATE TABLE "Reservations" (
	"Code" INTEGER, 
	"Room" TEXT, 
	"CheckIn" TEXT, 
	"CheckOut" TEXT, 
	"Rate" REAL, 
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Adults" INTEGER, 
	"Kids" INTEGER, 
	PRIMARY KEY ("Code"), 
	FOREIGN KEY("Room") REFERENCES "Rooms" ("RoomId")
)

/*
2 rows from Reservations table:
Code	Room	CheckIn	CheckOut	Rate	LastName	FirstName	Adults	Kids
10105	HBB	23-OCT-10	25-OCT-10	100.0	SELBIG	CONRAD	1	0
10183	IBD	19-SEP-10	20-SEP-10	150.0	GABLER	DOLLIE	2	0
*/


CREATE TABLE "Rooms" (
	"RoomId" TEXT, 
	"roomName" TEXT, 
	beds INTEGER, 
	"bedType" TEXT, 
	"maxOccupancy" INTEGER, 
	"basePrice" INTEGER, 
	decor TEXT, 
	PRIMARY KEY ("RoomId")
)

/*
2 rows from Rooms table:
RoomId	roomName	beds	bedType	maxOccupancy	basePrice	decor
RND	Recluse and defiance	1	King	2	150	modern
IBS	Interim but salutary	1	King	2	150	traditional
*/
Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on  Sep 21, 2010.
SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";
[{'Nenhum': 'Nenhum resultado encontrado'}]