Difficulty in framing a query I have a table with data as 

A   51 12.01pm
A   53 03.00pm
B   51 04.00pm
C   51 11.55am
C   51 12.00pm
C   53 12.05pm
D   53 03.00pm
D   51 04.00pm
E   53 05.00pm
E   53 05.02pm
F   51 03.21pm
F   51 09.32pm


and my output should be the count of data having the latest status 53 with the latest time

Output should be A and C
WITH cte AS ( SELECT col1, 
              FIRST_VALUE(col2) OVER (PARTITION BY col1 
                                      ORDER BY col3 DESC) fv 
              FROM table )
SELECT col1
FROM cte
WHERE fv = 53


If your server is more ancient than 2012, do the same by using ROW_NUMBER() and adding the condition rownumber=1.