select year,
sum(if(regionalSingleRecord='WR',1,0)) singleWRs,
sum(if(regionalAverageRecord='WR',1,0)) averageWRs,
sum(if(regionalSingleRecord='WR',1,0)+if(regionalAverageRecord='WR',1,0)) WRs,
count(distinct eventId),
sum(if(regionalSingleRecord='WR',1,0)+if(regionalAverageRecord='WR',1,0))/count(distinct eventId)
from Results, Competitions
where Competitions.id = competitionId
group by year
order by year