Just earned the SQL 50 badge on LeetCode 🎯 Honestly, if you’re starting with SQL - this is all you need. These 50 problems cover almost every important concept, from basics to advanced queries. Big takeaway? 👉 Window Functions are a game changer. Once you get them, a lot of “complex” problems become straightforward. If you’re preparing for interviews or strengthening your backend/data skills, I highly recommend going through this set. 📌 Want MySQL notes covering everything from basic to advanced? Check out my repository: https://lnkd.in/g8CTyMKC Consistency > Everything. #SQL #LeetCode #DataStructures #CodingJourney #BackendDevelopment #Learning #Tech
SQL 50 Badge on LeetCode: Master Window Functions
More Relevant Posts
-
🚀 Building something for the SQL learners out there — I'm starting an SQL Series! Whether you're a complete beginner or someone looking to sharpen your database skills, this series is for YOU. SQL is one of the most in-demand skills in tech today — whether you're in data analytics, backend dev, or just getting started with databases, understanding SQL opens doors. 📚 Here's what we'll be covering: 🔹 SELECT Mastery 🔹 JOINs (INNER, LEFT, RIGHT & FULL) 🔹 GROUP BY & Aggregates 🔹 CASE WHEN 🔹 Subqueries 🔹 CTEs & Recursive Queries 🔹 Window Functions 🔹 String Functions 🔹 DateTime Functions 🔹 NULL Handling 🔹 Views & Materialized Views 🔹 Indexes & Performance 🔹 Constraints 🔹 Transactions & ACID 🔹 JSON in MySQL 🔹 JSON in PostgreSQL 🔹 PostgreSQL vs MySQL vs Aurora 🔔 Follow me. Let's learn together. 💡 Drop a 🙋 in the comments if you're joining the series! #SQL #SQLSeries #Database #DataAnalytics #DataEngineering #LearnSQL #TechCommunity #Programming
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
-
-
SQL Progress: Logic & CASE Statements! Today I solved another Medium challenge on LeetCode. This problem was a great lesson in how to calculate percentages and rates directly in SQL. What I learned today: 1. AVG with CASE WHEN: I learned that I can use AVG(CASE WHEN condition THEN 1.0 ELSE 0.0 END) to calculate a rate. It’s a very clear way. 2. Handling NULLs in Rates: By using a LEFT JOIN between the Signups and Confirmations tables, I ensured that users with no actions are still included, and the AVG function automatically treats them as 0 if they don't meet the "confirmed" criteria. 3. Precision with ROUND: Used ROUND(..., 2) to make sure the final confirmation rate is clean and meets the required format(0.00). I would love to learn from your experience: is ther another methods cleaner? قليل مستمر خير من كثير منقطع #SQL #DataEngineering #PostgreSQL #LeetCode #100DaysOfCode #DataAnalytics #ProblemSolving
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
-
📘 Ultimate SQL Cheat Sheet — My Complete SQL Revision Guide 🚀 After completing my MySQL learning journey, I created/found this powerful SQL Cheat Sheet that covers all essential SQL concepts in one place: ✅ Basic Queries ✅ Filtering & Conditions ✅ Joins (INNER, LEFT, RIGHT, FULL) ✅ Aggregate Functions ✅ GROUP BY & HAVING ✅ Subqueries ✅ Table Operations ✅ Data Manipulation (INSERT, UPDATE, DELETE) ✅ Constraints (Primary Key, Foreign Key, Unique, Not Null) ✅ Advanced SQL Concepts (Window Functions, CASE WHEN, Views) This cheat sheet is a quick revision companion for: 🔹 Students learning SQL 🔹 Developers preparing for interviews 🔹 Backend Engineers working with databases 🔹 Anyone mastering MySQL / SQL fundamentals SQL is the backbone of data-driven applications — mastering it opens doors to backend development, data analysis, and database engineering. 💡 Save this post for quick revision and future reference! #SQL #MySQL #DatabaseManagement #SQLCheatSheet #LearningSQL #BackendDevelopment #DataEngineering #Programming #TechLearning #SoftwareDevelopment #DeveloperJourney
To view or add a comment, sign in
-
-
🚀 SQL Learning Journey 🗓️Day 30 🌟 Topic:LeetCode Subqueries Mastery Today marks a special milestone as I dive deeper into advanced SQL concepts using subqueries through real LeetCode problems. These problems really tested my understanding of filtering, ranking, and aggregation logic! Problems Solved: 👉 Employees Whose Manager Left the Company (LeetCode 1978) Focused on identifying employees whose managers are no longer present using subqueries in WHERE clause 👉Department Top Three Salaries (LeetCode 185) Learned how to use ranking functions + subqueries to fetch top 3 salaries per department 👉 Friend Requests II - Who Has the Most Friends (LeetCode 602) Applied aggregation with subqueries to find the most connected user 👉Movie Rating (LeetCode 1341) Combined joins + subqueries + grouping to derive meaningful insights ✨Key Takeaways: →Subqueries can simplify complex filtering logic →Correlated subqueries help solve row-wise dependency problems →Ranking functions (DENSE RANK, RANK) are game-changers →Real-world SQL problems require combining multiple concepts ✨ Note: 30 days of consistency, learning, and growth in SQL! This journey is helping me think more analytically and solve problems efficiently. #SQL #LeetCode #40DaysOfCode #DataAnalytics #CodingJourney #Database #Learning
To view or add a comment, sign in
-
-
SQL Progress: self join, numeric, avg, group by! Today I solved a very interesting challenge on LeetCode: "Average Time of Process per Machine". It was a great exercise for using Joins and Math functions together. What I learned today: 1. Self-Join: I learned how to join the same table with itself (Activity a1, Activity a2). This is the best way to compare two different rows—like a "start" and an "end" timestamp—for the same process. 2. Aggregate Functions: I used AVG() to find the average time and ROUND(..., 3) to keep the results clean and precise as required. 3. PostgreSQL Specifics: I learned that using ::numeric is important for the ROUND function to work correctly in PostgreSQL. 4. Grouping: Used GROUP BY machine_id to make sure the calculation is done for each machine separately. I’ve attached my solution below. Question for the experts: Is there a way to solve this without using a Join? I’d love to hear your thoughts! قليل مستمر خير من كثير منقطع #SQL #DataEngineering #PostgreSQL #LeetCode #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
I just shipped something I'm really proud of. 🚀 Semicolon — an open-source SQL formatter that turns messy, unreadable queries into clean, structured code in seconds. You don’t need to decode a wall of SQL just to find where the JOIN stops and the WHERE starts. You don’t need to spend minutes formatting it perfectly. SemiColon handles it for you instantly. Just install it, point it at your SQL, and you’re done. → pip install semicolonfmt → semicolon query.sql (format a file) → semicolon . (format everything in a directory) What it does: ✅ Formats messy SQL into clean, consistent, scannable queries ✅ Works on single files or entire directories ✅ CI/CD check mode so unformatted SQL never slips into prod ✅ Pre-commit hook support ✅ Zero config. Just run it. It's open source, it's free, and it's just getting started. ⭐ If you like it, give it a star on GitHub 🔧 Test it, push it to the limits, and open a PR if you spot something off 🔗 https://lnkd.in/dmYG-t4c Clean SQL is not a nice-to-have. It's a craft. Let's treat it like one. 💪 #OpenSource #SQL #PostgreSQL #Python #DevTools #BuildingInPublic #CleanCode
To view or add a comment, sign in
-
🚀 Day 29 of My SQL Journey – Subqueries (Part 4) Today I explored how subqueries can be used based on their location in SQL queries 📊 Instead of just learning types, I focused on where exactly we can use subqueries: 🔹 Subquery in SELECT Used to display calculated values alongside each row 👉 Example: Showing each customer with overall average amount 🔹 Subquery in WHERE Used for filtering based on conditions 👉 Example: Finding customers with second highest salary or matching categories 🔹 Subquery in FROM (Derived Table) Used to create a temporary table for further querying 👉 Example: Calculating average sales per store and using it as a table 🔹 Subquery in HAVING Used to filter grouped results based on aggregate conditions 👉 Example: Finding stores with transaction count less than overall transactions 💡 Key Takeaway: Subqueries are powerful because they help break complex problems into smaller steps and allow placing logic exactly where it's needed. 📈 Slowly moving from basic queries to writing more optimized and structured SQL! #SQL #LearningJourney #Day29 #Subqueries #Database #Coding #Tech #StudentDeveloper
To view or add a comment, sign in
-
-
Ready to level up your database skills? 🚀 I'm hosting a Live Session on DBMS & SQL Server! This isn't just theory—we are diving deep into practical, real-world scenarios to help you master queries, optimize performance, and manage data like a pro. Whether you're a student, an aspiring developer, or looking to sharpen your backend skills, this session is designed for you. 🕒 What to Expect: Core DBMS Concepts: Understanding the "why" behind the data. SQL Server Deep Dive: Hands-on with T-SQL, Joins, and Indexing. Live Practical: Watch and learn as we build and query in real-time. Q&A: Get your specific database questions answered. 📢 Service Available Now! If you are interested in joining or want more details, please drop a DM or comment "SQL" below! #SQL #SQLServer #DBMS #DatabaseManagement #DataScience #Coding #Programming #TechEducation #WebDevelopment #DataAnalytics #MicrosoftSQLServer #BackendDeveloper #LearnToCode #DatabaseDesign #SoftwareEngineering #DataEngineering #SQLQuery #TechWorkshop #OnlineLearning #CareerGrowth #ITTraining #ComputerScience #TechCommunity #BigData #SkillsDevelopment #LiveSession #HandsOnLearning #DeveloperLife #TechTips #DatabaseAdmin
To view or add a comment, sign in
-
Explore related topics
- Essential SQL Concepts for Job Interviews
- SQL Interview Preparation Resources
- How to Use SQL Window Functions
- SQL Learning Resources and Tips
- Common Data Structure Questions
- Topics to Study for SQL Interviews
- SQL Learning Roadmap for Beginners
- SQL Learning and Reference Resources for Data Roles
- How to Use SQL QUALIFY to Simplify Queries
- Tips for Applying SQL Concepts
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
🎉🎉