IPA IP 2025 Question 66

Topic: Databases

A question IPA Japan published in 令和7年度 ITパスポート試験 公開問題 問66, translated into English. ITPEC is based on the same exams.

In the “Login record” table and the “Department” table below that are managed in a relational database, which of the following lists all and only the names of the departments to which the employees belong who have had a login result of failure, or who have had a login result of success at or before 09:00:00 on April 10, 2022?

Login record

Date and timeEmploy­ee numberDepart­ment numberLogin result
2022‑04‑10 08:50:4210004003Failure
2022‑04‑10 08:53:1510004003Success
2022‑04‑10 08:55:4810002002Success
2022‑04‑10 09:00:1510001001Success
2022‑04‑10 09:01:0510012002Success
2022‑04‑10 09:03:0110008003Success
2022‑04‑10 09:10:2810007001Success
2022‑04‑10 09:32:1910002002Success
2022‑04‑10 09:39:2210005003Failure
2022‑04‑10 10:00:0210011001Failure
2022‑04‑10 10:05:5110011001Success
2022‑04‑10 10:30:4510009002Success

Department

Department numberDepartment name
001Sales Department
002Systems Department
003Personnel Department

Explanation

Sales, Systems and Personnel Departments — collect the rows that meet either condition, then look up their department numbers.

The condition is an OR of two parts: the login result is Failure (at any time), or the login result is Success at or before 09:00:00. Rows that qualify:

Date and timeEmployeeDepartmentReason
08:50:4210004003Failure
08:53:1510004003Success by 09:00:00
08:55:4810002002Success by 09:00:00
09:39:2210005003Failure
10:00:0210011001Failure

The success at 09:00:15 (10001) is after 09:00:00 and does not count, but department 001 still appears through the failure of 10011 at 10:00:02. The department numbers are 001, 002 and 003: Sales, Systems and Personnel Departments.

Answer (b)

Why not others:

  • •(a) — leaves out the Personnel Department (003), which has failures at 08:50:42 and 09:39:22
  • •(c) — leaves out the Systems Department (002), whose employee 10002 succeeded at 08:55:48
  • •(d) — leaves out the Sales Department (001), whose employee 10011 failed at 10:00:02; only the late success of 10001 is excluded, not the department

Key rule: With OR, a row qualifies if either condition holds; check each condition over all rows before discarding a group.

Databases · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.