コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
with PLOG as (
select
SESSION_ID
,PROCESS_ID
,EX_TIMESTAMP
,row_number() over (partition by SESSION_ID order by EX_TIMESTAMP) as t_num
from PROCESS_LOG
)
, PLOG1 as (
select
SESSION_ID
,PROCESS_ID
,row_number() over (partition by SESSION_ID order by EX_TIMESTAMP) as t_num
from PLOG
where PROCESS_ID = 'STEP1' and t_num = 1
)
, PLOG2 as (
select
PLOG.SESSION_ID
,PLOG.PROCESS_ID
,row_number() over (partition by PLOG.SESSION_ID order by PLOG.EX_TIMESTAMP) as t_num
from PLOG
inner join PLOG1 PLOGN
on PLOG.SESSION_ID = PLOGN.SESSION_ID
where PLOG.PROCESS_ID = 'STEP2' and PLOG.t_num = 2
)
, PLOG3 as (
select
PLOG.SESSION_ID
,PLOG.PROCESS_ID
,row_number() over (partition by PLOG.SESSION_ID order by PLOG.EX_TIMESTAMP) as t_num
from PLOG
inner join PLOG2 PLOGN
on PLOG.SESSION_ID = PLOGN.SESSION_ID
where PLOG.PROCESS_ID = 'STEP3' and PLOG.t_num = 3
)
, PLOG4 as (
select
PLOG.SESSION_ID
,PLOG.PROCESS_ID
,row_number() over (partition by PLOG.SESSION_ID order by PLOG.EX_TIMESTAMP) as t_num
from PLOG
inner join PLOG3 PLOGN
on PLOG.SESSION_ID = PLOGN.SESSION_ID
where PLOG.PROCESS_ID = 'STEP4' and PLOG.t_num = 4
)
, PLOG5 as (
select
PLOG.SESSION_ID
,PLOG.PROCESS_ID
,row_number() over (partition by PLOG.SESSION_ID order by PLOG.EX_TIMESTAMP) as t_num
from PLOG
inner join PLOG4 PLOGN
on PLOG.SESSION_ID = PLOGN.SESSION_ID
where PLOG.PROCESS_ID = 'STEP5' and PLOG.t_num = 5
)
select
PROCESS_ID as PROCESS, count(*) as CNT
from PLOG1
union
select
PROCESS_ID, count(*)
from PLOG2
union
select
PROCESS_ID, count(*)
from PLOG3
union
select
PROCESS_ID, count(*)
from PLOG4
union
select
PROCESS_ID, count(*)
from PLOG5
order by PROCESS_ID
提出情報
提出日時 | 2023/12/18 17:14:36 |
コンテスト | 第10回 SQLコンテスト |
問題 | 顧客行動分析 |
受験者 | ckoga |
状態 (詳細) | WA (Wrong Answer: 誤答) |
メモリ使用量 | 88 MB |
メッセージ
テストケース(通過数/総数)
3/4
状態
メモリ使用量
データパターン1
AC
88 MB
データパターン2
AC
86 MB
データパターン3
AC
86 MB
データパターン4
WA
85 MB