I have a research table like
researcher award
person1 award1
person1 award2
person2 award3
What I want to get is to count the award based on researcher but it researcher shouldnt be repeated. So in this example. The result should be
2
Coz award1 and award2 is the same person + award3 which is a different person.
I already tried
SELECT count(award) from research where researcher=(select distinct(researcher) from researcher)
But it says
ERROR: more than one row returned by a subquery used as an expression
So any alternative solution or changes?
SELECT researcher, count(award) FROM research GROUP BY researcher?