title: SQL WITH clause example
body: <p>I was trying to understand how to use the <code>WITH</code> clause and the purpose of the <code>WITH</code> clause.</p>
  
  <p>All I understood was, the <code>WITH</code> clause was a replacement for normal sub-queries.</p>
  
  <p>Can anyone explain this to me with a small example in detail ?</p>