I'm trying to count the number of times multiple words appears in a column named sg_event but currently run each one separately. Does anyone know how I can combine this into one query.
select count(*) from metrics
WHERE sg_event = 'open';
select count(*) from metrics
WHERE sg_event = 'delivered';
select count(*) from metrics
WHERE sg_event = 'click';
My desired outcome is as follows,
open_count, delivered_count, click_count