SyntaxFix
Write A Post
Hire A Developer
Questions
You just need parentheses around your select:
SET @times = (SELECT COUNT(DidWin) FROM ...)
Or you can do it like this:
SELECT @times = COUNT(DidWin) FROM ...