
SQL | SOVESQL 2024 🎄: Day16. 스테디셀러 작가 찾기
·
SQL/SQL | SOVESQL Advent of SQL 2024 🎄
Day16. 스테디셀러 작가 찾기https://solvesql.com/problems/find-steadyseller-writers/with t1 as ( select author, year from books where genre = 'Fiction' group by author, year order by author, year), t2 as ( select author , year as p1 , lead(year,4) over(partition by author order by year asc) as p5 from t1)select author, max(p1) as year , count(DISTINCT p1) as depthfrom t2where author in (selec..