[LeetCode] SQL 50 / MYSQL / 1757.Recyclable and Low Fat Products
2023. 11. 12. 21:41ㆍCoding Test & Algorithms/LeetCode-SQL
문제 링크
https://leetcode.com/problems/recyclable-and-low-fat-products/description/
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 your MySQL query statement below
SELECT product_id
FROM Products
WHERE low_fats='Y' AND recyclable='Y';
low_fats 와 recyclable을 동시에 만족해야하니까 AND로 두 조건을 연결해준다.
'Coding Test & Algorithms > LeetCode-SQL' 카테고리의 다른 글
[LeetCode] SQL 50 / Oracle / 1378. Replace Employee ID With The Unique Identifier (0) | 2024.01.06 |
---|---|
[LeetCode] SQL 50 / MYSQL / 1683. Invalid Tweets (0) | 2023.11.12 |
[LeetCode] SQL 50 / MYSQL / 1148. Article View I (0) | 2023.11.12 |
[LeetCode] SQL 50 / MYSQL / 595.Big Countries (0) | 2023.11.12 |
[LeetCode] SQL 50 / MYSQL / 584. Find Customer Referee (0) | 2023.11.12 |