ソースコード
update total_scores
set ranking = tmp.r
from (select student_code, rank() over(order by total_score DESC) as r from total_scores) as tmp
where total_scores.student_code = tmp.student_code;

--select * from total_scores;
提出情報
提出日時2025/02/01 11:03:44
コンテストSQLの教科書確認用コンテスト4
問題分析関数の結果で更新1
受験者inosql
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量87 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
86 MB
データパターン2
AC
87 MB