title: SQL that check for Duplicates with NULL doesn't not return
body: <p>I am using 2 separate query to check for duplicates and both query were supposed to give the same answer when executed, however it did not. Below is an example of my database table data:</p>
  
  <pre class="lang-none prettyprint-override"><code>id   Name   Age  Group SeatNo
  ------------------------------------------
  1    Alpha  11    A    NULL
  2    Bravo  12    A    1
  3    Alpha  11    B    NULL
  </code></pre>
  
  <p>This is my first query where it shows there are duplicates</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT count(*)
  FROM Test AS ta
  JOIN Test AS tb ON ta.name=tb.name AND ta.age=tb.age
  WHERE ta.GroupName='A'
  AND tb.GroupName='B'
  </code></pre>
  
  <p>This is my second Query that shows zero duplicates</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT count(*)
  FROM Test AS ta
  JOIN Test AS tb ON ta.name=tb.name AND ta.age=tb.age AND ta.SeatNo=tb.SeatNo
  WHERE ta.GroupName='A'
  AND tb.GroupName='B
  </code></pre>
  
  <p>After looking through both query and the data in the table, it seems that NULL in the seatNo affected the second query and cause it to return 0 duplicates. Is there any solution to search for duplicates even though it is NULL?</p>