본문 바로가기

Algorithm/SQL

(39)
(SQL) - LeetCode (easy) 1251. Average Selling Price https://leetcode.com/problems/average-selling-price/description/ Average Selling Price - LeetCode Can you solve this real interview question? Average Selling Price - Table: Prices +---------------+---------+ | Column Name | Type | +---------------+---------+ | product_id | int | | start_date | date | | end_date | date | | price | int | +--------------- leetcode.com case, join, group by를 사용해 본 문제..
(SQL) - LeetCode (easy) 1211. Queries Quality and Percentage https://leetcode.com/problems/queries-quality-and-percentage/description/ Queries Quality and Percentage - LeetCode Can you solve this real interview question? Queries Quality and Percentage - Table: Queries +-------------+---------+ | Column Name | Type | +-------------+---------+ | query_name | varchar | | result | varchar | | position | int | | rating | int | +------ leetcode.com 집계함수를 사용해본 문..
(SQL) - LeetCode (easy) 1148. Article Views I https://leetcode.com/problems/article-views-i/description/ Article Views I - LeetCode Can you solve this real interview question? Article Views I - Table: Views +---------------+---------+ | Column Name | Type | +---------------+---------+ | article_id | int | | author_id | int | | viewer_id | int | | view_date | date | +---------------+--- leetcode.com distinct를 사용해 해결한 문제였습니다. 📕 풀이방법 📔 풀이과정 자기..
(SQL) - LeetCode (easy) 1141. User Activity for the Past 30 Days I https://leetcode.com/problems/user-activity-for-the-past-30-days-i/description/ User Activity for the Past 30 Days I - LeetCode Can you solve this real interview question? User Activity for the Past 30 Days I - Table: Activity +---------------+---------+ | Column Name | Type | +---------------+---------+ | user_id | int | | session_id | int | | activity_date | date | | activity_typ leetcode.com ..
(SQL) - LeetCode (easy) 1050. Actors and Directors Who Cooperated At Least Three Times https://leetcode.com/problems/actors-and-directors-who-cooperated-at-least-three-times/ Actors and Directors Who Cooperated At Least Three Times - LeetCode Can you solve this real interview question? Actors and Directors Who Cooperated At Least Three Times - Table: ActorDirector +-------------+---------+ | Column Name | Type | +-------------+---------+ | actor_id | int | | director_id | int | | ..
(SQL) - LeetCode (easy) 620. Not Boring Movies https://leetcode.com/problems/not-boring-movies/description/ Not Boring Movies - LeetCode Can you solve this real interview question? Not Boring Movies - Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varchar | | description | varchar | | rating | float | +---------------- leetcode.com where 조건과 order by를 사용해본 문제였습니다. 📕 풀이방..
(SQL) - LeetCode (easy) 607. Sales Person https://leetcode.com/problems/sales-person/description/ Sales Person - LeetCode Can you solve this real interview question? Sales Person - Table: SalesPerson +-----------------+---------+ | Column Name | Type | +-----------------+---------+ | sales_id | int | | name | varchar | | salary | int | | commission_rate | int | | hire_date | leetcode.com 조건절과 in을 사용해본 문제였습니다. 📕 풀이방법 📔 풀이과정 1. order과 com..
(SQL) - LeetCode (easy) 596. Classes More Than 5 Students https://leetcode.com/problems/classes-more-than-5-students/description/ Classes More Than 5 Students - LeetCode Can you solve this real interview question? Classes More Than 5 Students - Table: Courses +-------------+---------+ | Column Name | Type | +-------------+---------+ | student | varchar | | class | varchar | +-------------+---------+ (student, class) is the leetcode.com group by ~ havin..