Growth ๐ŸŒณ/Practice ๐Ÿ’ป

[ํ•ด์ปค๋žญํฌ] Weather Observation Station 16

์ธ” 2023. 1. 28. 23:31

๐Ÿ“ข ๋ณธ ํฌ์ŠคํŒ…์— ํ™œ์šฉ๋˜๋Š” ๊ธฐ๋ณธ ๋ฌธ์ œ ๋ฐ ์ž๋ฃŒ ์ถœ์ฒ˜๋Š”

       ํ•ด์ปค๋žญํฌ Prepare / https://www.hackerrank.com/dashboard  ์ž„์„ ๋ฐํž™๋‹ˆ๋‹ค.


โ–  ๋ฌธ์ œ

Query the smallest Northern Latitude (LAT_N) from STATION that is greater than . Round your answer to  decimal places.

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.


โ–  ํ’€์ด

  ๋ฌธ์ œ ์š”๊ตฌ์‚ฌํ•ญ  

38.7780 ๋ณด๋‹ค ๋†’์€ ๋ถ๋ถ€ ์œ„๋„์ค‘์—                             < WHERE ์กฐ๊ฑด1

๊ฐ€์žฅ ๋‚ฎ์€ ์œ„๋„๋ฅผ ์ฐพ์•„์„œ ๋„ท์งธ์ž๋ฆฌ๊นŒ์ง€ ๋ฐ˜์˜ฌ๋ฆผ       < ์ง‘๊ณ„ํ•จ์ˆ˜ MIN() → ์ˆซ์ž ๋ฐ˜์˜ฌ๋ฆผ ROUNDํ•จ์ˆ˜ ์‚ฌ์šฉ

SELECT ROUND(MIN(LAT_N), 4)
 FROM STATION
 WHERE LAT_N > 38.7780;