❄️ LeetCode Daily Challenge 📅 Day 38 of 50 Days SQL Challenge Today’s problem focused on event sequencing — identifying recovery patterns from time-series data. 📌 Problem: Find COVID Recovery Patients 🔗Problem Link: https://lnkd.in/gcRgygqH 💡 Problem Breakdown: Identify patients who have recovered: ✔ Must have at least one Positive test ✔ Followed by a Negative test on a later date ✔ Ignore inconclusive results ✔ Calculate recovery time = first negative after first positive 38 days of consistent SQL practice completed ✅ Daily practice is turning concepts into intuition 💪 Let’s grow one query at a time 🚀 💬 How would you approach this? Using window functions or aggregation + joins? Drop your thoughts below 👇 #LeetCode #SQL #DataEngineering #Analytics #HealthcareAnalytics #SQLPractice #LearningInPublic #50DaysChallenge #AzureDataEngineer
Shyam Sangati’s Post
More Relevant Posts
-
❄️ LeetCode Daily Challenge 📅 Day 30 of 50 Days SQL Challenge Today’s challenge was a deep dive into subscription analytics and churn prediction — something very relevant to real-world data scenarios. 📌 Problem: Find Churn Risk Customers 🔗Problem Link: https://lnkd.in/dw95yEPj 💡 Problem Breakdown: Identify churn risk customers who: ✔ Currently have an active subscription (last event is not cancel) ✔ Have at least one downgrade in their history ✔ Current plan revenue < 50% of their historical maximum ✔ Have been subscribed for at least 60 days 30 days of consistent SQL practice completed ✅ Daily practice is turning concepts into intuition 💪 Let’s grow one query at a time 🚀 Drop your approach below 👇 #LeetCode #SQL #DataEngineering #Analytics #ChurnAnalysis #CustomerRetention #SQLPractice #WindowFunctions #LearningInPublic #50DaysChallenge
To view or add a comment, sign in
-
-
Day 60 of #100DaysOfSQLSolved 💻 Solved “Weather Observation Station 10” on HackerRank ✅ 🔍 Problem: Retrieve unique city names that do NOT start with vowels (a, e, i, o, u). 🧠 What I practiced: Using DISTINCT to eliminate duplicates Applying string filtering with LEFT() / SUBSTR() Writing efficient WHERE conditions Strengthening logical filtering in SQL 💡 Key Insight: Excluding specific patterns is just as important as selecting them—this improves real-world data filtering skills. 📈 Consistently improving my SQL skills step by step towards becoming a Data Analyst. #SQL #DataAnalytics #HackerRank #100DaysOfCode #LearningJourney #FutureDataAnalyst 🚀
To view or add a comment, sign in
-
-
THIS PASSES CODE REVIEW. STILL WRONG. Look at the query in the image. It tries to calculate daily active users by picking the latest event per user per day. At first glance, everything looks correct: • Window function • Proper partitioning • Clean aggregation But there’s a subtle issue. In real systems, events don’t always arrive in order. Late-arriving data can completely change what “latest” means. The query runs successfully. The numbers look reasonable. But the result can be wrong. This is exactly how incorrect metrics end up in dashboards without anyone noticing. Your challenge: What is wrong with this query? How would you fix it? Drop your answer in the comments. Follow Harish Chatla for real-world SQL challenges. Repost if this could help someone preparing for interviews or debugging production queries. Subscribe on YouTube for full breakdowns. #SQL #DataEngineering #AnalyticsEngineering #BigData #DataAnalytics #LearnSQL #DataQuality #ETL #DataEngineeringLife #DataRejected
To view or add a comment, sign in
-
-
This query runs perfectly. No errors. Clean logic. Looks correct. But the result is NOT reliable. Look closely at the query in the image. It tries to get the latest successful payment per customer using ROW_NUMBER(). Seems right… but there’s a hidden issue. When multiple payments happen on the same day, this query can return inconsistent results across runs. This is a classic production bug — everything works, but the output is non-deterministic. Your challenge: What is wrong with this query? How would you fix it? Comment your SQL below. Follow Data Rejected for real-world SQL challenges. Repost if this could help someone preparing for interviews or debugging production issues. Subscribe on YouTube for full SQL breakdowns. #SQL #DataEngineering #Analytics #DataAnalytics #LearnSQL #SQLTips #QueryOptimization #BigData #TechCareers #DataScience #DataRejected
To view or add a comment, sign in
-
-
❄️ LeetCode Daily Challenge 📅 Day 19 of 50 Days SQL Challenge Continuing my SQL journey with another Hard-level SQL problem focused on session analytics and behavioral anomaly detection. 📌 Problem: Find Zombie Sessions 🔗 Problem Link: https://lnkd.in/gDEr9VEq 💡 Problem Summary: We need to identify zombie sessions — sessions where users appear active but show abnormal behavior patterns. A session qualifies as a zombie session if it satisfies ALL conditions: ✔ Session duration > 30 minutes ✔ At least 5 scroll events ✔ Click-to-scroll ratio < 0.20 ✔ No purchases during the session Finally, return the result ordered by: scroll_count (DESC), session_id (ASC) The idea was to aggregate event-level data into session-level metrics, then filter sessions based on behavioral thresholds. Another Hard SQL challenge completed — consistency continues 💪 Let’s grow one query at a time 🚀 #LeetCode #SQL #DataEngineering #Analytics #Database #WindowFunctions #DailyPractice #LearningInPublic #50DaysChallenge
To view or add a comment, sign in
-
-
Day 9/50 – #SQLChallenge 🚀 Solved “Rising Temperature” problem on LeetCode. ✅ Approach: Used SELF JOIN to compare rows within the same table ✅ Key Concept: Comparing consecutive records using date difference 💡 Advanced Insight: Since SQL doesn’t have a direct way to access the previous row, a SELF JOIN helps simulate this behavior by pairing each record with its previous day. This pattern is widely used in time-series data analysis. 🔍 Takeaway: Understanding how to compare rows across time is crucial for real-world scenarios like tracking growth, trends, and performance metrics. Consistency is compounding 📈 #SQL #LeetCode #Database #Joins #CodingChallenge #ProblemSolving #LearningInPublic #DeveloperJourney
To view or add a comment, sign in
-
-
Most SQL problems are not about syntax; they’re about recognizing patterns. For example, detecting consecutive user activity, or streaks, isn’t a “SQL function” problem — it’s a pattern recognition problem. Here’s a simple approach to tackle it: - Assign sequence using ROW_NUMBER - Normalize gaps using date – sequence - Group to identify streaks Advanced SQL is about transforming data into shapes where the answer becomes obvious. Once I understood this, problems like consecutive logins, sessionization, and retention cohorts started to feel much easier. What SQL pattern took you the longest to understand? #SQL #DataEngineering #Analytics #ReLearningInPublic
To view or add a comment, sign in
-
-
𝗥𝗲𝗮𝗹-𝗧𝗶𝗺𝗲 𝗦𝗤𝗟 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲 𝗳𝗼𝗿 𝗗𝗮𝘁𝗮 𝗘𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 & 𝗔𝗻𝗮𝗹𝘆𝘀𝘁𝘀 In production systems, performance matters more than syntax. You have a table 𝘵𝘳𝘢𝘯𝘴𝘢𝘤𝘵𝘪𝘰𝘯𝘴 with millions of records: • 𝘶𝘴𝘦𝘳_𝘪𝘥 • 𝘵𝘳𝘢𝘯𝘴𝘢𝘤𝘵𝘪𝘰𝘯_𝘥𝘢𝘵𝘦 • 𝘢𝘮𝘰𝘶𝘯𝘵 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻: How would you efficiently find the 𝘭𝘢𝘵𝘦𝘴𝘵 𝘵𝘳𝘢𝘯𝘴𝘢𝘤𝘵𝘪𝘰𝘯 𝘱𝘦𝘳 𝘶𝘴𝘦𝘳? 𝗢𝗽𝘁𝗶𝗼𝗻𝘀 A) GROUP BY + MAX(date) B) Correlated subquery C) ROW_NUMBER partition D) DISTINCT + ORDER BY Think beyond correctness — consider 𝘱𝘦𝘳𝘧𝘰𝘳𝘮𝘢𝘯𝘤𝘦, 𝘴𝘤𝘢𝘭𝘢𝘣𝘪𝘭𝘪𝘵𝘺, 𝘢𝘯𝘥 𝘳𝘦𝘢𝘭-𝘵𝘪𝘮𝘦 𝘱𝘪𝘱𝘦𝘭𝘪𝘯𝘦𝘴 Drop your answer & reasoning in the comments! #SQL #DataEngineering #BigData #Analytics #WindowFunctions #InterviewPrep
To view or add a comment, sign in
-
❄️ LeetCode Daily Challenge 📅 Day 21 of 50 Days SQL Challenge Continuing my SQL consistency journey with a Medium-level SQL problem focused on joins and conditional aggregation. 📌 Problem : Market Analysis I 🔗 Problem Link : https://lnkd.in/gK6uAEEJ 💡 Problem Summary : For each user, we need to find: ✔ Their join date ✔ Number of orders they made as a buyer in 2019 Important: Include users with 0 orders Count only orders from 2019 21 days of SQL practice done ✅ Consistency is building real confidence now 💪 Let’s grow one query at a time 🚀 #LeetCode #SQL #DataEngineering #Analytics #Database #WindowFunctions #DailyPractice #LearningInPublic #50DaysChallenge
To view or add a comment, sign in
-
-
🚀 Day 25/50 of My #LeetCode SQL Challenge Today I solved “Product Sales Analysis III” 💡 This problem was about identifying the first year each product was sold and analyzing the corresponding sales data. 🔍 Key Learnings: How to identify the earliest occurrence of data within groups Strengthening concepts around data grouping and filtering Understanding how to extract meaningful insights from historical records 📊 Real-world relevance: This type of analysis is useful for: Tracking product launch performance Analyzing early sales trends Making data-driven business decisions ✨ Takeaway: Finding the first occurrence in data is a powerful technique that appears frequently in analytics and interviews. Consistency matters — one problem a day keeps improvement on track 💪 #Day25 #LeetCode #SQL #DataAnalytics #LearningInPublic #100DaysOfCode
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