목록퀴즈 (13)
개발은 처음이라 개발새발
https://leetcode.com/problems/consecutive-numbers/ Consecutive Numbers - LeetCode Can you solve this real interview question? Consecutive Numbers - Table: Logs +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | num | varchar | +-------------+---------+ id is the primary key for this table. id is an leetcode.com Input: Logs table: +----+-----+ | id | num | +..
https://www.hackerrank.com/challenges/the-report/problem?h_r=internal-search The Report | HackerRank Write a query to generate a report containing three columns: Name, Grade and Mark. www.hackerrank.com 이번에는 join 구문에서 between절을 활용하는 퀴즈를 풀어보려고 합니다. 흔히 join 구문에서 두 테이블을 매칭 시킬 때 on을 적고 그안에 각각의 테이블에서 매칭 시킬 수 있는 컬럼을 "A.컬럼 = B.컬럼 " 이런식으로 적는게 기본인데요. 하지만 모든 상황과 테이블들이 이 같은 구문으로 해결될순 없겠죠. 그렇기에 하나의 구문에서 어떻게..
https://leetcode.com/problems/delete-duplicate-emails/ Delete Duplicate Emails - LeetCode Can you solve this real interview question? Delete Duplicate Emails - Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this leetcode.com 이번에는 DELETE 구문 연습을 가장한 서브쿼리 퀴즈를 한번 풀어보겠..
https://leetcode.com/problems/swap-salary/ Swap Salary - LeetCode Can you solve this real interview question? Swap Salary - Table: Salary +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | name | varchar | | sex | ENUM | | salary | int | +-------------+----------+ id is the primar leetcode.com 이번 시간에는 DML 명령어 중 UPDATE를 활용한 퀴즈를 풀어보려고합니다. 문제를 보겠습니다. Input: ..
https://leetcode.com/problems/employees-earning-more-than-their-managers/description/ Employees Earning More Than Their Managers - LeetCode Can you solve this real interview question? Employees Earning More Than Their Managers - Table: Employee +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | salary | int | | managerId | int | +------ l..
https://leetcode.com/problems/customers-who-never-order/description/ Customers Who Never Order - LeetCode Can you solve this real interview question? Customers Who Never Order - Table: Customers +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | +-------------+---------+ id is the primary key column for t leetcode.com 오늘은 JOIN 함수 두번째 퀴즈이자 L..
https://www.hackerrank.com/challenges/average-population-of-each-continent/problem?h_r=internal-search Average Population of Each Continent | HackerRank Query the names of all continents and their respective city populations, rounded down to the nearest integer. www.hackerrank.com 오늘은 JOIN과 관련된 해커랭크의 퀴즈를 들고왔습니다. 문제는 city, country라는 두개의 테이블이 있고 두 테이블을 조인 시켜 country 테이블에 있는 continent를 기준으로 city 테이..
이번에도 CASE문 퀴즈를 풀어보려고 합니다. 이번에는 해커랭크가 아니라 리트코드의 퀴즈를 풀어볼 겁니다. https://leetcode.com/problems/reformat-department-table/ 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 | +-------------+---------+ (i..
https://www.hackerrank.com/challenges/what-type-of-triangle/problem?h_r=internal-search Type of Triangle | HackerRank Query a triangle's type based on its side lengths. www.hackerrank.com 오늘은 삼각형 종류를 지정하는 쿼리로 CASE문 연습을 해보겠습니다. 문제를 보면 A,B,C라는 정수를 담은 컬럼이 있고 이 세 컬럼의 숫자들에 조건을 달아 삼각형의 종류를 지정해보라는 퀴즈입니다. ** 삼각형 종류 Equilateral(정삼각형): It's a triangle with sides of equal length. Isosceles(이등변삼각형): It's a ..
https://www.hackerrank.com/challenges/earnings-of-employees/problem?h_r=internal-search Top Earners | HackerRank Find the maximum amount of money earned by any employee, as well as the number of top earners (people who have earned this amount). www.hackerrank.com 이번에는 group by와 관련된 간단한 퀴즈를 풀어보겠습니다. 문제를 해석해보면 months와 salary를 곱해 earings라는 컬럼을 만들고 가장 높은 earings과 해당 earings를 기록한 사람이 몇명인지를 카운트해보라는 것을..