ソースコード
update scores 
 set passed = TRUE
 from (select avg((select score from scores where subject_code = 'S00001')) as avg1 from scores) as sub
where  score >= sub.avg1 and subject_code = 'S00001';

update scores 
 set passed = TRUE
 from (select avg((select score from scores where subject_code = 'S00002')) as avg2 from scores) as sub
where  score >= sub.avg2 and subject_code = 'S00002';

update scores 
 set passed = TRUE
 from (select avg((select score from scores where subject_code = 'S00003')) as avg3 from scores) as sub
where  score >= sub.avg3 and subject_code = 'S00003';

update scores
 set passed = FALSE
where passed is null;
提出情報
提出日時2024/07/08 10:49:16
コンテストSQLの教科書確認用コンテスト4
問題副問合せの結果で絞り込み2
受験者asano
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量113 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
97 MB
データパターン2
WA
109 MB
データパターン3
WA
113 MB