inblog logo
|
silver
    SQL문제풀기

    [SQL문제풀기] No Order Customers

    silver's avatar
    silver
    Jan 23, 2026
    [SQL문제풀기] No Order Customers
    Contents
    문제내가 작성한 정답

    문제

    StrataScratch - No Order Customers
    StrataScratch
    StrataScratch - No Order Customers
    https://platform.stratascratch.com/coding/10142-no-order-customers?code_type=3

    내가 작성한 정답

    MySQL, PostgreSQL

    select first_name from customers where id not in (select distinct cust_id from orders where order_date between '2019-02-01' and '2019-03-01') order by 1; select first_name from customers where id not in (select distinct cust_id from orders where order_date between date'2019-02-01' and date'2019-03-01') order by 1;

    Oracle

    -- 문자열 비교라 지양 select first_name from customers where id not in (select distinct cust_id from orders where to_char(order_date,'yyyy-mm-dd') between '2019-02-01' and '2019-03-01') order by 1; -- 날짜로 바꿔서 비교 select first_name from customers where id not in (select distinct cust_id from orders where order_date between date'2019-02-01' and date'2019-03-01') order by 1;
    Share article
    Contents
    문제내가 작성한 정답

    silver

    RSS·Powered by Inblog