ERROR(515)SELECT castList.id,castList.name,castList.nameE,castList.newFace,castList.status,castList.pickup,castList.rank,castList.type,castList.course,castList.turn,castData.age,castData.height,castData.bust,castData.cup,castData.waist,castData.hip,castData.blood,castData.seiza,castData.seikantai,castData.hobby,castData.girlComment,castData.shopComment,castData.entery_date,castData.blogkey,castData.url,baseSchedule.statusSat,schedule20181208.status as status1208,baseSchedule.timeSat,schedule20181208.time as time1208 FROM castList LEFT JOIN castData ON castList.id = castData.id LEFT JOIN baseSchedule ON castList.id = baseSchedule.id LEFT JOIN schedule20181208 ON castList.id = schedule20181208.id WHERE castList.del_flag=0 AND castList.status=1 AND (schedule20181208.status IN (1,2,3,4,5,6) OR (baseSchedule.statusSat IN (1,2,3,4,5,6) AND schedule20181208.status IS NULL)) ORDER BY castList.turn ASC