 <p>I suppose, you want to <code>INNER JOIN</code> those tables like this:</p> <pre><code> SELECT * FROM ( SELECT pi.FighterId, FName, LName, PaymentDay, PaymentDescr, PaymentAmount, Active, ROW_NUMBER() OVER (PARTITION BY fi.FighterId ORDER BY PaymentDay DESC) rn FROM FightersInfo fi LEFT JOIN PaymentInfo pi ON pi.FighterId = fi.FighterId WHERE NOT EXISTS (SELECT * FROM PaymentInfo WHERE FighterId = fi.FighterId AND DATEDIFF(month, PaymentDay, GETDATE()) = 0 ) AND Active =1) t WHERE rn = 1 </code></pre> <p>All the conditions on amount are removed for readability.</p>