ALL. I have table looks like
NAME1 NAME2 Result
Jone Jim win
Kate Lucy loss
Jone Lucy win
Jim Jone loss
I want to select from NAME1 where win case>=3, My code is
SELECT NAME1,Count(Result='win') as WIN_CASE
From TABLE
Group by NAME1
Having Count(Result='win')>=3;
However, the result is not correct from the output, it just returns the total number of names shown in NAME1, what should I do to fix it please?
UPDATE: Thanks for all the reply. The result from Kritner and jbarker work fine. I just forget to add "where"Clause.