inblog logo
|
silver
    SQL문제풀기

    [SQL문제풀기] 배송 예정일 예측 성공과 실패

    silver's avatar
    silver
    Sep 13, 2025
    [SQL문제풀기] 배송 예정일 예측 성공과 실패
    Contents
    문제SQLite

    문제

    solvesql.com
    solvesql.com
    https://solvesql.com/problems/estimated-delivery-date/

    SQLite

    내가 작성한 정답

    select strftime('%Y-%m-%d',order_purchase_timestamp) purchase_date, sum(case when order_delivered_customer_date <= order_estimated_delivery_date then 1 else 0 end) success, sum(case when order_delivered_customer_date > order_estimated_delivery_date then 1 else 0 end) fail from olist_orders_dataset where strftime('%Y%m',purchase_date) = '201701' group by purchase_date;
    Share article

    silver

    RSS·Powered by Inblog