🚀 Day 26 – 30 Days SQL LeetCode Challenge Today’s problem was simple but highlights an important real-world scenario 👀 📌 Today's Problem: Article Views I (LeetCode #1148) 🧠 Problem Statement: Find all authors who viewed at least one of their own articles. 💡 Key SQL Concepts Used: • DISTINCT • Filtering with conditions • Comparing columns within the same row 📚 What I Practiced Today: ✔ Comparing values within the same table ✔ Removing duplicates using DISTINCT ✔ Writing clean filtering queries 🔥 This pattern is useful in: • Detecting self-actions (self-purchases, self-views) • Fraud detection • User behavior analysis 🔗 GitHub Repository: https://lnkd.in/e8aV37dA #SQL #LeetCode #DataAnalytics #30DaysOfSQL #LearningInPublic
SQL LeetCode Challenge Day 26: Article Views
More Relevant Posts
-
🚀 Day 24 – 30 Days SQL LeetCode Challenge Today’s problem felt like analyzing a real social media network 👥 📌 Today's Problem: Friend Requests II: Who Has the Most Friends (LeetCode #602) 🧠 Problem Statement: Find the person who has the highest number of friends and return their ID along with the total count. 💡 Key SQL Concepts Used: • UNION ALL • Aggregation (COUNT) • GROUP BY • ORDER BY + LIMIT 📚 What I Practiced Today: ✔ Converting relationships into a single column using UNION ALL ✔ Counting total connections (friends) ✔ Finding top results using sorting + limit 🔥 This pattern is used in: • Social networks (friends/followers) • Graph-like data problems • Recommendation systems 🔗 GitHub Repository: https://lnkd.in/e8aV37dA #SQL #LeetCode #DataAnalytics #30DaysOfSQL #LearningInPublic #SocialNetworkAnalysis
To view or add a comment, sign in
-
-
Solving the SQL 50 challenge on LeetCode has been an exciting and confidence-boosting journey. Each problem pushed me to think deeper, optimize queries, and strengthen my understanding of SQL concepts. From basic queries to advanced topics like joins, aggregations, subqueries, and window functions — this journey was truly enriching 💡 📘 What’s in my notes/document? A structured study guide covering: All 50 problems with solutions Clear explanations for each query Key SQL concepts like SELECT, JOINs, Aggregations, Window Functions, and more Practical patterns and best practices for real-world scenarios Once you get a solid grip on fundamentals, problems labeled medium or even hard start feeling like easy. It’s all about consistency and practice. #SQL #LeetCode #DataEngineering #LearningJourney #sql50
To view or add a comment, sign in
-
🚀 Day 28/50 #LeetCodeChallenge Today’s problem: Biggest Single Number This problem was a brilliant exercise in combining Aggregation with Subqueries to filter out duplicates effectively. 🔥 💡 Problem Insight: The task was to find the largest number that appears only once in the table. If no unique number exists, the result should be null. 🧠 Key Learning: Identify Uniqueness: Used GROUP BY combined with HAVING COUNT(*) = 1 to isolate numbers that don't repeat. The Power of MAX(): Applied MAX() on the filtered subset to grab the highest value. Handling Nulls: Using MAX() on a subquery is a clean way to ensure a null output if the criteria aren't met, instead of getting an empty result set. ⚡ Big Realization: The real trick isn't just finding the maximum—it's knowing how to exclude data that doesn't fit your constraints (duplicates) before you look for the top value. 📈 Takeaway: SQL logic is often about "layers." Filtering the noise first makes finding the answer straightforward. Consistency > Difficulty 💯 #Day28 #LeetCode #SQL #DataAnalytics #LearningJourney #CodingChallenge #50DaysOfChallenge
To view or add a comment, sign in
-
-
🚀 Day 34/50 – #LeetCode Challenge Today’s problem: Product Price at a Given Date 📊 This one really tested my understanding of handling time-based data in SQL. 💡 Key Learning: When dealing with historical data, it's important to focus on the latest valid record before a given date — not just any record. 🔍 Approach I used: Consider all products Find the most recent price change on or before the target date (2019-08-16) If no change exists → use default price = 10 Used concepts like MAX(date), GROUP BY, and JOIN 🧠 What I improved today: Writing cleaner SQL queries Handling edge cases (no previous data) Thinking in terms of real-world data scenarios 🔥 Consistency is building confidence step by step. #Day34 #LeetCode #SQL #DataStructures #CodingJourney #Consistency #PlacementPreparation
To view or add a comment, sign in
-
-
🚀 Day 11/30 of My LeetCode Journey (SQL Focus) Keeping the momentum going and diving deeper into SQL concepts! 📊🔥 🔹 **SQL Problem of the Day** 👉 *Rank Scores* Given a `Scores` table, write a query to rank the scores from highest to lowest. Rules: • Same scores share the same rank • No gaps in ranking (dense ranking) 💡 *Key Concept:* Using ranking functions like `DENSE_RANK()` (or alternative logic if not available). Understanding ranking functions is a game changer for analytical queries 📈 Day 11 done ✅ #LeetCode #30DaysChallenge #SQL #CodingJourney #Consistency #ProblemSolving #DataAnalytics #Learning
To view or add a comment, sign in
-
Day 21/100 of #100DaysOfCode 💻 Today's problem made me think in trees. 🌳 Tree Node:- Given a tree structure in a table, classify each node as Root, Inner, or Leaf. The logic: Root → has no parent (p_id IS NULL) Inner → appears as a parent of someone else Leaf → everything else I didn't get it right on the first try. 😅 My first attempt used "WHERE p_id = 1" inside the subquery, which hardcodes the root and breaks for any other tree structure. Wrong logic, wrong output. Then I stepped back and thought about it properly (Code is given in the image) 💡 The fix is instead of hardcoding, ask "does this node appear as a parent of anyone?" If yes → Inner. That's the real tree logic. Never hardcode what SQL can figure out dynamically. 🧩 Trial and error is part of the process. The wrong attempt taught me more than the right one. 😄 #SQL #100DaysOfCode #LearningInPublic #DataAnalytics #Consistency #DevJourney #LeetCode
To view or add a comment, sign in
-
-
Day 43 | LeetCode Learning Journal 🚀 Today I solved Customers Who Never Order using SQL joins and NULL filtering. This problem helped me understand how to find missing data across related tables! 🔑 Key Points: • Given Customers and Orders tables • Needed to find customers who never placed any order • Used LEFT JOIN to combine tables • Applied NULL check to filter non-ordering customers 🌱 What I Learned: • LEFT JOIN helps identify missing relationships • Importance of checking NULL values in SQL • Real-world use case: finding inactive users/customers • Improved understanding of JOIN + filtering logic #LeetCode #100DaysOfCode #DSA #SQL #CodingJourney #Day43 🚀
To view or add a comment, sign in
-
-
🚀 Day 4/30 of My LeetCode Journey (SQL Focus) Keeping the streak alive and diving deeper into SQL concepts! 📊💻 🔹 **SQL Problem of the Day** 👉 *Rising Temperature (Weather Table)* Given a `Weather` table with columns (id, recordDate, temperature), write a query to find all ids where the temperature is higher than the previous day (yesterday). 💡 *Key Concept:* Self JOIN on dates (using date difference of 1 day) to compare current and previous records. Learning how to compare rows across time using SQL joins — really powerful concept! 🔥 Consistency is the key. Let’s keep building 📈 #LeetCode #30DaysChallenge #SQL #DataAnalytics #CodingJourney #Consistency #ProblemSolving #LearnInPublic
To view or add a comment, sign in
-
Day 42 | LeetCode Learning Journal 🚀 Today I solved Combine Two Tables using SQL JOIN operations. This problem helped me understand how to combine data from multiple tables efficiently! 🔑 Key Points: • Given two tables: Person and Address • Needed to display firstName, lastName, city, and state • Used LEFT JOIN to combine both tables • Ensured all persons are included, even without address 🌱 What I Learned: • LEFT JOIN includes all records from the left table • Handling NULL values when data is missing • Importance of table relationships using keys • Strengthened basics of SQL joins and real-world data handling #LeetCode #100DaysOfCode #DSA #SQL #CodingJourney #Day42 🚀
To view or add a comment, sign in
-
-
🚀 Strengthening My SQL Fundamentals — One Query at a Time! Over the past few days, I’ve been consistently practicing SQL on platforms like LeetCode and HackerRank, focusing on building a strong foundation in data querying and analysis. Here’s what I’ve worked on: 🔹 Basic SELECT queries 🔹 Filtering with WHERE conditions 🔹 Sorting using ORDER BY 🔹 Aggregations (SUM, COUNT, GROUP BY) 🔹 Handling duplicates with DISTINCT 🔹 Pattern matching using LIKE Solved problems like: ✔ Game Play Analysis ✔ Sales Analysis ✔ User Activity (Last 30 Days) ✔ Weather Observation Queries What I’m learning: Consistency > Complexity. Mastering the basics deeply is key to solving advanced problems efficiently. Excited to keep improving and move towards more complex SQL joins, window functions, and real-world datasets 📊 #SQL #DataAnalytics #LearningInPublic #LeetCode #HackerRank #DataScience #TechJourney
To view or add a comment, sign in
-
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