Try the below:(Not tested)
select DATENAME(Month,Getdate()),SUM(empcount) from tablename
where dateoftransaction > dateadd (MONTH, -6, GETDATE())
Group by DATENAME(Month,Getdate())
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
No comments:
Post a Comment