コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
with out as (
select a.*
from process_log as a
inner join process_log as b
on a.session_id = b.session_id
and a.ex_timestamp < b.ex_timestamp
and cast(substr(a.process_id,5,1) as int) -1 = cast(substr(b.process_id,5,1) as int)
)
,seiki as (
select a.*
from process_log as a
inner join process_log as b
on a.session_id = b.session_id
and a.ex_timestamp > b.ex_timestamp
and cast(substr(a.process_id,5,1) as int) -1 = cast(substr(b.process_id,5,1) as int)
)
,out_type2 as (
select a.*
from process_log as a
left outer join seiki
on a.session_id = seiki.session_id
and a.process_id = seiki.process_id
and a.user_id = seiki.user_id
and a.ex_timestamp = seiki.ex_timestamp
where cast(substr(a.process_id,5,1) as int) > 1
and seiki.process_id is null
)
,out2 as (
select *
from out
union all
select a.*
from process_log as a
inner join out
on a.session_id = out.session_id
and cast(substr(a.process_id,5,1) as int) > cast(substr(out.process_id,5,1) as int)
union
select a.*
from process_log as a
left outer join seiki
on a.session_id = seiki.session_id
and a.process_id = seiki.process_id
and a.user_id = seiki.user_id
and a.ex_timestamp = seiki.ex_timestamp
where cast(substr(a.process_id,5,1) as int) > 1
and seiki.process_id is null
union
select a.*
from process_log as a
inner join out_type2
on a.session_id = out_type2.session_id
and (cast(substr(a.process_id,5,1) as int) < cast(substr(out_type2.process_id,5,1) as int) and a.ex_timestamp > out_type2.ex_timestamp)
where cast(substr(a.process_id,5,1) as int) > 1
)
---------------------------
select a.process_id as PROCESS
,count(a.process_id) as CNT
from process_log as a
left outer join out2
on a.session_id = out2.session_id
and a.process_id = out2.process_id
and a.user_id = out2.user_id
and a.ex_timestamp = out2.ex_timestamp
where out2.session_id is null
group by a.process_id
order by a.PROCESS_ID
提出情報
提出日時 | 2024/02/17 21:50:47 |
コンテスト | 第10回 SQLコンテスト |
問題 | 顧客行動分析 |
受験者 | asterect |
状態 (詳細) | WA (Wrong Answer: 誤答) |
メモリ使用量 | 86 MB |
メッセージ
テストケース(通過数/総数)
0/4
状態
メモリ使用量
データパターン1
WA
85 MB
データパターン2
WA
85 MB
データパターン3
WA
86 MB
データパターン4
WA
84 MB