Thursday, July 2, 2026

Emp-Attrition-Analysis - Day 3

Got humbled today in the nicest and the busiest way. I thought writing SQL would be the difficult part of this project. Turns out, SQL is probably the easiest part. Most of my time wasn't spent typing queries- it was spent questioning them. I'd group values into ranges, run a query, get a result, then immediately wonder, "Wait...does this grouping even make sense?" 

One example was YearsAtCompany. At first, I grouped employees into broad buckets like 0–10 years, 11–20 years, and so on. The results suggested that employees in the 0–10 year bracket had high attrition. It looked like a reasonable conclusion. But something felt off. Ten years is a huge range. Someone who joined last month and someone who has spent nine years at the company shouldn't really be treated the same way. So I broke the bucket into smaller parts. That's when I realized the story was completely different. Most of the attrition wasn't spread across the entire 0–10 year range. It was concentrated in the first few years (0-4 years). That tiny change in grouping completely changed my interpretation. 

The same thing happened while analyzing YearsInCurrentRole and YearsSinceLastPromotion. I kept creating buckets, merging them, splitting them again, and checking whether the sample sizes were large enough before trusting the percentages. 

One funny moment today was finding a group with 0% attrition. For a second, it looked like I had discovered something interesting. Then I checked the sample size. There were only 8 employees in that entire group. Lesson learned: percentages without context can be misleading. 

I also realized something important today. Earlier, I'd write a query, get a result, and immediately write an insight. Now my workflow looks more like this:

  • Ask a business question.
  • Write the SQL.
  • Look at the output.
  • Question the output.
  • Verify it with another query.
  • Check whether the sample size is large enough.
  • Only then write the conclusion.

It takes much longer than I expected, I thought 1 day I'll spend doing the EDA and data cleaning, another one writing the sql queries and then will finish off by creating dashboard on day 3, haha, clown emojis loading. I spent hours today and, honestly, didn't write that much SQL. But I think I learned something more valuable than SQL syntax. I'm slowly learning how to think like an analyst instead of someone who just knows SQL.

Doc of Day 4-5

No comments:

Post a Comment

Day 4-5 of hr-analytics-project

Last night I finally finished designing dashboard of this hr analytics project.  It had four pages. At that time I genuinely thought it look...