title: mysql ...in where clause is ambiguous
body: <pre><code>SELECT
                  cat.CategoryID as CategoryID,
                  count(p.ProductID) as CountProducts
              FROM 
                  Category as cat
                  LEFT JOIN Products as p on p.CategoryID IN 
                         (SELECT CategoryID FROM Category as cd 
                             WHERE cd.ParrentCategoryID = '876')
              WHERE 
                  CategoryID = '876'
              ORDER by Name
  </code></pre>
  
  <p>We are get error - "Column 'CategoryID' in where clause is ambiguous".</p>
  
  <p>Tell me plese how will be right?</p>