Magento: SQL Query for finding products without specific subcatagories
<p>Hi I'm hoping someone can help me with SQL, my website runs Magento and there is a large number of products that don't belong to any sub categories and unfortunately magento does not have a way of displaying the products without categories in admin. </p>

<p>I found this query that displays products with no catagory at all:</p>

<pre><code>SELECT e.entity_id, e.sku FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL
</code></pre>

<p>But is there a way of displaying products not in specific sub-catagories? Like under the catagory "Tables" but not in the sub-catagory "Wooden".</p>