1757. Recyclable and Low Fat Products
https://leetcode.com/problems/recyclable-and-low-fat-products/
Pandas
import pandas as pd
def find_products(products: pd.DataFrame) -> pd.DataFrame:
return products[
(products['low_fats'] == 'Y') & (products['recyclable'] == 'Y')
][['product_id']]
SQL
SELECT
product_id
FROM Products
WHERE low_fats = 'Y'
AND recyclable = 'Y'