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 ..
SQL | LeetCode 1978. 조건에 맞는 직원 찾기 (NOT IN)
·
Computer Science/SQL
Table: Employees+-------------+----------+| Column Name | Type |+-------------+----------+| employee_id | int || name | varchar || manager_id | int || salary | int |+-------------+----------+In SQL, employee_id is the primary key for this table.This table contains information about the employees, their salary, and the ID of their manager. Some employees do not ha..
SQL | LeetCode 1907. Salary 범주별 계좌 수 세기 (UNION vs. UNION ALL)
·
Computer Science/SQL
Table: Accounts+-------------+------+| Column Name | Type |+-------------+------+| account_id | int || income | int |+-------------+------+account_id is the primary key (column with unique values) for this table.Each row contains information about the monthly income for one bank account. Write a solution to calculate the number of bank accounts for each salary category. The salary catego..
올리브한입