ソースコード
with base as (
select
    SESSION_ID
    ,cast(replace(PROCESS_ID,"STEP","") as int) as PROCESS_ID
    ,row_number() over (partition by SESSION_ID order by EX_TIMESTAMP) as PR_ORDER
    ,EX_TIMESTAMP
from
    PROCESS_LOG
)
,base2 as (
select
    SESSION_ID
    ,min(EX_TIMESTAMP) as NG_TIMESTAMP
from
    base
where
    PROCESS_ID != PR_ORDER
group by
    SESSION_ID
)
select
    p.PROCESS_ID as PROCESS
    ,count() as CNT
from
    PROCESS_LOG as p
    left join
    base2 as b
    on p.SESSION_ID= b.SESSION_ID
where
    NG_TIMESTAMP is null
    or p.EX_TIMESTAMP<b.NG_TIMESTAMP
group by
    p.PROCESS_ID
提出情報
提出日時2024/03/14 14:53:17
コンテスト第10回 SQLコンテスト
問題顧客行動分析
受験者gP2fWnUzTL
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量84 MB
メッセージ
テストケース(通過数/総数)
3/4
状態
メモリ使用量
データパターン1
AC
83 MB
データパターン2
AC
84 MB
データパターン3
AC
84 MB
データパターン4
WA
84 MB