select month(ord_date),(select daysinmonth(month(ord_date))
from ord
where ord_date>'1/2/02'
group by month(ord_date)
returns this error
Server: Msg 8120, Level 16, State 1, Line 3
Column 'ord.ORD_DATE' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
daysinmonth is a user defined function that returns the number of working days in a month.