I want my answer to be in decimal format, showing 4 decimal places. I attempted this, and it shows me the error of Incorrect syntax near 'CAST', epected 'As'
Select Round(Avg(Cast(case when isfarm = 'Yes' And morethan10 = 'Yes' then buildyear Else Null End) As Float), 4) From insurance