목록Tool/SQL 코딩테스트 풀이 (46)
홍동이의 성장일기
Reformat Department Table - LeetCode Can you solve this real interview question? Reformat Department Table - Table: Department +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | revenue | int | | month | varchar | +-------------+---------+ (id, month) is leetcode.com Reformat the table such that there is a department id column and a revenue column for each ..
Friend Requests II: Who Has the Most Friends - LeetCode Can you solve this real interview question? Friend Requests II: Who Has the Most Friends - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com with cte_unionall as( select requester_id as id from RequestAccepted union all select accepter_i..
Type of Triangle | HackerRank Query a triangle's type based on its side lengths. www.hackerrank.com 테이블 이름: triangles equilateral: 정삼각형 lsosceles: 이등변 삼각형 scalene: 삼각형 (세변의 길이가 모두 다름) not a triangle: 두변의 합이 나머지 한 변보다 크지 않음 ⭐ (=작거나 같음) select case when A = B and B = C then 'Equilateral' when A + B
The PADS | HackerRank Query the name and abbreviated occupation for each person in OCCUPATIONS. www.hackerrank.com 테이블 1: 이름 (직업 맨앞글자) 테이블 2: There are a total of '직업 수' '직업명's. 직업수가 같은 경우 알파벳이 먼저인 직업이 앞으로 나오도록하기 select concat(name, '(', left(occupation, 1), ')') from occupations order by name, left(occupation, 1); select concat('There are a total of ', count(occupation), ' ' ,lower(occupation),..
Combine Two Tables - LeetCode Can you solve this real interview question? Combine Two Tables - Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | personId | int | | lastName | varchar | | firstName | varchar | +-------------+---------+ personId i leetcode.com select p.firstname, p.lastname, a.city, a.state from person p left join address a on p.personId = ..