<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Priyankajoshi on Medium]]></title>
        <description><![CDATA[Stories by Priyankajoshi on Medium]]></description>
        <link>https://medium.com/@priyankajoshi2300?source=rss-b65c30f3e9ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KwMjn_GJaGIDQMCT</url>
            <title>Stories by Priyankajoshi on Medium</title>
            <link>https://medium.com/@priyankajoshi2300?source=rss-b65c30f3e9ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 01:51:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@priyankajoshi2300/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[50 SQL LeetCode Interview Question with Well explain Solution]]></title>
            <link>https://medium.com/@priyankajoshi2300/50-sql-leetcode-interview-question-with-well-explain-solution-ec39545677ad?source=rss-b65c30f3e9ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec39545677ad</guid>
            <dc:creator><![CDATA[Priyankajoshi]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 11:44:14 GMT</pubDate>
            <atom:updated>2025-04-08T11:44:14.107Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://leetcode.com/problems/recyclable-and-low-fat-products/">1757. Recyclable and Low Fat Products</a> :</p><pre>+-------------+---------+<br>| Column Name | Type    |<br>+-------------+---------+<br>| product_id  | int     |<br>| low_fats    | enum    |<br>| recyclable  | enum    |<br>+-------------+---------+<br>product_id is the primary key (column with unique values) for this table.<br>low_fats is an ENUM (category) of type (&#39;Y&#39;, &#39;N&#39;) where &#39;Y&#39; means this product is low fat and &#39;N&#39; means it is not.<br>recyclable is an ENUM (category) of types (&#39;Y&#39;, &#39;N&#39;) where &#39;Y&#39; means this product is recyclable and &#39;N&#39; means it is not.</pre><p>Write a solution to find the ids of products that are both low fat and recyclable.</p><p>Return the result table in <strong>any order</strong>.</p><p>The result format is in the following example.</p><p><strong>Example 1:</strong></p><pre>Input: <br>Products table:<br>+-------------+----------+------------+<br>| product_id  | low_fats | recyclable |<br>+-------------+----------+------------+<br>| 0           | Y        | N          |<br>| 1           | Y        | Y          |<br>| 2           | N        | Y          |<br>| 3           | Y        | Y          |<br>| 4           | N        | N          |<br>+-------------+----------+------------+<br>Output: <br>+-------------+<br>| product_id  |<br>+-------------+<br>| 1           |<br>| 3           |<br>+-------------+<br>Explanation: Only products 1 and 3 are both low fat and recyclable.</pre><h3>Let’s imagine we have a database table named Products that stores information about various products. This table has the following structure:</h3><p>Column NameTypeDescriptionproduct_idINTUnique identifier for each product. This serves as the primary key.low_fatsENUM(‘Y’, ‘N’)Indicates whether the product is low fat (‘Y’ for yes, ’N’ for no).recyclableENUM(‘Y’, ‘N’)Indicates whether the product is recyclable (‘Y’ for yes, ’N’ for no).</p><p>Our goal is to write a SQL query that returns the product_id of all products that satisfy two conditions simultaneously: they must be low fat (low_fats = &#39;Y&#39;) and they must be recyclable (recyclable = &#39;Y&#39;).</p><h3>Crafting the SQL Query</h3><p>The core of our solution lies in using the SELECT statement to specify the column we want to retrieve (product_id) and the WHERE clause to filter the rows based on our desired conditions. To ensure both conditions are met, we will use the AND operator.</p><pre>SELECT product_id<br>FROM Products<br>WHERE low_fats = &#39;Y&#39; AND recyclable = &#39;Y&#39;;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec39545677ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>