ソースコード
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
,IFNULL(SB_S.WR_COUNT,0) 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
        ,SUM(CASE WHEN STATUS<>'AC' THEN 1 END) AS WR_COUNT
        ,MAX(AC.SUBMITTED_AT) AS SUBMITTED_AT
     FROM SUBMISSIONS AS SUB_SUB
     LEFT 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
     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:42:34
コンテスト第3回 SQLコンテスト
問題順位計算
受験者M.T
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量95 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
95 MB
データパターン2
WA
95 MB