ソースコード
with avg_tbl as (
    select avg(POINT) avg_point
    from TEST_RESULTS
    where TEST_ID = '100'
)
,sa_tbl as (
    select *
        ,POINT - (select avg_point from avg_tbl) as sa
        ,(POINT - (select avg_point from avg_tbl))*(POINT - (select avg_point from avg_tbl)) as sa_2
    from TEST_RESULTS
)
,hensa_tbl as (
    select avg(sa_2) as bunsan
        ,sqrt(avg(sa_2)) as hensa
    from sa_tbl
)
select
    USER_ID as USER
    ,POINT as PT
    ,round((POINT - (select avg_point from avg_tbl)) * 10
    / (select hensa from hensa_tbl) +50,1) as DEV_VAL
from TEST_RESULTS
where TEST_ID = '100'
order by 
    DEV_VAL desc
    ,USER_ID
提出情報
提出日時2023/02/19 09:03:47
コンテスト第5回 SQLコンテスト
問題偏差値の算出
受験者sato
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量77 MB
メッセージ
テストケース(通過数/総数)
0/4
状態
メモリ使用量
データパターン1
WA
77 MB
データパターン2
WA
75 MB
データパターン3
WA
77 MB
データパターン4
WA
76 MB