MSSQL how do I query sql for a latest state record after latest date
Solved it myself.. was actually very easy..

SELECT *
FROM myTable
WHERE day &gt;= ( SELECT max(day) 
            FROM [dbo].[myTable]
            WHERE state = 'D'
            AND location = 'ams'
)
ORDER BY [location] DESC, [actual_date] DESC


Thanks anyway for looking up to my issue.