ソースコード
UPDATE scores
SET ranking = sub.rank
FROM (SELECT student_code,RANK() OVER(ORDER BY score DESC) AS rank FROM scores) AS sub
WHERE scores.student_code=sub.student_code
AND subject_code = "S00001";

UPDATE scores
SET ranking = sub.rank
FROM (SELECT student_code,RANK() OVER(ORDER BY score DESC) AS rank FROM scores) AS sub
WHERE scores.student_code=sub.student_code
AND subject_code = "S00002";

UPDATE scores
SET ranking = sub.rank
FROM (SELECT student_code,RANK() OVER(ORDER BY score DESC) AS rank FROM scores) AS sub
WHERE scores.student_code=sub.student_code
AND subject_code = "S00003"
提出情報
提出日時2024/06/26 16:33:21
コンテストSQLの教科書確認用コンテスト4
問題分析関数の結果で更新2
受験者shakemayo
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量102 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
90 MB
データパターン2
WA
96 MB
データパターン3
WA
102 MB