SQL | LeetCode 1193. 월별, 국가별 거래 요약 통계 구하기
·
Computer Science/SQL
Table: Transactions+---------------+---------+| Column Name | Type |+---------------+---------+| id | int || country | varchar || state | enum || amount | int || trans_date | date |+---------------+---------+id is the primary key of this table.The table has information about incoming transactions.The state column is an enum of type ["approved..
SQL | LeetCode 1211. Query 품질과 Poor Query 비율 계산하기
·
Computer Science/SQL
SELECT query_name, ROUND(AVG(rating / position), 2) AS quality, ROUND(SUM(rating Table: Queries+-------------+---------+| Column Name | Type |+-------------+---------+| query_name | varchar || result | varchar || position | int || rating | int |+-------------+---------+This table may have duplicate rows.This table contains information collected from some queri..
SQL | LeetCode 1633. 대회별 등록 사용자 비율 구하기
·
Computer Science/SQL
Table: Users+-------------+---------+| Column Name | Type |+-------------+---------+| user_id | int || user_name | varchar |+-------------+---------+user_id is the primary key (column with unique values) for this table.Each row of this table contains the name and the id of a user. Table: Register+-------------+---------+| Column Name | Type |+-------------+---------+| contest_id ..
SQL | LeetCode 1251. 날짜 범위 매핑으로 평균 판매가 구하기
·
Computer Science/SQL
Table: Prices+---------------+---------+| Column Name | Type |+---------------+---------+| product_id | int || start_date | date || end_date | date || price | int |+---------------+---------+(product_id, start_date, end_date) is the primary key (combination of columns with unique values) for this table.Each row of this table indicates the price of the produc..
SQL | LeetCode 1934. 사용자 확인률 계산하기 (LEFT JOIN과 COALESCE, AVG()의 조합)
·
Computer Science/SQL
Table: Signups+----------------+----------+| Column Name | Type |+----------------+----------+| user_id | int || time_stamp | datetime |+----------------+----------+user_id is the column of unique values for this table.Each row contains information about the signup time for the user with ID user_id. Table: Confirmations+----------------+----------+| Column Name | Type ..
SQL | LeetCode 570. 직속 부하 직원이 5명 이상인 매니저 찾기
·
Computer Science/SQL
매니저는 다른 직원들의 managerId로 등장합니다. 즉, managerId를 기준으로 그룹화해서 해당 값을 가진 사람이 몇 명의 직원을 관리하는지 세면 됩니다.Table: Employee+-------------+---------+| Column Name | Type |+-------------+---------+| id | int || name | varchar || department | varchar || managerId | int |+-------------+---------+id is the primary key (column with unique values) for this table.Each row of this table indi..
올리브한입
'SQL' 태그의 글 목록