ソースコード
with T1 as(
    select
        line_id
        ,seat_no+1 as sn
    from seat_reserve
    where rsv_status = '0'
)
,T2 as(
     select
        line_id
        ,seat_no+2 as sn
    from seat_reserve   
    where rsv_status = '0'
)
select
    T.line_id as LINE
    ,T.seat_no-2 as SEAT_F
    ,T2.sn as SEAT_T
from seat_reserve as T
inner join T1
on T.seat_no=T1.sn
and T.line_id=T1.line_id
inner join T2
on T.seat_no=T2.sn
and T.line_id=T2.line_id
where T.rsv_status = 0
order by T.line_id desc,seat_f
提出情報
提出日時2024/08/20 13:18:27
コンテスト第13回 SQLコンテスト
問題空席検索
受験者HamamatsuUnagi
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量87 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
87 MB
データパターン2
AC
85 MB
データパターン3
AC
83 MB