Calculate not-nulls in group by
COUNT(condition) counts all rows in the group where condition is not null.

COUNT(*) counts all rows in the group.

COUNT(condition) / COUNT(*) * 100 returns the ratio of the above in percent.