HackerRank - MS SQL Server
[해커랭크/MS SQL] Weather Observation Station 14
nomeleon
2022. 3. 28. 10:21
반응형
문제 링크입니다!
Weather Observation Station 14 | HackerRank
Query the greatest value of the Northern Latitudes from STATION that are under 137.2345 and truncated to 4 decimal places.
www.hackerrank.com
문제
=> STATION 테이블에서 LAT_N 의 값이 137.2345보다 작은 LAT_N의 최대값을 소수점 4자리 형태로 조회해라
풀이
select format(max(LAT_N),'#.0000')
from STATION
where LAT_N < 137.2345
FORMAT(Transact-SQL) - SQL Server
FORMAT 함수의 Transact-SQL 참조입니다.
docs.microsoft.com