SQL Interview Questions – Recyclable and Low Fat Products

Spread the love

Problem Description –

Write an SQL query to find the ids of products that are both low fat and recyclable.

Return the result table in any order.

The query result format is in the following example.

Problem Link – Recyclable and Low Fat

Difficulty Level – Easy

Solution –

SELECT
    DISTINCT product_id
FROM Products
WHERE low_fats = 'Y' AND recyclable = 'Y'

Rating: 1 out of 5.

Leave a Reply