융무의 기술블로그
article thumbnail
[SQL][HackerRank] Type of Triangle
Algorithm/SQL 2020. 6. 11. 12:35

https://www.hackerrank.com/challenges/what-type-of-triangle/problem Type of Triangle | HackerRank Query a triangle's type based on its side lengths. www.hackerrank.com Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table: Equilateral: It's a triangle with 3 sides of equal length...

article thumbnail
[SQL][HackerRank] Placements
Algorithm/SQL 2020. 6. 11. 12:07

https://www.hackerrank.com/challenges/placements/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Placements | HackerRank Write a query to output the names of those students whose best friends got offered a higher salary than them. www.hackerrank.com You are given three tables..

article thumbnail
[SQL][HackerRank] Contest Leaderboard
Algorithm/SQL 2020. 6. 11. 11:59

https://www.hackerrank.com/challenges/contest-leaderboard/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Contest Leaderboard | HackerRank Generate the contest leaderboard. www.hackerrank.com You did such a great job helping Julia with her last coding contest challenge that she wants you to work on thi..

article thumbnail
[SQL][HackerRank] Weather Observation Station 20
Algorithm/SQL 2020. 6. 10. 18:37

https://www.hackerrank.com/challenges/weather-observation-station-20/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 20 | HackerRank Query the median of Northern Latitudes in STATION and round to 4 decimal places. www.hackerrank.com A median is defined as a number separating the higher half of a data ..

article thumbnail
[SQL][HackerRank] Weather Observation Station 19
Algorithm/SQL 2020. 6. 10. 12:48

https://www.hackerrank.com/challenges/weather-observation-station-19/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 19 | HackerRank Query the Euclidean Distance between two points and round to 4 decimal digits. www.hackerrank.com The Euclidean Distance 는 sqrt((a-b)2 + (c-d)2) SELECT ROUND(SQRT(POW(MIN(LAT_N)-MAX(LAT_N), 2) + P..

article thumbnail
[SQL][HackerRank] Weather Observation Station 18
Algorithm/SQL 2020. 6. 10. 12:38

https://www.hackerrank.com/challenges/weather-observation-station-18/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 18 | HackerRank Query the Manhattan Distance between two points, round or truncate to 4 decimal digits. www.hackerrank.com The Manhattan Distance 는 |x1 - x2| + |y1 - y2| = |a - c| + |b - d|. SELECT ROUND(ABS(MIN(LAT_N)-MAX(LAT_N)) + ABS(MI..

article thumbnail
[SQL][HackerRank] Weather Observation Station 17
Algorithm/SQL 2020. 6. 10. 12:30

https://www.hackerrank.com/challenges/weather-observation-station-17/problem?h_r=next-challenge&h_v=zen Weather Observation Station 17 | HackerRank Query the Western Longitude for the smallest value of the Northern Latitudes greater than 38.7780 in STATION and round to 4 decimal places. www.hackerrank.com Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION..

article thumbnail
[SQL][HackerRank] New Companies
Algorithm/SQL 2020. 6. 10. 12:25

https://www.hackerrank.com/challenges/the-company/problem 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,..