๐ป ๋ฌธ์ ์ฃผ์ : Recyclable and Low Fat Products - LeetCode
Recyclable and Low Fat Products - LeetCode
Can you solve this real interview question? Recyclable and Low Fat Products - Table: Products +-------------+---------+ | Column Name | Type | +-------------+---------+ | product_id | int | | low_fats | enum | | recyclable | enum | +-------------+---------
leetcode.com
๐ป ๋ฌธ์
Write a solution to find the ids of products that are both low fat and recyclable. Return the result table in any order. The result format is in the following example.
- ์ ์ง๋ฐฉ์ด๋ฉด์ ์ฌํ์ฉ ๊ฐ๋ฅํ ์ํ ID๋ฅผ ์ฐพ์ผ์์ค. ๊ฒฐ๊ณผ ํ ์ด๋ธ ์์๋ ์๊ด ์์ผ๋ฉฐ, ํฌ๋งท์ ์๋ ์์์ ๊ฐ์ต๋๋ค.
๐ป ์ฝ๋ ๋ฐ ํ์ด
select product_id
from products
where low_fats = 'Y' and recyclable = 'Y'
'SQL > LeetCode' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[LeetCode][SQL50] #6. Replace Employee ID With The Unique Identifier (0) | 2023.11.07 |
---|---|
[LeetCode][SQL50] #5. Invalid Tweets (0) | 2023.11.06 |
[LeetCode][SQL50] #4. Article Views I (0) | 2023.11.06 |
[LeetCode][SQL50] #3. Big Countries (0) | 2023.11.06 |
[LeetCode][SQL50] #2. Find Customer Referee (0) | 2023.11.03 |