[SQL문제풀기] 유량(Flow)와 저량(Stock)

silver's avatar
Sep 30, 2025
[SQL문제풀기] 유량(Flow)와 저량(Stock)
Contents
문제SQLite

문제

SQLite

내가 작성한 정답

select ac "Acquisition year", c "New acquisitions this year (Flow)", sum(c) over (order by ac asc) "Total collection size (Stock)" from (select strftime('%Y',acquisition_date) ac ,count(artwork_id) c from artworks where acquisition_date is not null group by strftime('%Y',acquisition_date)) order by 1;
Share article

silver