Convert gives an error

When I run this query I get Incorrect syntax error “(“. Is this the correct way of using CONVERT?

SELECT
    DATEPART(mm,[actualclosedate]) AS [Month],
    COUNT([opportunityid]) AS 'Won Opportunities',
    CONVERT(SUM(ISNULL([actualvalue],1)) as numeric (10,2)) AS 'Value'

FROM  [dbo].[FilteredOpportunity]
WHERE [owneridname]= @SalesPerson   
    AND YEAR([actualclosedate]) = @Year

GROUP BY 
    DATEPART(mm,[actualclosedate])`


Source: sql

Leave a Reply