<?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 Rithika Kuchanpally on Medium]]></title>
        <description><![CDATA[Stories by Rithika Kuchanpally on Medium]]></description>
        <link>https://medium.com/@rithikakuchanpally?source=rss-62b626871bee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*W_tn6o84aAZXEVUU</url>
            <title>Stories by Rithika Kuchanpally on Medium</title>
            <link>https://medium.com/@rithikakuchanpally?source=rss-62b626871bee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:45:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rithikakuchanpally/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[Week 1 of SQL]]></title>
            <link>https://medium.com/@rithikakuchanpally/week-1-of-sql-4bcf02751ea6?source=rss-62b626871bee------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bcf02751ea6</guid>
            <category><![CDATA[stratascratch]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Rithika Kuchanpally]]></dc:creator>
            <pubDate>Thu, 06 Feb 2025 17:44:26 GMT</pubDate>
            <atom:updated>2025-02-18T22:59:38.281Z</atom:updated>
            <content:encoded><![CDATA[<p>I am happy to report that questions that seem unfathomable at first don’t make me cry anymore<br>They are not exciting to me, cause at the end of that session, i am one who can solve the unfathomable question and that was the whole point of this series, so i am glad it is serving it’s purpose !<br>So, here are some of the questions i worked with this week</p><h3>1. Election Results</h3><p>Context: The election is conducted in a city and everyone can vote for one or more candidates, or choose not to vote at all. Each person has 1 vote so if they vote for multiple candidates, their vote gets equally split across these candidates. For example, if a person votes for 2 candidates, these candidates receive an equivalent of 0.5 vote each.<br>We have to find the winner of the elections and make room to accommodate ties.</p><p>Our table, voting_results has two columns: Voter’s name and the candidate they voted for.</p><h4>The Procedure:</h4><p>1.Determine how much voting power each voter has <br>2.Aggregate the votes each candidate received <br>3.Display the voter with the highest number of votes</p><p>Simple!</p><h4>Task 1:</h4><p>To determine how much voting power each candidate has, we have to divide 1 by the number of votes that respective voter has casted.</p><p>Since there are multiple variables at play, i would prefer creating a common table expression(CTE) to solve and abstract one task at a time.</p><pre>with vpower as(<br>select voter, candidate, round(1.0/count(voter) over partition by(voter),3) as votingpower<br>from voting_results<br>)</pre><h4>Task 2:</h4><p>In the same query, we use the “vpower” cte created to calculate the votes per candidate.</p><pre>,bycandidate as(<br>select candidate, sum(votepower) as total_count<br>from votepower<br>where candidate is not null<br>group by candidate<br>order by total_count desc<br>)</pre><p>We are not using the “with” clause again, since are declaring two CTE at once. In order to perform this aggregation, including the candidate in the previous CTE was essential.</p><h4>Task3:</h4><p>All that is left to do now, is to display while keeping in mind that there could be a tie.</p><pre>select candidate<br>from bycandidate<br>where total_count=(select max(total_count) from bycandidate);</pre><p>The where clause here is making sure that the query displays all the candidates with the max count.</p><p>The End</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bcf02751ea6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey Solving SQL Questions: A Medium Series]]></title>
            <link>https://medium.com/@rithikakuchanpally/my-journey-solving-sql-questions-a-medium-series-d6c3f302cce8?source=rss-62b626871bee------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6c3f302cce8</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Rithika Kuchanpally]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 20:43:32 GMT</pubDate>
            <atom:updated>2025-01-29T20:43:32.408Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong> Welcome to my journey of solving SQL questions! As someone passionate about improving my problem-solving skills, I’ve decided to document my progress, insights, and challenges along the way. Whether you’re a beginner or an experienced SQL user, I hope my experiences can offer value, motivation, and useful takeaways.</p><p><strong>Why I Started This Journey</strong> I’ve always been intrigued by how SQL challenges push logical thinking and efficiency. Whether it’s for database management, data analysis, or technical interviews, solving SQL problems regularly builds a strong foundation in querying, optimization, and database design. By sharing my approach, I aim to reinforce my understanding and engage with others on a similar path.</p><p><strong>What to Expect</strong></p><ul><li><strong>Problem Breakdown</strong> — I’ll explain how I approach different types of SQL problems.</li><li><strong>Step-by-Step Solutions</strong> — Walking through my thought process, query formulation, and optimizations.</li><li><strong>Lessons Learned</strong> — Mistakes, insights, and strategies I pick up along the way.</li><li><strong>Tools &amp; Resources</strong> — Platforms, books, and techniques that help me improve.</li><li><strong>Reflections &amp; Progress</strong> — Tracking how my SQL skills evolve over time.</li></ul><p><strong>Join Me!</strong> I’d love to hear from you! If you’re also solving SQL problems, share your experiences, challenges, and tips. Let’s learn and grow together. Stay tuned for my first SQL problem breakdown coming soon!</p><p><em>Follow my journey on Medium and let’s make SQL problem-solving an exciting adventure!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6c3f302cce8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>