title: SQL: Comparing MAX Dates from Two different Tables
body: <p>I have 3 Tables</p>
  <h2>User</h2>
  <p><img src="https://i.stack.imgur.com/OvUMc.jpg" alt="enter image description here" /></p>
  <h2>Attendence</h2>
  <p><img src="https://i.stack.imgur.com/7hpGz.jpg" alt="enter image description here" /></p>
  <h2>Payment</h2>
  <p><img src="https://i.stack.imgur.com/hHwEh.jpg" alt="enter image description here" /></p>
  <p>Now I like to get</p>
  <p>GroupID, UserName, MAX(PaymetDate), MAX(AttendenceDate)</p>
  <p>Where MAX(PaymetDate) IS LESS THAN MAX(AttendenceDate)</p>
  <h3>This what I have Tried</h3>
  <pre><code>    SELECT  MAX(PaymetDate) AS Paied_Upto
      FROM Payment
      Group by GroupID   
  
      SELECT  MAX(AttendenceDate) AS Last_ AttendenceDate
      FROM Attendence FULL OUTER JOIN Users ON Attendence.Username = Users.Username
      Group by Users.GroupID
  </code></pre>
  <p>But how do get them to work together?</p>
  <h3>Thank</h3>