I have a table of FinishedGames with columns: category and a score. I need to know how many games by category finished with more than certain score, but I don't understand the count if structure in PostgreSQL.
select category, count(score) as rounds, count(if score > 7) as wins
from "FinishedGames" group by category;
Does anyone knows how to do this in PostgreSQL?