ソースコード
UPDATE scores AS main SET passed = TRUE	
    FROM (SELECT subject_code, AVG(score) AS score FROM scores GROUP BY subject_code) AS sub
		WHERE main.score >= sub.score
		AND main.subject_code = sub.subject_code;
	
UPDATE scores AS main SET passed = FALSE	
	FROM (SELECT subject_code, AVG(score) AS score FROM scores GROUP BY subject_code) AS sub
		WHERE main.score < sub.score
		AND main.subject_code = sub.subject_code;
提出情報
提出日時2024/06/26 13:48:39
コンテストSQLの教科書確認用コンテスト4
問題副問合せの結果で絞り込み2
受験者kinou-no-gohann-ha-yude-tamago
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量105 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
104 MB
データパターン2
AC
105 MB
データパターン3
AC
104 MB