https://leetcode.com/problems/confirmation-rate/?envType=study-plan-v2&envId=top-sql-50
select a.user_id,
round(AVG(case when b.action='confirmed' then 1.00 else 0.00 end),2) as confirmation_rate
from signups a left outer join confirmations b
group by a.user_id