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 | LeetCode 1280. Nested Join
·
Computer Science/SQL
학교에는 여러 명의 학생들과 여러 과목이 있고, 각 학생은 모든 과목의 시험을 치릅니다. 우리는 각 학생이 각 과목의 시험을 몇 번 봤는지 알고 싶습니다. Table: Students+---------------+---------+| Column Name | Type |+---------------+---------+| student_id | int || student_name | varchar |+---------------+---------+student_id is the primary key (column with unique values) for this table.Each row of this table contains the ID and the name of one st..
올리브한입
'leetcode' 태그의 글 목록 (5 Page)