Day 15 of my DSA journey — SQL Practice Today I focused on SQL and continued working on the SQL 50 study plan on LeetCode. What I covered: • SELECT queries and filtering • JOIN operations (INNER JOIN, LEFT JOIN) • Handling NULL values • GROUP BY with aggregate functions • Writing queries for real-world scenarios Progress: • Completed 23 / 50 SQL problems Key takeaway: SQL is all about understanding the data first, then applying the right operations like filtering, joining, and grouping. Thinking in terms of tables and relationships makes queries much easier to write. #DSA #SQL #LeetCode #Database #CodingJourney #Learning
SQL Practice on LeetCode: Day 15 of DSA Journey
More Relevant Posts
-
🚀 Day 49 | LeetCode Learning Journal Today I solved Rank Scores using SQL. This problem introduced me to ranking functions and how to handle duplicate values efficiently in databases! 🔑 Key Points: • Used DENSE_RANK() for ranking • Applied ORDER BY to rank scores in descending order • Understood difference between RANK() and DENSE_RANK() • Ensured no gaps in ranking 🌱 What I Learned: • How ranking functions work in SQL • Handling duplicates while assigning ranks • Writing cleaner queries using window functions • Importance of choosing the right ranking method #LeetCode #100DaysOfCode #DSA #CodingJourney #SQL #Database #Day49 🚀
To view or add a comment, sign in
-
-
🚀 Day 16/30 – SQL Challenge 🔹 Problem: Find the first year each product was sold along with its details. 🔹 Approach: Used MIN(year) with a JOIN to get the correct records. Also explored using ROW_NUMBER(). 🔹 Learning: Avoid tuple IN queries and prefer JOINs or window functions for better results. #SQL #LeetCode #Day16 #CodingJourney #ProblemSolving #SDE
To view or add a comment, sign in
-
-
🚀 Day 19/30 of my SQL Problem Solving Challenge 💻 Problem Statement: Find total distance traveled by each user and sort them by highest distance. If distances are equal, sort by name. 🧠 Approach: Used LEFT JOIN to include all users, SUM() with GROUP BY to calculate total distance, and ORDER BY for sorting. Also handled NULL values using COALESCE. ✨ Key Learning: Break the problem into steps, join data, group it, apply aggregation, then sort. Also learned a new function COALESCE, which replaces NULL values by returning the first non-null value (used it here to convert NULL distance into 0). #SQL #30DaysOfSQL #MYSQL #CodingJourney #SDE #ProblemSolving #Streak #DailyLearning
To view or add a comment, sign in
-
-
🚀 Day 50 | LeetCode Learning Journal Today I solve Delete Duplicate Emails using SQL. This problem helped me understand how to clean duplicate data efficiently in databases! 🔑 Key Points: • Used SELF JOIN to identify duplicate emails • Compared records using id to keep the smallest one • Deleted unwanted duplicate rows • Explored alternative solution using GROUP BY 🌱 What I Learned: • How to remove duplicate records in SQL • Importance of data cleaning in real-world applications • Working with self joins for comparison • Writing efficient delete queries #LeetCode #100DaysOfCode #DSA #CodingJourney #SQL #Database #Day50 🚀
To view or add a comment, sign in
-
-
🚀 Day 18 of Learning SQL Today I explored Subqueries in SQL and understood how powerful they are when dealing with complex conditions. Here’s what I learned: 🔹 Subqueries are queries written inside another query 🔹 They are useful when we need to find unknown values or conditions 🔹 Help in breaking complex problems into smaller, manageable parts 🔹 Commonly used with SELECT, WHERE, and FROM clauses 💡 Key Insight: Whenever we don’t know an exact value or condition beforehand, we can use a subquery to dynamically fetch it and use it in the main query. This concept made me realize how SQL can solve real-world problems efficiently by combining multiple queries. Step by step, building stronger SQL skills! 💪 #Day18 #SQL #Subqueries #LearningJourney #DataAnalytics #Programming #Database
To view or add a comment, sign in
-
-
🚀 Day 8/100 – Combining SQL Logic & String Problem Solving Today’s learning was a mix of SQL queries and DSA string problems, helping me strengthen both database concepts and coding logic. 💻 What I worked on: 🗄️ SQL Practice Solved queries involving aggregation and filtering Used functions like: MAX() ROUND() Applied subqueries to fetch precise results 📌 Example: Finding maximum latitude under a condition Extracting corresponding longitude using subqueries 💻 DSA (Strings) on LeetCode 1️⃣ Length of Last Word Traversed string from end Handled trailing spaces efficiently 2️⃣ Find First Occurrence (strStr) Implemented substring matching Understood basic pattern searching 🧠 Key Learning: ✔ SQL helps in extracting meaningful insights from structured data ✔ String traversal techniques are important for interviews ✔ Edge case handling (spaces, substrings) improves problem-solving 📈 Progress: Continued consistency in daily coding Strengthening fundamentals in both SQL & DSA 🎯 Next Goals: Move to medium-level problems Learn advanced SQL queries (JOINs, GROUP BY) Explore efficient string algorithms Building consistency one day at a time 🚀 #Day8 #100DaysOfLearning #SQL #DSA #LeetCode #Strings #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
🚀 Day 51 | LeetCode Learning Journal Today I solved Rising Temperature using SQL. This problem helped me understand how to compare data across rows and work with dates effectively! 🔑 Key Points: • Used SELF JOIN to compare current and previous day • Applied DATEDIFF() to ensure consecutive dates • Checked temperature increase condition • Explored window function (LAG) as an alternative 🌱 What I Learned: • How to compare rows within the same table • Working with date functions in SQL • Importance of handling time-based data • Writing efficient queries using joins and window functions #LeetCode #100DaysOfCode #DSA #CodingJourney #SQL #Database #Day51 🚀
To view or add a comment, sign in
-
-
🚀 Day 9/30 of My LeetCode Journey (SQL Focus) Another day, another step towards mastering SQL! 📊💻 🔹 **SQL Problem of the Day** 👉 *Delete Duplicate Emails* Given a `Person` table, write a query to delete all duplicate emails, keeping only the record with the smallest `id`. 💡 *Key Concept:* Identifying duplicates using self-join / subquery and removing extra records using `DELETE`. Learning not just how to fetch data, but also how to clean and manage it efficiently 🔥 Day 9 done ✅ #LeetCode #30DaysChallenge #SQL #CodingJourney #Consistency #DataCleaning #ProblemSolving #Learning
To view or add a comment, sign in
-
🚀 Day 36 of My SQL Learning Journey Today I worked on a challenging SQL problem involving consecutive records and learned an important lesson along the way 🔥 🔹 Problem: Find records where people count is ≥ 100 for at least 3 consecutive entries 🔗 Problem Link: https://lnkd.in/gNBER5CQ 🔹 Final Solution: WITH temp AS ( SELECT id, visit_date, people, id - ROW_NUMBER() OVER (ORDER BY id) AS grp FROM Stadium WHERE people >= 100 ) SELECT id, visit_date, people FROM temp WHERE grp IN ( SELECT grp FROM temp GROUP BY grp HAVING COUNT(*) >= 3 ); 🔹 Key Learning 💡: The approach was to use ID-based grouping, because the problem depends on consecutive entries (IDs), not consecutive dates. 🔹 Concepts Used: ROW_NUMBER() for sequence handling Grouping consecutive records Window functions + aggregation 💡 Debugging mistakes helped me understand the problem more deeply than just solving it! Consistency continues 🚀 #SQL #LeetCode #WindowFunctions #ProblemSolving #90DaysOfCode #CodingJourney
To view or add a comment, sign in
-
-
🤔 Ever wondered how SQL actually works behind the scenes? It all comes down to 5 powerful command types: ✨ DDL – Structure your database ✨ DML – Add & modify data ✨ DCL – Control access ✨ TCL – Manage transactions ✨ DQL – Fetch data 💡 Think of it like this: Structure ➝ Data ➝ Security ➝ Control ➝ Query If you master these, you're already ahead of most beginners 🚀 🌐 www.skillversed.com 📩 support@skillversed.com 📌 Save this cheat sheet 💬 Which one confuses you the most? 🔁 Share with your coding buddy #SQLBasics #LearnToCode #DataEngineer #TechLearning #SQLTips #CodingJourney #DatabaseManagement #Skillversed
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Great Pavithra A