Hi Frndz,
Functionality: Gettting total Employee based on Year, month (Whose come more than 31 days)
In sp Parameter declare decimal value as following way
@UnitPrice decimal (20,2)
Query:
select
DATENAME(month,DateField) as MonthPresent,
DATENAME(year,DateField) as YearPresent,
EmployeeName,
COUNT(*) as TotalEmployee
from
TableName
Group By
DATENAME(month,DateField),
DATENAME(year,DateField),
EmployeeName
having COUNT(*) > 31
Hope this helpful!
Thanks