ソースコード
WITH PROCESS1 AS (
    SELECT
        SESSION_ID,
        PROCESS_ID,
        RANK() OVER (
            PARTITION BY SESSION_ID
            ORDER BY PROCESS_ID ASC
        ) AS STEP_ID,
        RANK() OVER (
            PARTITION BY SESSION_ID
            ORDER BY EX_TIMESTAMP ASC
        ) AS TIME_ID
    FROM
        PROCESS_LOG
), PROCESS2 AS (
    SELECT
        PROCESS1.*,
        RANK() OVER (
            PARTITION BY SESSION_ID
            ORDER BY PROCESS_ID ASC
        ) AS EXECUTION_ID
    FROM
        PROCESS1
    WHERE
        PROCESS1.STEP_ID || TIME_ID
)
SELECT
    PROCESS_ID AS PROCESS,
    COUNT(*) AS CNT
FROM
    PROCESS2
WHERE
    PROCESS2.TIME_ID = PROCESS2.EXECUTION_ID
GROUP BY
    PROCESS2.PROCESS_ID
ORDER BY
    PROCESS2.PROCESS_ID
提出情報
提出日時2023/12/17 18:08:29
コンテスト第10回 SQLコンテスト
問題顧客行動分析
受験者naoigcat
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量94 MB
メッセージ
テストケース(通過数/総数)
0/4
状態
メモリ使用量
データパターン1
WA
83 MB
データパターン2
WA
84 MB
データパターン3
WA
86 MB
データパターン4
WA
94 MB