I currently when i run my query i get the following output.
As you can see,the WON and LOST result of the same week falls on different rows and I would like them to appear in one row and have and additional column for total for that week than an average column of WON/Total
SELECT DATEPART(yy,SignalDATE) AS year,DATEPART( wk, Signaldate) as Weeks,
WHEN Result='Won' THEN
END AS Won, CASE WHEN Result='Lost' THEN count(result) END AS Lost FROM [BinarySignals] JOIN Assets ON Assets.AssetId=BinarySignals.AssetId JOIN Results ON Results.ResultId=BinarySignals.ResultId
GROUP BY DATEPART( wk, Signaldate),DATEPART(yy,SignalDATE),result
ORDER BY DATEPART(yy,SignalDATE),DATEPART( wk, Signaldate)
Won/Lost to appear in one row if they are in the same week, add total column then divide Won by total to get percentage