title: sql count where records in 2 tables almost match
body: <p>I'm at a loss to figure out how to write the SQL code to pull the count of rownames in table 1 that appear in table 2 where the rowumber is +/- 1. For example, I would count 'Exclusive' and 'Popular Episodes' as appearing in both because the rownumber is within 1 of each other. But I would NOT count 'Popular Movies', because the gap is > 1. Normally I would INTERSECT the tables, but I only know how to use INTERSECT for exact matches.</p>
  
  <pre><code>Table 1
  +------------------+-----------+
  |  rowname         | rownumber |
  +------------------+-----------+
  | Exclusive        |         1 |
  | Popular Movies   |         3 |
  | New Seasons      |         7 |
  | Popular Episodes |         8 |
  +------------------+-----------+
  
  Table 2
  +------------------+-----------+
  |   rowname        | rownumber |
  +------------------+-----------+
  | Exclusive        |         2 |
  | Popular Episodes |         7 |
  | Popular Movies   |         8 |
  +------------------+-----------+
  </code></pre>
  
  <p>Thanks in advance for your help!</p>