문제 1

image.png

정답

select round(sum(case when (category is null or category in ('n/a')) then 1 else 0 end)/ count(id)*100 , 2)
from calls
where date_format(call_date,'%Y-%m-%d') < "2024-04-16"

문제 2

image.png

정답

select age_bucket,
 round((sum(case when event_type in ('order') then 1 else 0 end)/count(event_id)*100),2) conversion_rate
from app_events a
     join user_profiles u
     on a.user_id = u.user_id
where signup_date >= '2023-01-01' and event_type in ('order', 'view')
group by age_bucket
order by age_bucket