SyntaxFix
Write A Post
Hire A Developer
Questions
Try this for SQL Server:
WITH cte AS ( SELECT home, MAX(year) AS year FROM Table1 GROUP BY home ) SELECT * FROM Table1 a INNER JOIN cte ON a.home = cte.home AND a.year = cte.year