Skip to content

Commit

Permalink
Update 2021-08-19-MySQL Query.md
Browse files Browse the repository at this point in the history
  • Loading branch information
seohyun-kim authored Aug 25, 2021
1 parent ebee5a0 commit 18d8e6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _posts/2021-08-19-MySQL Query.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ CREATE EVENT `hourly_stats`
<br>

![image](https://user-images.githubusercontent.com/61939286/130488313-a055bbf2-b5da-44de-8e51-7b734580732c.png)


(데이터가 들어오는 것이 없어서 NULL 상태, 시간에 맞추어 잘 작동됨)
```sql
# 1). 매일 00:00:00 에 하루치 데이터 평균과 기준값을 `day_stats` 테이블에 저장
Expand All @@ -143,6 +145,9 @@ CREATE EVENT `day_stats`

<div markdown="1">


![image](https://user-images.githubusercontent.com/61939286/130839143-866fe411-3bae-4fb0-b8e6-52f5aac8719c.png)

```sql
#### 2). 매주 월요일에 `day_stats` table의 일주일 치(7개의 row) 평균을 `week_stats` 테이블에 저장
CREATE EVENT `week_stats`
Expand Down

0 comments on commit 18d8e6a

Please sign in to comment.