ソースコード
WITH TEMP AS
(
    SELECT
         MAIN.USER_ID   AS USER_ID
        ,SUM(SUB.POINT) AS POINT
        ,strftime('%s', MAX(SUB.SUBMITTED_AT)) - strftime('%s', STARTED_AT) AS EX_TIME
        ,SUM(CASE WHEN STATUS != 'AC' THEN 1 ELSE 0 END) AS WRONG_ANS
    FROM ENTRIES AS MAIN
         INNER JOIN SUBMISSIONS AS SUB
         ON MAIN.ENTRY_ID = SUB.ENTRY_ID
    WHERE MAIN.CONTEST_ID  = 2
    GROUP BY MAIN.USER_ID
)
SELECT
     RANK() OVER(ORDER BY POINT DESC, EX_TIME, WRONG_ANS) AS RANK
    ,USER_ID
    , POINT
    ,EX_TIME + (300 * WRONG_ANS) AS EX_TIME
    ,WRONG_ANS
FROM TEMP
ORDER BY RANK, WRONG_ANS, USER_ID
提出情報
提出日時2022/10/19 18:00:18
コンテスト第3回 SQLコンテスト
問題順位計算
受験者jalapeno
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量103 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
103 MB
データパターン2
WA
86 MB