ソースコード
WITH MAIN AS
(
    WITH MAIN AS
    (
        SELECT
            ROW_NUMBER() OVER (PARTITION BY PL.SESSION_ID ORDER BY EX_TIMESTAMP) AS SEQ,
            PL.SESSION_ID,
            PL.PROCESS_ID,
            CAST(REPLACE(PL.PROCESS_ID, 'STEP', '') AS INTEGER) AS PROCESS_NO,
            PL.USER_ID,
            PL.EX_TIMESTAMP
        FROM
            PROCESS_LOG AS PL
        ORDER BY
            PL.SESSION_ID,
            PL.EX_TIMESTAMP
    )
    SELECT
        ROW_NUMBER() OVER(PARTITION BY MAIN.SESSION_ID ORDER BY MAIN.PROCESS_ID) AS SEQ,
        MAIN.SESSION_ID,
        MAIN.PROCESS_ID,
        MAIN.PROCESS_NO,
        MAIN.USER_ID,
        MAIN.EX_TIMESTAMP
    FROM
        MAIN
    WHERE
        MAIN.SEQ = PROCESS_NO
)
SELECT
    MAIN.PROCESS_ID AS PROCESS,
    COUNT(*) AS CNT
FROM 
    MAIN
WHERE
    MAIN.SEQ = MAIN.PROCESS_NO
GROUP BY
    MAIN.PROCESS_ID
ORDER BY
    MAIN.PROCESS_ID
提出情報
提出日時2024/02/16 10:45:57
コンテスト第10回 SQLコンテスト
問題顧客行動分析
受験者mo
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量86 MB
メッセージ
テストケース(通過数/総数)
3/4
状態
メモリ使用量
データパターン1
AC
84 MB
データパターン2
AC
84 MB
データパターン3
AC
86 MB
データパターン4
WA
84 MB