코테 준비 | Restaurant Growth(이동 평균, 누적 합 구하기 - 윈도우함수/연관 서브쿼리/ N 행 이후부터 끝까지 출력하기)
·
SQL
☑️ 1321. Restaurant Growth[문제]Compute the moving average of how much the customer paid in a seven days window (i.e., current day + 6 days before). average_amount should be rounded to two decimal places.The result format is in tReturn the result table ordered by visited_on in ascending order.레스토랑 테이블에서 일주일(6일전-현재) 까지 누적합 및 이동평균 구하기 (+7일 이후부터 출력)[문제 풀이]내 코드 - 윈도우 함수WITH daily_sales AS (-- 일별 매출집계..