<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Subqueries on Nalar</title>
    <link>https://nalar.dev/tags/subqueries/</link>
    <description>Recent content in Subqueries on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 04 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/subqueries/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Use EXISTS and NOT EXISTS for Relationship Checks in SQL</title>
      <link>https://nalar.dev/use-exists-and-not-exists-for-relationship-checks-in-sql/</link>
      <pubDate>Fri, 04 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/use-exists-and-not-exists-for-relationship-checks-in-sql/</guid>
      <description>&lt;p&gt;Many SQL queries do not actually need data from a related table. They only need to answer a yes-or-no question:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Does this customer have at least one paid order?&lt;/li&gt;&#xA;&lt;li&gt;Is this project missing an active owner?&lt;/li&gt;&#xA;&lt;li&gt;Does any inventory row satisfy this product requirement?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A common first attempt is to join the tables and then remove duplicates. That can work, but it makes the query produce more rows than the problem requires and then asks a later operation to repair the result.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
