본문 바로가기

열정가득한 개발자의 이야기/hacker Rank SQL 문제

Weather observation station 20

So I succesfully solved the problem in medium level.

it is about median.

let's check about the way to solve this problem. 

 

To solve it, we should know about Median what is it.

median is just middle of number.

so for solving this, we should think how to know the median.

 

Solution :

1) For checking median, using ROW_NUMBER method, so we can know the middle of number. 

2) Using temporary table, we can adjust it whatever we want.

3) And most important things is how to know the middle of number about ROW_NUMBER?

just using AVG()! aggregatoin method. 

 

It is my solution.

 

 

when I read this problem, it looks like really really hard, but start to think simplly, I can think more strategically.

so I solved this quickly hahaha 

 

good girl hahaha