ソースコード
with last_order as (
    select
        *
    from
        ec_orders as eo,
        member_mst as mm
    where
        order_datetime < "2023-07-01"
    group by
        eo.member_code
    order by
        order_datetime desc
)

select
    eo.order_datetime as ORDER_DATE,
    mm.member_code as CODE,
    case
        when mm.optout_type = 0 then "可"
        when mm.optout_type = 1 then "不可"
        else "不明"
        end as OPTOUT
from
    ec_orders as eo,
    member_mst as mm,
    last_order as lo
where
    (order_date between "2023-07-01" and "2023-08-01")
    and eo.member_code = lo.member_code
group by
    code
order by
    order_date desc,
    code desc
提出情報
提出日時2023/10/16 11:32:30
コンテスト第9回 SQLコンテスト
問題クーポン配布対象
受験者kntnmn
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量95 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
94 MB
データパターン2
WA
95 MB