Confirmation Rate | Leetcode 1934 | Crack SQL Interviews in 50 Qs

  Рет қаралды 5,778

Learn With Chirag

Learn With Chirag

Күн бұрын

Пікірлер: 25
@learnwithchirag
@learnwithchirag 6 ай бұрын
Hey there! 👋 For more interesting content, tutorials, and updates, Feel free to connect with me on Instagram Handles :- @createwithchirag - instagram.com/createwithchirag/ @learn.with.chirag - instagram.com/learn.with.chirag/ LinkedIn: www.linkedin.com/in/chirag-sehgal-9200111b8/ Let's stay connected and keep the creativity flowing! 💡
@srushtikale7455
@srushtikale7455 13 күн бұрын
Great Explanation I finally understood aggregate function for confirmation_rate
@shashibhagat490
@shashibhagat490 Ай бұрын
we can do using avg() also select s.user_id, ROUND(AVG(CASE WHEN c.action = 'confirmed' THEN 1 ELSE 0 END), 2) as confirmation_rate from signups as s left join confirmations as c on s.user_id=c.user_id group by s.user_id
@seematripathy
@seematripathy Ай бұрын
Thanks for the solution. Can you please solve this problem in postgressql ? I am getting divided by zero error.
@dataman17
@dataman17 5 ай бұрын
loved the way how you broke it down step by step and showed us output and also pointed out the errors. Signs of a great teacher who are hard to find. Thank you!
@learnwithchirag
@learnwithchirag 5 ай бұрын
Glad you enjoyed it!...Do share with your friends too 🎉💐
@akhilpratapsingh3223
@akhilpratapsingh3223 10 ай бұрын
Great Explanation Bhaiya !!!!
@learnwithchirag
@learnwithchirag 10 ай бұрын
Your comments keep me motivated! Keep Learning & Supporting:-)
@vaibhav5269
@vaibhav5269 5 ай бұрын
you didn't write c.action,but it still worked in 1st line
@nikhildoye9671
@nikhildoye9671 3 ай бұрын
why did it work? since action is unique column?
@Ayan_Pradh07
@Ayan_Pradh07 4 ай бұрын
Amazingly Explained!!
@learnwithchirag
@learnwithchirag 4 ай бұрын
Glad it was helpful! Keep Learning 💯💐
@Meme_-883
@Meme_-883 3 ай бұрын
nicely explained
@learnwithchirag
@learnwithchirag 2 ай бұрын
Thanks for liking. Keep Learning 💯
@civilizedmonster
@civilizedmonster 9 ай бұрын
Great, Thank you!
@learnwithchirag
@learnwithchirag 9 ай бұрын
Glad it was helpful to you 😄. Keep watching :-)
@apoorvpradhan5125
@apoorvpradhan5125 2 ай бұрын
Thank you bhaiya.
@xgaming8485
@xgaming8485 5 ай бұрын
Can we use AVG(c.action='confirmed')?
@learnwithchirag
@learnwithchirag 4 ай бұрын
Using AVG(c.action='confirmed') wouldn't give you the desired result because AVG() calculates the average of numeric values. The expression c.action='confirmed' evaluates to either true or false (1 or 0 in MySQL's boolean context), not a numeric value that AVG() can operate on.
@AnuragSingh-jh2ot
@AnuragSingh-jh2ot 8 ай бұрын
why we can't use count() instead of sum() in the numerator
@learnwithchirag
@learnwithchirag 7 ай бұрын
The 'COUNT()' function in SQL counts the number of rows in a result set, and it does not work with conditional expressions like action = 'confirmed' directly inside it. If you want to count the number of rows where action is 'confirmed', you typically need to use a conditional statement within the 'SUM()' function.
@ninadthawait4458
@ninadthawait4458 7 ай бұрын
I had the same doubt, amazing explanation of the problem and doubt indeed! Keep going Chirag!
@ayushtibrewal4535
@ayushtibrewal4535 4 ай бұрын
@@learnwithchirag THANKS FOR THE EXPLANATION
@rishavraj7318
@rishavraj7318 4 ай бұрын
bhai best explanation
@learnwithchirag
@learnwithchirag 3 ай бұрын
Thanks a lot. Keep Learning 💯🎉
LeetCode Medium 1934 Interview SQL Question with Detailed Explanation
11:47
Everyday Data Science
Рет қаралды 7 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 13 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 1,6 МЛН
LeetCode 1934: Confirmation Rate [SQL]
12:08
Frederik Müller
Рет қаралды 1,6 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 13 МЛН