What percent of customers are reward members?
ID Reward Member 1 y 2 y 3 n 4
I would use conditional aggregation:
select avg( case when rewardmember = 'y' then 1.0 else 0 end) as ratio from t;
Some databases allow shorter syntax, such as:
select avg( rewardmember = 'y' ) from t;
or:
select avg( (rewardmember = 'y')::int ) from t;