Coding Challenges 26

[SQL50] 1251. Average Selling Price

난이도: EASY 문제 링크: https://leetcode.com/problems/average-selling-price/description/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Prices+---------------+---------+ | Column Name   | Type    | +---------------+---------+ | product_id    | int     | | start_date    | date    | | end_date      | date    | | price         | int     | +---------------+---------+ (product_id, start_date, end_date) i..

[SQL50] 620. Not Boring Movies

난이도: EASY 문제 링크: https://leetcode.com/problems/not-boring-movies/description/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Cinema+----------------+----------+ | Column Name    | Type     | +----------------+----------+ | id             | int      | | movie          | varchar  | | description    | varchar  | | rating         | float    | +----------------+----------+ id is the primary key (c..

[SQL50] 1729. Find Followers Count

난이도: EASY 문제 링크: https://leetcode.com/problems/find-followers-count/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Followers+-------------+------+ | Column Name | Type | +-------------+------+ | user_id     | int  | | follower_id | int  | +-------------+------+(user_id, follower_id) is the primary key (combination of columns with unique values) for this table. This table contains the IDs of ..

[SQL50] 596. Classes More Than 5 Students

난이도: EASY 문제 링크: https://leetcode.com/problems/classes-more-than-5-students/description/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Courses+-------------+---------+ | Column Name | Type    | +-------------+---------+ | student     | varchar | | class       | varchar | +-------------+---------+ (student, class) is the primary key (combination of columns with unique values) for this table. ..

[SQL50] 1141. User Activity for the Past 30 Days I

난이도: EASY 문제 링크: https://leetcode.com/problems/user-activity-for-the-past-30-days-i/description/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Activity +---------------+---------+ | Column Name   | Type    | +---------------+---------+ | user_id       | int     | | session_id    | int     | | activity_date | date    | | activity_type | enum    | +---------------+---------+ This table may hav..

[SQL50] 2356. Number of Unique Subjects Taught by Each Teacher

난이도: EASY 문제 링크: https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher/description/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Teacher+-------------+------+ | Column Name | Type | +-------------+------+ | teacher_id  | int  | | subject_id  | int  | | dept_id     | int  | +-------------+------+ (subject_id, dept_id) is the primary key (combinations of columns with ..

[SQL50] 1280. Students and Examinations

난이도: EASY 문제 링크: https://leetcode.com/problems/students-and-examinations/description/?envType=study-plan-v2&envId=top-sql-50문제더보기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 ..

[SQL50] 577. Employee Bonus

난이도: EASY 문제 링크: https://leetcode.com/problems/employee-bonus/?envType=study-plan-v2&envId=top-sql-50문제더보기Table: Employee+-------------+---------+ | Column Name | Type    | +-------------+---------+ | empId       | int     | | name        | varchar | | supervisor  | int     | | salary      | int     | +-------------+---------+ empId is the column with unique values for this table. Each row of th..

[Java] 28. Find the Index of the First Occurrence in a String

난이도: EASY 문제 링크: https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/문제더보기Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.  Example 1:Input: haystack = "sadbutsad", needle = "sad"Output: 0Explanation: "sad" occurs at index 0 and 6.The first occurrence is at index 0, so we r..

[SQL50] 197. Rising Temperature

난이도: EASY 문제 링크: Rising Temperature - LeetCode 문제더보기Table: Weather+---------------+---------+ | Column Name   | Type    | +---------------+---------+ | id            | int     | | recordDate    | date    | | temperature   | int     | +---------------+---------+ id is the column with unique values for this table. There are no different rows with the same recordDate. This table contains informatio..