I tun the query in this morning at 06.30 and below 07AM with no result
You run this query 12/13/2023 06.30 and at the same time the Top 10 datas in InterfaceTrafficByDays
table are all 12-12-2023. That's why you got no result with this condition where Datetime = cast(getdate() as date)
.
but if i test now i got the result. Its strange for me.
Check if the InterfaceTrafficByDays table have records of 12-13-2023 now. As I guessed, you got the result now because records of 12-13-2023 are inserted.
Best regards,
Cosmog Hong