 <p><strong><a href="http://rextester.com/WJRT37911" rel="nofollow">SQL Fiddle Demo</a></strong></p> <pre><code>WITH cte AS ( SELECT ID, Category, MAX(Date) as mdate FROM Table2 GROUP BY ID, Category ) SELECT T1.* --, T2.* FROM Table1 as T1 LEFT JOIN cte as T2 ON T1.ID = T2.ID AND T1.Category = T2.Category WHERE T1.Date &gt; T2.mdate OR T2.mdate is NULL </code></pre> <p><strong>OUTPUT</strong></p> <p><a href="https://i.stack.imgur.com/kvchN.png" rel="nofollow"><img src="https://i.stack.imgur.com/kvchN.png" alt="enter image description here"></a></p>