Finn.ian
article thumbnail
[HackerRank] Weather Observation Station 13
Algorithm & SQL/HackerRank 2023. 1. 16. 00:09

😅 문제 출처 https://www.hackerrank.com/challenges/weather-observation-station-13/problem?isFullScreen=true Weather Observation Station 13 | HackerRank Query the sum of Northern Latitudes having values greater than 38.7880 and less than 137.2345, truncated to 4 decimal places. www.hackerrank.com 1️⃣ 문제 38.7880보다 크고 137.2345보다 작은 값을 가진 STATION의 Northern Latitude(LAT_N) 합계를 쿼리합니다. 소수점 4자리로 답을 잘라냅니다. 2️..

article thumbnail
[SQL][HackerRank] Weather Observation Station 4
Algorithm & SQL/HackerRank 2023. 1. 8. 01:52

😅 문제 출처 https://www.hackerrank.com/challenges/weather-observation-station-4/problem?isFullScreen=true Weather Observation Station 4 | HackerRank Find the number of duplicate CITY names in STATION. www.hackerrank.com 1️⃣ 문제 표의 총 CITY 항목 수와 표의 고유한 CITY 항목 수 간의 차이를 찾습니다. 2️⃣ MySQL 쿼리 SELECT COUNT(city) - COUNT(DISTINCT city) FROM station; Run Code 버튼 클릭 시, Submit Code 버튼 클릭 시,

article thumbnail
[SQL][HackerRank] Weather Observation Station 3
Algorithm & SQL/HackerRank 2022. 12. 3. 18:21

😅 문제 출처 https://www.hackerrank.com/challenges/weather-observation-station-3/problem?isFullScreen=true Weather Observation Station 3 | HackerRank Query a list of unique CITY names with even ID numbers. www.hackerrank.com 1️⃣ 문제 Station에서 짝수 ID 번호를 가진 city의 city 이름 목록을 쿼리합니다. 결과를 임의의 순서로 보여주지만 응답에서 중복 항목은 제외합니다. 2️⃣ MySQL 쿼리 select distinct city from station where ifnull(mod(id,2),0) = 0; 3️⃣ mod ..

article thumbnail
[SQL][HackerRank] Revising the Select Query II
Algorithm & SQL/HackerRank 2022. 12. 3. 17:02

😅 문제 출처 https://www.hackerrank.com/challenges/revising-the-select-query-2/problem Revising the Select Query II | HackerRank Query the city names for all American cities with populations larger than 120,000. www.hackerrank.com 1️⃣ 문제 인구가 120,000명보다 큰 CITY 테이블의 모든 미국 도시에 대한 NAME 필드를 쿼리합니다. 미국의 국가 코드는 미국이다. 2️⃣ MySQL 쿼리 select name from city where population > 120000 and countrycode = 'USA'; Run Co..

검색 태그