Skip to content

Commit 09729eb

Browse files
committed
finish Confirmation Rate
1 parent a42c933 commit 09729eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

SQL/SQL-50/Confirmation_Rate.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
select s.user_id,
2+
CASE
3+
WHEN c.time_stamp is null THEN 0.0
4+
ELSE round(avg(c.action = "confirmed"), 2)
5+
END as confirmation_rate
6+
from Signups s
7+
left join Confirmations c
8+
on s.user_id = c.user_id
9+
group by s.user_id;

0 commit comments

Comments
 (0)