«1 person». The employees whose residence differs from the location are H002 and H003, i.e. 2 people; counting only 1 falls short — this is an undercount.
○イ
正解Join the «Employee» and «Department» tables on the department code, and compare each employee's «Residence» with the «Location» of the department they belong to. Only the following 2 employees have a residence that differs from the location. H002 Shiro Takahashi: department G01 (General Affairs Dept.) is located in Tokyo, but his residence is Kanagawa Pref., so they differ. H003 Ichiro Suzuki: department G03 (Manufacturing Dept.) is located in Aichi Pref., but his residence is Mie Pref., so they differ. The remaining 4 all match (H001 = Kanagawa = Kanagawa, H004 = Osaka = Osaka, H005 = Aichi = Aichi, H006 = Kanagawa = Kanagawa). Therefore 2 employees are extracted, and the correct answer is «イ».
×Incorrectウ
«3 people». Only H002 and H003 differ, i.e. 2 people. For example H006 (residence Kanagawa Pref.; department G02 Sales Dept. located in Kanagawa Pref.) matches, so H006 is not extracted and the total never reaches 3.
×Incorrectエ
«4 people». This overcounts by also including the employees whose location matches their residence (H001, H004, H005, H006). In reality only 2 differ.
ここがポイント
Join: link the two tables using the shared column (department code) as the key, so that each employee's department location can be referenced.
Evaluating the extraction condition: from each joined row, select only the rows where «residence ≠ location» (selection), then count how many there are.