SQL Challenge: Matching 'C' in Skills Column

🚀 Day 14 – SQL Challenge “Find students who know C”… Simple? Not when your data looks like this: 👉 C, Python, C++ Now the real question: How do you match only ‘C’ and ignore C++ / C#? I explored multiple approaches 👇 🔹 1. LIKE-based logic (pattern matching) Works, but gets messy with multiple conditions. 🔹 2. Split-based approach using SUBSTRING_INDEX Simulates splitting and gives more control: 🔹 3. FIND_IN_SET (simple & effective) Sometimes the simplest solution wins: WHERE FIND_IN_SET('C', skills) 🔥 Key Insight: There’s no single “best” solution in SQL. It’s about choosing between readability, scalability, and simplicity based on the situation. Which approach would you pick? 👇 Thanks for the suggestion, Ratan Kumar jha! 🙌 Tried a split-based approach as well using SUBSTRING_INDEX to simulate splitting in MySQL. Really helped make the logic cleaner and more structured. #SQL #DataAnalytics #SQLChallenge #ProblemSolving #LearningInPublic

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories