Last answered:

05 Jun 2023

Posted on:

01 Jun 2023

0

Problem 4: AVG(s.salary) vs s.salary

Dear 365datascience team,

I wondoer why to use "s.salary" instead of "AVG(s.salary)" to compare with those two parameters in this video?

I would need your help for some explaination.

Thank you!

1 answers ( 0 marked as helpful)
Instructor
Posted on:

05 Jun 2023

1

Hi Chun!
Thanks for reaching out.


It is because the task is to obtain the average male and female salary per department within a certain salary range. This is why we use s.salary in the WHERE clause and check if it is between the range of the two arguments of the stored procedure.


Hope this helps.
Best,
Tsvetelin

Submit an answer