Menu
CodeSprout
Typo-tolerant search across every article, problem and post. to open

🎯 LeetCode SQL: Percentage of Users Attended a Contest | SQL Query Explained Step-by-Step

kvi5hnu6 minutes 46 secondsWatch on YouTube
0comments

Notes

πŸš€ In this video, we solve the "Percentage of Users Attended a Contest" problem from LeetCode, where we calculate the percentage of users who participated in each contest. This problem is great for practicing SQL aggregation and subqueries!

πŸ“Œ What You’ll Learn:
βœ… Using Common Table Expressions (CTEs) for cleaner queries
βœ… Calculating percentages using COUNT() and ROUND()
βœ… How to use GROUP BY and ORDER BY effectively
βœ… Best practices for writing optimized SQL queries

πŸ”— Problem Link:
https://leetcode.com/problems/percentage-of-users-attended-a-contest

πŸ’» SQL Topics Covered:
βœ”οΈ Common Table Expressions (WITH)
βœ”οΈ COUNT() & Aggregation
βœ”οΈ ROUND() for formatting percentages
βœ”οΈ GROUP BY & ORDER BY

πŸ“’ If you find this video helpful, don’t forget to LIKE πŸ‘, SUBSCRIBE πŸ””, and COMMENT below with your thoughts! πŸš€

#SQL #LeetCode #Database #CodingInterview #SQLQueries

Discussion

Sign in to ask a question or share what you learned.