What to retrieve week-wise no. of accounts opened in last month data

247 Views Asked by At

I What to retrieve week-wise no. of accounts opened in last month data. example:- In april month's 1st week 2 accounts are opened like wise.
what will be the syntax

I have tried this query but its showing week no. 9 but i want week no. 1 of april month

select datepart(ww,doo) as 'Week No.', count(*) as 'No. of Account'
from accountmaster
where datediff(mm,doo,getdate())=1
group by datepart(ww,doo)
0

There are 0 best solutions below