[MEDIUM] Weather Observation Station 18
·
SQL/Hacker Rank
Weather Observation Station 18 | HackerRank Query the Manhattan Distance between two points, round or truncate to 4 decimal digits. www.hackerrank.com 문제 조건 Consider P1(a,b) and P2(c,d) to be two points on a 2D plane. happens to equal the minimum value in Northern Latitude (LAT_N in STATION). happens to equal the minimum value in Western Longitude (LONG_W in STATION). happens to equal the maximu..
[MEDIUN] New Companies
·
SQL/Hacker Rank
New Companies | HackerRank Find total number of employees. www.hackerrank.com 문제 조건 Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of emplo..
[EASY] Japanese Cities' Names
·
SQL/Hacker Rank
Japanese Cities' Names | HackerRank In this challenge, you will query a list of all the Japanese cities' names. www.hackerrank.com 문제 조건 Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN. 문제 풀이 select name from city where countrycode = 'JPN'
[EASY] Japanese Cities' Attributes
·
SQL/Hacker Rank
Japanese Cities' Attributes | HackerRank Query the attributes of all the cities in Japan. www.hackerrank.com 문제 조건 Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN. 정답 쿼리 select * from city where countrycode = 'JPN'
[EASY] Select By ID
·
SQL/Hacker Rank
Select By ID | HackerRank Query the details of the city with ID 1661. www.hackerrank.com 문제 조건 Query all columns for a city in CITY with the ID 1661. 정답 쿼리 select * from city where id = 1661
[MEDIUM] Binary Tree Nodes
·
SQL/Hacker Rank
Binary Tree Nodes | HackerRank Write a query to find the node type of BST ordered by the value of the node. www.hackerrank.com 문제 풀이 select n, (case when p is null then "Root" when n in (select p from BST) then "Inner" else "Leaf" end) from BST order by n
[MEDIUM] The PADS
·
SQL/Hacker Rank
The PADS | HackerRank Query the name and abbreviated occupation for each person in OCCUPATIONS. www.hackerrank.com 문제 조건 1. Occupations 테이블에 있는 Name을 알파벳 순서로 정렬하여 출력하는데, Name 바로 끝에 각 직업의 첫 문자열을 괄호를 이용하여 추가하여 출력시켜라. 2. 각 직업에 속하는 Name을 카운트 시켜라. 1차 정렬기준은 [occupation_count]를 오름차순으로, 2차 정렬기준은 [occupation]의 알파벳 순서로 정렬해라. 문제 풀이 select concat(name, '(', left(occupation,1), ')') from occupations order by..
[EASY] Select All
·
SQL/Hacker Rank
보호되어 있는 글입니다.