SQL Analysis Project: Identifying Outliers and Department Statistics

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 22

  • @simonoganga9535
    @simonoganga9535 Рік тому +1

    Wow, this is an amazing tutorial packed with a lot of content to boost SQL learning. Thank you so much for this.

  • @JW-pu1uk
    @JW-pu1uk Рік тому

    Coming back to this to let you know what a phenomenal tutorial this is!

    • @absentdata
      @absentdata  Рік тому

      Awesome. I am glad that you are enjoying it. I enjoyed making it!!

  • @diamondsandlipgloss
    @diamondsandlipgloss 6 місяців тому +1

    I'm unable to import the excel file. my errror message says I do not have a configuration string or file set up.
    I googled the error msgs and apparently the Salary column cannot have "dbNull".
    Is this working in 2024 for everyone else?

  • @theresaparker3384
    @theresaparker3384 Рік тому

    I really liked this video. I thought you explained difficult concepts i. An easy to understand format and in a brief manner. Kudos!
    I loved seeing the statistics in SQL! I havent noticed many content creators covering statistics using SQL like you did. Would love to see more projects like this!!

    • @absentdata
      @absentdata  Рік тому +2

      I love the feedback. I would love to provide more of these types of videos. Its important to understand not only the techniques but also analysis. Please share them with anyone you think it will help

    • @theresaparker3384
      @theresaparker3384 Рік тому

      @Absent Data I agree! I would be intrigued to see an expanded video that also includes a data visualization piece. I am curious how you would visually present this to an audience (like a box/whisker plot) that is not technical like executive leadership. Just a thought!

  • @ericaleverson9430
    @ericaleverson9430 Рік тому

    Thanks for sharing. I will use this as a project at work.

  • @Adeyeye_seyison
    @Adeyeye_seyison Рік тому

    Thanks a million sir,
    For the value adding contents...

  • @prometheusterraforming4661
    @prometheusterraforming4661 2 місяці тому

    Can you provide the entire query code?
    Thank you
    Loved all your tutorials

  • @zanderrita2526
    @zanderrita2526 Рік тому

    Wow thank you for sharing sir

  • @emmanuelaolaiya
    @emmanuelaolaiya Місяць тому

    Thanks so much

  • @nahavasa
    @nahavasa Рік тому

    Thanks very much sir. I'll definitely do this project later. Can I use this project to my portfolios?

  • @carolinecarr56
    @carolinecarr56 Рік тому

    Can we also get the database to we can follow along??

    • @absentdata
      @absentdata  Рік тому +1

      Added the dataset to the description.

  • @tboykelvin1865
    @tboykelvin1865 Рік тому

    Thank uuu

  • @simonoganga9535
    @simonoganga9535 Рік тому

    How can someone reach you Sir(email, linkedin, etc)? Your teaching is AMAZING

    • @absentdata
      @absentdata  Рік тому

      You can reach me on Linkedin. My contact is in the profile.

  • @camomile4085
    @camomile4085 6 місяців тому

    WITH cte1 AS (
    SELECT *,
    AVG(salary) OVER (PARTITION BY department) AS salary_avg,
    STDDEV_SAMP(salary) OVER (PARTITION BY department) AS std_dev
    FROM employee_salaries
    WHERE Salary >= 10000
    ),
    cte2 AS (
    SELECT *, (salary - salary_avg)/std_dev AS z_scores
    FROM cte1
    ),
    cte3 AS (
    SELECT cte2.department, cte2.salary_avg, cte2.std_dev,
    ROUND(cte2.std_dev/cte2.salary_avg*100,2) AS Coefficient_of_variation,
    SUM(CASE WHEN ABS(z_scores) > 1.96 THEN 1 ELSE 0 END) AS Ouliers_count
    FROM cte2
    GROUP BY cte2.department, cte2.salary_avg, cte2.std_dev
    )
    SELECT * FROM cte3
    ORDER BY Coefficient_of_variation DESC
    ;

  • @tboykelvin1865
    @tboykelvin1865 Рік тому

    Thank uuu