Тёмный

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

Learn With Chirag
Подписаться 2,3 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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 12 дней назад
Great Explanation I finally understood aggregate function for confirmation_rate
@seematripathy
@seematripathy Месяц назад
Thanks for the solution. Can you please solve this problem in postgressql ? I am getting divided by zero error.
@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
@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?
@civilizedmonster
@civilizedmonster 9 месяцев назад
Great, Thank you!
@learnwithchirag
@learnwithchirag 9 месяцев назад
Glad it was helpful to you 😄. Keep watching :-)
@Meme_-883
@Meme_-883 3 месяца назад
nicely explained
@learnwithchirag
@learnwithchirag 2 месяца назад
Thanks for liking. Keep Learning 💯
@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.
@apoorvpradhan5125
@apoorvpradhan5125 2 месяца назад
Thank you bhaiya.
@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
@Ayan_Pradh07
@Ayan_Pradh07 4 месяца назад
Amazingly Explained!!
@learnwithchirag
@learnwithchirag 4 месяца назад
Glad it was helpful! Keep Learning 💯💐
@rishavraj7318
@rishavraj7318 4 месяца назад
bhai best explanation
@learnwithchirag
@learnwithchirag 3 месяца назад
Thanks a lot. Keep Learning 💯🎉
Далее
Лучше одной, чем с такими
00:54
Просмотров 654 тыс.