title: Finding who called who
body: <p>I have these two tables. Subscriber table contains SubscriberID and his Phone number. NetworkP2P contents SubscriberID, to who he has called AddresseeNumber and when the call started, ended.</p>
  <pre><code>TABLE Subscriber 
  (
      SubscriberID int,
      PhoneNumber char(10)
  )
  
  TABLE NetworkP2P 
  (
      SubscriberID int,
      AddresseeNumber char(10),
      CallStart datetime,
      CallEnd datetime
  )
  </code></pre>
  <p>Example data:</p>
  <p><strong>Subscriber</strong></p>
  <pre><code>SubscriberID | PhoneNumber
  1              613-555-0156
  2              613-555-0112
  3              613-555-0119
  4              613-555-0182
  </code></pre>
  <p><strong>NetworkP2P</strong></p>
  <pre><code>SubscriberID | AddresseeNumber | CallStart               | CallEnd
  1              613-555-0182      2013-02-03 08:27:00.000   2013-02-03 08:30:54.000
  1              613-555-0119      2013-02-03 10:11:26.000   2013-02-03 10:14:26.000
  1              613-555-3333      2013-02-03 15:13:58.000   2013-02-03 15:18:13.000
  2              613-555-0156      2013-02-05 23:21:50.000   2013-02-05 23:24:50.000
  2              613-555-0119      2013-04-05 23:21:50.000   2013-04-05 23:26:50.000
  3              613-555-0112      2013-06-05 23:21:50.000   2013-06-05 23:26:50.000
  </code></pre>
  <p>Not all Phone numbers match the ones that Subscribers have.</p>
  <p>How would I approach this, if I wish to have which outputs subscribers who have been in contact with each other for a given month, i.e. subscriber1 called subscriber2 and vice versa?</p>
  <p>Example of the desired output:</p>
  <pre><code> Caller | Reciever | CallerPhone | RecieverPhone
   1        4          613-555-0156  613-555-0182
   1        3          613-555-0156  613-555-0119
   2        1          613-555-0112  613-555-0156
   2        3          613-555-0112  613-555-0119
   3        2          613-555-0119  613-555-0112
  </code></pre>