“Sales Dept., Systems Dept.” leaves out HR Dept. HR Dept. (003) certainly meets the condition via the failure of 10004 or 10005 and the success of 10004 at 08:53:15, so it cannot be excluded.
○イ
正解The condition is to list all the departments of employees who “have ever failed to log in” OR “have ever logged in successfully before 2022-04-10 09:00:00”. First, looking at employees with a failure record, 10004 (003 HR Dept.), 10005 (003 HR Dept.), and 10011 (001 Sales Dept.) qualify, so Sales Dept. and HR Dept. are included here. Next, looking at successes before 09:00:00, 10004 at 08:53:15 (003 HR Dept.) and 10002 at 08:55:48 (002 Systems Dept.) qualify, so Systems Dept. is added (the success at 09:00:15 is after the reference time, so it is not counted). Combining the two conditions with a logical OR, all three departments — Sales Dept., Systems Dept., and HR Dept. — are present, so the correct answer is “イ”.
×Incorrectウ
“Sales Dept., HR Dept.” leaves out Systems Dept. Systems Dept. (002) meets the condition because 10002 logged in successfully at 08:55:48, before 09:00:00, so it must be included.
×Incorrectエ
“Systems Dept., HR Dept.” leaves out Sales Dept. Sales Dept. (001) meets the “have ever failed to log in” condition because 10011 failed at 10:00:02, so it must be included.
ここがポイント
This problem combines Selection (filtering rows by a condition) with Join (matching department names by department number). Note that for an OR condition, an item qualifies as long as either one of the two conditions is satisfied.
When judging a boundary time such as “before 09:00:00”, a success even one second later, like 09:00:15, falls outside the target. The trick is to gather each employee's department into a set without duplicates.