137.2345 보다 낮은 북위도 중 가장 큰 값을 찾는 쿼리를 출력하는 문제입니다.
문제)
Query the greatest value of the Northern Latitudes (LAT_N) from STATION that is less than 137.2345. Truncate your answer to decimal places.
그리고 소수점을 4자리 밑으로는 제외(버리기)를 해줍니다.
select truncate(max(lat_n),4)
from station
where lat_n < 137.2345
크게 어렵지 않은 문제였지만 truncate 함수에 대해서 알 수 있는 문제였습니다.
'SQL 스터디 > HackerRank' 카테고리의 다른 글
[해커랭크] MySQL JOIN - New Companies (0) | 2023.09.12 |
---|---|
[해커랭크] MySQL - Binary Tree Nodes (0) | 2023.09.12 |
[해커랭크] MySQL 숫자를 문자로 변환하기(CAST) - The Blunder (0) | 2023.09.11 |
[해커랭크] MySQL concat 구문 - The PADS (0) | 2023.09.11 |
[해커랭크] MySQL CASE 구문 - Type of Triangle (0) | 2023.09.11 |