What percent of customers are reward members?
ID Reward Member 1 y 2 y 3 n 4
You can use COUNT():
COUNT()
select 1.0 * count(case when reward_member = 'y' then 1 else 0 end) / count(*) from t