[Easy] Weather Observation Station 3
·
SQL/hacker rank
Weather Observation Station 3 | HackerRank Query a list of unique CITY names with even ID numbers. www.hackerrank.com 문제 조건 Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. 문제 풀이 SELECT DISTINCT city FROM STATION WHERE (ID % 2 ) = 0
[EASY] Weather Observation Station 1
·
SQL/hacker rank
Weather Observation Station 1 | HackerRank Write a query to print the CITY and STATE for each attribute in the STATION table. www.hackerrank.com 문제 조건 station 테이블에서 city와 state를 출력하시오. 문제 풀이 select city, state from station
[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