ソースコード
SELECT
 RANK() OVER(ORDER BY POINT DESC) AS RANK
,USER_ID
,SB_P.POINT AS POINT
,strftime('%s', SB_S.SUBMITTED_AT) - strftime('%s', EN.STARTED_AT) AS EX_TIME
,SB_S.WR_COUNT AS WRONG_ANS
FROM ENTRIES AS EN
INNER JOIN 
    (SELECT
         ENTRY_ID
        ,SUM(POINT) AS POINT
     FROM SUBMISSIONS
     WHERE CONTEST_ID=2
     GROUP BY
        ENTRY_ID
    ) AS SB_P
ON EN.ENTRY_ID = SB_P.ENTRY_ID
INNER JOIN 
    (SELECT
         SUB_SUB.ENTRY_ID
        ,COUNT(*) AS WR_COUNT
        ,AC.SUBMITTED_AT AS SUBMITTED_AT
     FROM SUBMISSIONS AS SUB_SUB
     INNER JOIN (
	     SELECT
	         ENTRY_ID
	        ,MAX(SUBMITTED_AT) AS SUBMITTED_AT
	     FROM SUBMISSIONS
	     WHERE CONTEST_ID=2
	     AND   STATUS = 'AC'
	     GROUP BY
	        ENTRY_ID
             ) AS AC
     ON  SUB_SUB.ENTRY_ID = AC.ENTRY_ID
     AND SUB_SUB.SUBMITTED_AT <= AC.SUBMITTED_AT
     AND SUB_SUB.STATUS <> 'AC'
     GROUP BY
        SUB_SUB.ENTRY_ID
    ) AS SB_S
ON EN.ENTRY_ID = SB_S.ENTRY_ID
ORDER BY
 RANK
,SB_S.WR_COUNT
,USER_ID

提出情報
提出日時2022/10/20 10:30:30
コンテスト第3回 SQLコンテスト
問題順位計算
受験者M.T
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量87 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
83 MB
データパターン2
WA
87 MB