Database schema:

CREATE TABLE "ATT_CLASSES" (
	"ATT_CLASS_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['0', '1'],
	"ATT_CLASS" TEXT NOT NULL -- example: ['indoors', 'building s'],
	PRIMARY KEY ("ATT_CLASS_ID")
)


CREATE TABLE "IMG_OBJ" (
	"IMG_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['2', '1'],
	"OBJ_SAMPLE_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['2', '1'],
	"OBJ_CLASS_ID" INTEGER -- example: ['246', '298'],
	"X" INTEGER -- example: ['0', '78'],
	"Y" INTEGER -- example: ['0', '308'],
	"W" INTEGER -- example: ['722', '799'],
	"H" INTEGER -- example: ['557', '290'],
	PRIMARY KEY ("IMG_ID", "OBJ_SAMPLE_ID"), 
	CONSTRAINT fk_img_obj_obj_classes FOREIGN KEY("OBJ_CLASS_ID") REFERENCES "OBJ_CLASSES" ("OBJ_CLASS_ID")
)


CREATE TABLE "IMG_OBJ_ATT" (
	"IMG_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['2', '1'],
	"ATT_CLASS_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['0', '1'],
	"OBJ_SAMPLE_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['22', '21'],
	PRIMARY KEY ("IMG_ID", "ATT_CLASS_ID", "OBJ_SAMPLE_ID"), 
	CONSTRAINT fk_img_obj_att_att_classes FOREIGN KEY("ATT_CLASS_ID") REFERENCES "ATT_CLASSES" ("ATT_CLASS_ID"),
	CONSTRAINT fk_img_obj_att_img_obj FOREIGN KEY("IMG_ID", "OBJ_SAMPLE_ID") REFERENCES "IMG_OBJ" ("IMG_ID", "OBJ_SAMPLE_ID")
)


CREATE TABLE "IMG_REL" (
	"IMG_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['2', '1'],
	"PRED_CLASS_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['0', '1'],
	"OBJ1_SAMPLE_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['13', '12'],
	"OBJ2_SAMPLE_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['1', '34'],
	PRIMARY KEY ("IMG_ID", "PRED_CLASS_ID", "OBJ1_SAMPLE_ID", "OBJ2_SAMPLE_ID"), 
	CONSTRAINT fk_img_rel_pred_classes FOREIGN KEY("PRED_CLASS_ID") REFERENCES "PRED_CLASSES" ("PRED_CLASS_ID"),
	CONSTRAINT fk_img_rel_img_obj FOREIGN KEY("IMG_ID", "OBJ1_SAMPLE_ID") REFERENCES "IMG_OBJ" ("IMG_ID", "OBJ_SAMPLE_ID"),
	CONSTRAINT fk_img_rel_img_obj FOREIGN KEY("IMG_ID", "OBJ2_SAMPLE_ID") REFERENCES "IMG_OBJ" ("IMG_ID", "OBJ_SAMPLE_ID")
)


CREATE TABLE "OBJ_CLASSES" (
	"OBJ_CLASS_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['0', '1'],
	"OBJ_CLASS" TEXT NOT NULL -- example: ['goggles', 'awning'],
	PRIMARY KEY ("OBJ_CLASS_ID")
)


CREATE TABLE "PRED_CLASSES" (
	"PRED_CLASS_ID" INTEGER DEFAULT 0 NOT NULL -- example: ['0', '1'],
	"PRED_CLASS" TEXT NOT NULL -- example: ['looking a', 'playing on'],
	PRIMARY KEY ("PRED_CLASS_ID")
)

Question: What are the bounding boxes of the object samples with a predicted relation class of "by" in image no.1?
Evidence: bounding boxes of the object samples refers to (x, y, W, H); predicted relation class of "by" refers to PRED_CLASS = 'by'; image no.1 refers to IMG_ID = 1

SQL:
SELECT T3.X, T3.Y, T3.W, T3.H FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T1.PRED_CLASS = 'by'