Solved SQL problem on StrataScratch with substring index and aggregation

✅ Solved a SQL problem on StrataScratch — Day 53 of my SQL Journey 💪 Data isn’t always clean… Sometimes it comes packed inside a single column 📦 Today’s problem was about analysing business categories — But the twist? Multiple categories were stored in one field. The approach: • Split comma-separated categories into individual rows • Used SUBSTRING_INDEX() to extract each category • Generated sequence numbers to iterate through values • Aggregated total reviews per category • Sorted to identify the most reviewed categories What I practised: • String manipulation in SQL • Handling multi-value fields • Using LENGTH + REPLACE for dynamic splitting • Transforming unstructured data into an analysable format What stood out — Real-world data is rarely perfect. Sometimes the problem isn’t analysis… It’s preparing the data so analysis becomes possible. Once you break structure out of chaos, insights start to appear naturally. Consistent learning, one query at a time 🚀 #SQL #StrataScratch #DataAnalytics #LearningInPublic #SQLPractice

  • stratascratch_sql_problem

To view or add a comment, sign in

Explore content categories