ソースコード
with st as (select
LINE_ID as LINE
, SEAT_NO as SN
from SEAT_RESERVE
where rsv_status = 0
)
, sv as (select * from st as st1
where exists (
select 1 from st as st2 where st1.LINE = st2.LINE and st1.SN + 1 = st2.SN
) and 
exists (
select 1 from st as st3 where st1.LINE = st3.LINE and st1.SN + 2 = st3.SN
))
select
LINE
, SN as SEAT_F
, SN + 2 as SEAT_T
from sv
order by LINE desc, SEAT_F
提出情報
提出日時2024/06/23 16:58:20
コンテスト第13回 SQLコンテスト
問題空席検索
受験者daku10
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量92 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
92 MB
データパターン2
AC
83 MB
データパターン3
AC
84 MB