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..
SQL | LeetCode 1204. 버스 정원 제한에 따라 탈 수 있는 마지막 사람 구하기
·
Computer Science/SQL
Table: Queue+-------------+---------+| Column Name | Type |+-------------+---------+| person_id | int || person_name | varchar || weight | int || turn | int |+-------------+---------+person_id column contains unique values.This table has the information about all people waiting for a bus.The person_id and turn columns will contain all numbers from 1 to n, where n is ..
올리브한입
'Computer Science' 카테고리의 글 목록 (3 Page)