DEV Community

Nw3965
Nw3965

Posted on

SELECT DISTINCT

From Leetcode Recyclable and Low Fat Products

I used SQL statement with C# and CSOM library but I have not used to SQL coding test so now I am practicing SQL coding test.

yesterday I learned SELECT DISTINCT statement. This statement can be used to pickup designated word like this.

SELECT DISTINCT product_id
From Products
  WHERE
  low_fats = 'Y' AND
  recyclable = 'Y';
Enter fullscreen mode Exit fullscreen mode

It's very useful.

SQL SELECT DISTINCT

Top comments (0)