;with cte as
(
select
*,
row_number() over(partition by datediff(d, 0, EnteredOn) order by EnteredOn desc) as rn
from YourTable
)
select *
from cte
where rn = 1
;with cte as
(
select
*,
row_number() over(partition by datediff(d, 0, EnteredOn) order by EnteredOn desc) as rn
from YourTable
)
select *
from cte
where rn = 1