We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe2d043 commit 9df8ee1Copy full SHA for 9df8ee1
SQL/14주차/JY_Confirmation_Rate.sql
@@ -0,0 +1,11 @@
1
+-- 1934. Confirmation Rate
2
+-- https://leetcode.com/problems/confirmation-rate/
3
+SELECT a.user_id
4
+ , CASE
5
+ WHEN COUNT(IF(action = "confirmed", a.user_id, null)) = 0 THEN round(0, 2)
6
+ ELSE ROUND(COUNT(IF(action = "confirmed", a.user_id, null)) / count(*), 2)
7
+ END AS confirmation_rate
8
+FROM signups a
9
+LEFT JOIN confirmations b
10
+ON a.user_id = b.user_id
11
+GROUP BY a.user_id
0 commit comments