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