Skip to content

平成28年度 春期 ITパスポート試験 問96

This question's explanation and your answers so far.

問96
頻出度★★☆

関係データベースの“成績”表から学生を抽出するとき,選択される学生数が最も多い抽出条件はどれか。ここで,“%”は0文字以上の任意の文字列を表すものとする。また,数学及び国語は,それぞれ60点以上であれば合格とする。 成績

学籍番号氏名数学の点数国語の点数
H001佐藤 花子5090
H002鈴木 二郎5570
H003金子 一郎9095
H004高橋 春子7055
H005子安 三郎9560
出典 平成28年度 春期 ITパスポート試験 問96
解説

問 96

  • Incorrectア

    “Japanese is passing AND the name matches %子 (ends with 『子』)”. The names ending with 『子』 are Sato Hanako (H001) and Takahashi Haruko (H004), but H004 fails Japanese with 55 points. Only H001 overlaps with Japanese passing — just 1 student, fewer than エ’s 3.

  • Incorrectイ

    “Japanese is passing AND the name matches 子% (starts with 『子』)”. Only Koyasu Saburo (H005) starts with 『子』. H005 passes Japanese with 60 points, so only H005 qualifies — just 1 student, fewer than エ’s 3.

  • Incorrectウ

    “Both Math and Japanese passing”. Only Kaneko Ichiro (H003: 90/95) and Koyasu Saburo (H005: 95/60) score 60 or higher in both — 2 students. This falls short of エ’s 3 and is not the largest.

  • エ

    正解 Each student’s pass status: Math is passing (60 or higher) for H003 (90), H004 (70), and H005 (95); Japanese is passing for H001 (90), H002 (70), H003 (95), and H005 (60). Option エ’s condition is “Math is passing AND the name matches %子% (contains 『子』)”. The names containing 『子』 are Sato Hanako (H001), Kaneko Ichiro (H003), Takahashi Haruko (H004), and Koyasu Saburo (H005). Taking the intersection (AND) with Math passing gives H003, H004, and H005 — 3 students, the most among all options. Therefore エ is correct.

ここがポイント
  • The position of the LIKE wildcard 『%』 changes the matching range: 『%子』 = suffix match (ends with), 『子%』 = prefix match (starts with), 『%子%』 = partial match (contains anywhere). Partial match hits the widest range.
  • Selection extracts the rows that satisfy a condition. Note that conditions joined with AND yield the intersection of rows satisfying both.
用語

Your answers