ソースコード
with md1 as (
select md.MONTHLY as MONTHLY,
case md.MONTHLY when MIN(md.MONTHLY)
    THEN true
    ELSE false 
END as OLD,
case md.MONTHLY when MAX(md.MONTHLY)
    THEN true
    ELSE false
END as LATEST
from MRR_DATA as md
order by md.MONTHLY
)

with md2 as (
select md.MONTHLY as MONTHLY,
case when DATE_ADD(md.MONTHLY, INTERVAL 1 MONTH) in (select md.MONTHLY from from MRR_DATA as md)
    THEN true
    ELSE false 
END as OLD,
case md.MONTHLY when MAX(md.MONTHLY)
    THEN true
    ELSE false
END as LATEST
from MRR_DATA as md
order by md.MONTHLY
)

select md1.MONTHLY as YM, 
from MRR_DATA as md
JOIN md1 ON md1.MONTHLY = md.MONTHLY

提出情報
提出日時2023/08/28 13:40:05
コンテスト第5回 SQLコンテスト
問題MRRの集計
受験者kota3
状態 (詳細)RE
(Runtime Error: 実行時エラー)
メモリ使用量79 MB
メッセージ
SQLITE_ERROR: near "with": syntax error
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
RE
78 MB
データパターン2
RE
79 MB
データパターン3
RE
78 MB