У нас вы можете посмотреть бесплатно LeetCode 196 - Delete Duplicate Emails (Python and SQL) [Easy] или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
🧠 Don’t miss out! Get FREE access to my Skool community — packed with resources, tools, and support to help you with Data, Machine Learning, and AI Automations! 📈 https://www.skool.com/data-and-ai-aut... In this video, we walk through LeetCode Problem 196: Delete Duplicate Emails using both SQL and Python (Pandas). It’s a classic question about cleaning up duplicates in a user database—a must-know for data analysts, engineers, and SQL beginners! 🚀 Hire me for Data Work: https://ryanandmattdatascience.com/da... 👨💻 Mentorships: https://ryanandmattdatascience.com/me... 📧 Email: ryannolandata@gmail.com 🌐 Website & Blog: https://ryanandmattdatascience.com/ 🖥️ Discord: / discord 📚 *Practice SQL & Python Interview Questions: https://stratascratch.com/?via=ryan 📖 *SQL and Python Courses: https://datacamp.pxf.io/XYD7Qg 🍿 WATCH NEXT LeetCode Playlist: • Leetcode Data Science Interview Questions LeetCode 185: • LeetCode 185 - Department Top Three Salari... LeetCode 595: • LeetCode 595 - Big Countries (Python and S... LeetCode 184: • LeetCode 184 – Department Highest Salary (... In this video, I walk through solving LeetCode 196 "Delete Duplicate Emails" using both SQL and Python Pandas. This easy-level question asks you to delete all duplicate emails while keeping only the one with the smallest ID. The twist here is that you need to write a DELETE statement in SQL, not a SELECT, and modify the table in place with Pandas. I start by breaking down the SQL approach, showing you how to build a CTE (Common Table Expression) with a RANK function partitioned by email and ordered by ID. Then I explain how to use a DELETE statement with a subquery to remove rows where the email rank is greater than one. This keeps only the first occurrence of each email based on the smallest ID. For the Python Pandas solution, I demonstrate an even simpler two-line approach using sort_values() and drop_duplicates(). By sorting the dataframe by email and ID first, then dropping duplicates while keeping the first occurrence, we achieve the same result with much less code. Both solutions are accepted by LeetCode and work efficiently. This question is a great example of how data manipulation differs between SQL and Pandas, and why understanding both approaches makes you a stronger data analyst or data scientist. If you're preparing for technical interviews or just want to sharpen your SQL and Pandas skills, this walkthrough will help you understand the logic behind deleting duplicates while preserving data integrity. TIMESTAMPS 00:00 Problem Introduction 00:38 SQL Solution Overview 01:41 Explaining the SQL Query 02:51 Python Pandas Solution 03:58 Final Summary OTHER SOCIALS: Ryan’s LinkedIn: / ryan-p-nolan Matt’s LinkedIn: / matt-payne-ceo Twitter/X: https://x.com/RyanMattDS Who is Ryan Ryan is a Data Scientist at a fintech company, where he focuses on fraud prevention in underwriting and risk. Before that, he worked as a Data Analyst at a tax software company. He holds a degree in Electrical Engineering from UCF. Who is Matt Matt is the founder of Width.ai, an AI and Machine Learning agency. Before starting his own company, he was a Machine Learning Engineer at Capital One. *This is an affiliate program. We receive a small portion of the final sale at no extra cost to you.