[STUDY_PALN] DAY1
·
SQL/LeetCode
리트코드 사이트를 보다가 신기한게 있어서 가져왔다. 이제껏 인강 보면서 필요한 문제만 풀어서 몰랐는데 SQL_STUDY PLAN이라는게 있어 오늘부터 진행해볼까 한다! SQL - Study Plan - LeetCode SQL (Structured Query Language) is used to manage relational database management systems (RDBMS). The scope of SQL includes data insertion, query, update and deletion, database schema creation and modification, and data access control. leetcode.com 595. Big Countries SELECT n..
[177] Nth Highest Salary
·
SQL/LeetCode
1. 문제 설명 Table: Employee +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | salary | int | +-------------+------+ id is the primary key column for this table. Each row of this table contains information about the salary of an employee. Write an SQL query to report the nth highest salary from the Employee table. If there is no nth highest salary, the query should ..
[180] Consecutive Numbers
·
SQL/LeetCode
Window 함수 사용 1. 문제 설명 Table: Logs +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | num | varchar | +-------------+---------+ id is the primary key for this table. id is an autoincrement column. Write an SQL query to find all numbers that appear at least three times consecutively. (조건 : 연속 세번 이상 나타나는 데이터를 찾으시오.) Return the result table in any order. The qu..
[196] Delete Duplicate Emails
·
SQL/LeetCode
1. 문제 설명 Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this table. Each row of this table contains an email. The emails will not contain uppercase letters. Write an SQL query to delete all the duplicate emails, keeping only one unique email with the smallest id. ..
[185] Department Top Three Salaries
·
SQL/LeetCode
1. 문제 설명 Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId | int | +--------------+---------+ id is the primary key column for this table. departmentId is a foreign key of the ID from the Department table. Each row of this table indicates the ID, name, and salary of an employee. It also con..
[184] Department Highest Salary
·
SQL/LeetCode
1. 문제 설명 table : Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId | int | +--------------+---------+ id is the primary key column for this table. departmentId is a foreign key of the ID from the Department table. Each row of this table indicates the ID, name, and salary of an employee. It also co..