Leetcode SQL 50

I picked a nice easy SQL one today, and it was far easier than I expected!

1757. Recyclable and Low Fat Products

The problem:

Write a solution to find the ids of products that are both low fat and recyclable.

Return the result table in any order. 

The solution:

select product_id from Products where low_fats = 'Y' and recyclable='Y';


Not much else to say, except I wish SQL was always this easy!



Comments

Popular posts from this blog

Leetcode 75: 1768. Merge Strings Alternately

Defending Against Ettercap Attacks: A Brief Overview

Leetcode Two Sum Problem in three different languages