SQL | LeetCode 185. DENSE_RANK()로 부서별 Top 3 급여자 구하기
·
Computer Science/SQL
Table: Employee+--------------+---------+| Column Name | Type |+--------------+---------+| id | int || name | varchar || salary | int || departmentId | int |+--------------+---------+id is the primary key (column with unique values) for this table.departmentId is a foreign key (reference column) of the ID from the Department table.Each row of this table in..
SQL | LeetCode 585. 중복된 투자값 & 유일한 위치 조건 만족하는 투자 합계 구하기
·
Computer Science/SQL
Table: Insurance+-------------+-------+| Column Name | Type |+-------------+-------+| pid | int || tiv_2015 | float || tiv_2016 | float || lat | float || lon | float |+-------------+-------+pid is the primary key (column with unique values) for this table.Each row of this table contains information about one policy where:pid is the policyholder's policy ID.tiv_20..
SQL | LeetCode 602. 가장 친구가 많은 사람 찾기
·
Computer Science/SQL
Table: RequestAccepted+----------------+---------+| Column Name | Type |+----------------+---------+| requester_id | int || accepter_id | int || accept_date | date |+----------------+---------+(requester_id, accepter_id) is the primary key (combination of columns with unique values) for this table.This table contains the ID of the user who sent the request, the ID of the..
SQL | LeetCode 1321. 7일 단위 평균으로 매출 분석하기
·
Computer Science/SQL
Table: Customer+---------------+---------+| Column Name | Type |+---------------+---------+| customer_id | int || name | varchar || visited_on | date || amount | int |+---------------+---------+In SQL,(customer_id, visited_on) is the primary key for this table.This table contains data about customer transactions in a restaurant.visited_on is the date on which..
SQL | LeetCode 1341. 집계(Aggregation), 날짜 필터링, 정렬 및 서브쿼리 활용
·
Computer Science/SQL
Table: Movies+---------------+---------+| Column Name | Type |+---------------+---------+| movie_id | int || title | varchar |+---------------+---------+movie_id is the primary key (column with unique values) for this table.title is the name of the movie. Table: Users+---------------+---------+| Column Name | Type |+---------------+---------+| user_id | int |..
SQL | LeetCode 626. ID 기준으로 행 순서 재배치하기 (CASE WHEN)
·
Computer Science/SQL
Table: Seat+-------------+---------+| Column Name | Type |+-------------+---------+| id | int || student | varchar |+-------------+---------+id is the primary key (unique value) column for this table.Each row of this table indicates the name and the ID of a student.The ID sequence always starts from 1 and increments continuously. Write a solution to swap the seat id of every ..
올리브한입