SELECT Agentname,cast(Sum(agentAmount) as int) as Tolling
from TABLENAME where datepart(mm,DATEFIELDNAME) =month(getdate())
and datepart(yyyy,DATEFIELDNAME) =year(getdate())
group by agentname order by Tolling descTo fetch current month data with the help of SQL Server.
