title: Over lapping in SQL
body: <p>I have a table with following data:</p>
  
  <pre><code>User#       App
  1       A
  1       B
  2       A   
  2       B
  3       A
  </code></pre>
  
  <p>I want to know overlapping between Apps by distinct Users, so my end result with look like this </p>
  
  <pre><code>App1  App2  DistinctUseroverlapped 
  A     A     3
  A     B     2
  B     B     2
  </code></pre>
  
  <p>So what result means is there are 3 users using app A only , there are 2 users who use App A and App B both , and there are 2 users who use App B only. </p>
  
  <p>Remember there lot of app and users how can I do this in SQL?</p>