inblog logo
|
silver
    SQL문제풀기

    [SQL문제풀기] Finding Purchases

    silver's avatar
    silver
    Jan 19, 2026
    [SQL문제풀기] Finding Purchases
    Contents
    문제내가 작성한 정답

    문제

    StrataScratch - Finding Purchases
    StrataScratch
    StrataScratch - Finding Purchases
    https://platform.stratascratch.com/coding/10553-finding-purchases?code_type=7

    내가 작성한 정답

    MySQL, PostgreSQL, Oracle

    select distinct user_id from (select user_id, created_at-lag(created_at) over(partition by user_id order by created_at) d from amazon_transactions) a where d between 1 and 7 order by 1;
    Share article

    silver

    RSS·Powered by Inblog