title: Parent - child sql query with in a single table
body: <p>I've a table:</p>
  
  <pre><code>Id | Name |  ParentID
  </code></pre>
  
  <p>I want to select records whose <code>parentid</code> not equal to zero, with parent record(parent record have <code>parentid = 0</code>, but some parent record don't have child record I want to skip them )</p>