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 is the prediction class between object class 'chain' and 'label' in image 2360078?
Evidence: prediction class refers to PRED_CLASS; object class 'chain' refers to OBJ_CLASS = 'chain'; object class 'label' refers to OBJ_CLASS = 'label'; image 2360078 refers to IMG_ID = 2360078;

SQL:
SELECT DISTINCT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T2.PRED_CLASS_ID = T1.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID AND T1.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.IMG_ID = 2360078 AND T1.OBJ1_SAMPLE_ID = 15 OR T1.OBJ2_SAMPLE_ID = 18