I really like your way of explaining things and giving us the real-life example on how to properly use them. Thank you for putting so much effort making this kind of content. Hope you make more, I wanna learn a lot from you!
I use something like a CASE Statement in Excel's Power Query A LOT. Very powerful. Same idea as a CASE statement in MySQL (and probably MSSQLSVR, PostreSQL, etc.) Another "Thumbs Up" lesson in my opinion. Glad to have this treasure trove of knowledge to fall back on if I get stuck going down a MySQL rabbit hole (Read in your best "Elmer Fudd" voice - Got to love those rascally rabbits...😁)
Your tutorials and way of explaining is really really good, this stuff is really interesting and I am really enjoying studying because of you, thank you soo much!!
Hello Alex, your positive impact on lives is evident, and I've been following your journey. Your work is commendable. I'm eager to collaborate with you to make a difference in the lives of struggling youth who are losing hope due to unemployment, turning to substances. Together, we can bring positive change."
Alex can you please provide a discount code for your website? Can you also suggest/recommend what course should I begin with. Please respond 😇 I don’t mean to spam your comment section. Just hoping to grab your attention.
I was wondering the same thing. My assumption would be it's a 7% increase with a 10% bonus. However, in the real world I think Alex is just going over the stakeholder's condition(Which is what the bonus is for a finance dept).
I understood where you are coming from and thought the same, however could be like the below poster mentioned. That the finance dept does not get a pay increase and solely bonuses?
It blows my mind how fantastic, useful and entertaining this series has been. Your delivery is absolutely on point. Thank you for putting out all this invaluable content!
Hello Alex, I have about 15 years of software engineering experience in java ecosystem. Been a hard-core programmer throughout my career. Lately been thinking of adding any worthy skill set to boost my career. Do you think something like a data analyst would be apt for me?
My solution for the exercise: SELECT ed.first_name, ed.last_name, pd.department_name, es.salary, CASE WHEN es.salary < 50000 THEN (es.salary * 1.05) WHEN es.salary > 50000 THEN (es.salary * 1.07) END as new_salary, CASE WHEN pd.department_name like 'finance' THEN (es.salary * .1) ELSE 0 END as bonus FROM employee_demographics ed left join employee_salary es on ed.employee_id = es.employee_id left join parks_departments pd on es.dept_id = pd.department_id ORDER BY new_salary DESC; And one more, a little more complex, to continue learning new concepts: SET @LowSalaryIncrease = 1.05; SET @HighSalaryIncrease = 1.07; SET @SalaryThreshold = 50000; SET @FinanceBonusRate = 0.1; SELECT ed.first_name, ed.last_name, pd.department_name, es.salary, CASE WHEN es.salary < @SalaryThreshold THEN (es.salary * @LowSalaryIncrease) WHEN es.salary >= @SalaryThreshold THEN (es.salary * @HighSalaryIncrease) END as new_salary, CASE WHEN pd.department_name = 'finance' THEN (es.salary * @FinanceBonusRate) ELSE 0 END as bonus FROM employee_demographics ed LEFT JOIN employee_salary es ON ed.employee_id = es.employee_id LEFT JOIN parks_departments pd ON es.dept_id = pd.department_id ORDER BY new_salary DESC;
Thank you. if wanna get rid of NULLs and decimals, look at this as well: SELECT ed.first_name, ed.last_name, pd.department_name, es.salary, CASE WHEN es.salary < 50000 THEN ROUND(es.salary * 1.05) WHEN es.salary > 50000 THEN ROUND(es.salary * 1.07) ELSE es.salary END AS new_salary, CASE WHEN pd.department_name like 'finance' THEN ROUND(es.salary * .1) ELSE 0 END AS bonus FROM employee_demographics ed INNER JOIN employee_salary es on ed.employee_id = es.employee_id INNER JOIN parks_departments pd on es.dept_id = pd.department_id ORDER BY new_salary DESC;
I think it's because each dept_id is unique to each department and can also be found in the parks_department table as department_id, and we know from the said table that 6 is unique to the finance department.
Hello can you do a video into how to download a csv file faster into mysql. I was able to prep the csv file and create table and the datatypes for it but i ran into the problem of error code 1265
Hi Alex, this is so interesting and pretty fascinating. I would like to ask, which do you think is pretty simple not to get confused with when writing the "New_Salary" equation? Is it writing the full equation as "Salary + (Salary * 0.05) for 5% increase or writing it as "Salary * 1.05"
2nd one of course but since this is a tutorial and expect that not all viewers are good at numbers it is good to use the first one to make beginners easily catch up
Hi Alex, thank you for these videos. How can i use the case statement as an input data? example: Case end as Salary_increase, salary + salary_increase as New_salary SQL is not recognizing salary_increase as a new column that i can use.
Hey Alex, your MySQL lessons are fantastic! Could you please upload them a bit faster? I have an upcoming interview and I'd love to practice more before then. Thanks so much!
I post only one video per week because otherwise I would post way too much and have to constantly be creating more videos. I do have a full MySQL course and a platform to practice MySQL on AnalystBuilder.com - hope that helps!
@@AlexTheAnalystCan you please provide a discount code? I would really appreciate it. Any suggestions/recommendations of what course to begin with (on your website) for a complete beginner. Thank You
MySQL is a highly popular and widely used database, especially for web applications, due to its large community, ease of use, and excellent integration with various programming languages and platforms. Firebird, on the other hand, is known for its performance, efficiency, and lightweight nature, making it suitable for smaller systems and applications requiring high concurrency and low resource usage. The choice between the two depends on the specific needs of the project, with MySQL being ideal for broader applications and web development, and Firebird excelling in environments needing efficient resource management and high user concurrency.
'On death's door' is WILD 💀💀😭😭
I had to stop cus I was laughing way too hard
Very insulting to label people like that especially on You Tube.
Poor Jerry man, he's not only old but doesn't get a raise as well. Feel bad for the bloke
I really like your way of explaining things and giving us the real-life example on how to properly use them. Thank you for putting so much effort making this kind of content. Hope you make more, I wanna learn a lot from you!
omg, i'm working on a project of my own with the exact same table title. this is great timing!
This was so helpful, thanks!
Jerry Gergich can never catch a break
He needs to retire
I use something like a CASE Statement in Excel's Power Query A LOT. Very powerful. Same idea as a CASE statement in MySQL (and probably MSSQLSVR, PostreSQL, etc.) Another "Thumbs Up" lesson in my opinion. Glad to have this treasure trove of knowledge to fall back on if I get stuck going down a MySQL rabbit hole (Read in your best "Elmer Fudd" voice - Got to love those rascally rabbits...😁)
Your tutorials and way of explaining is really really good, this stuff is really interesting and I am really enjoying studying because of you, thank you soo much!!
thank you your lessons have been really helpful. Just one thing, maybe mentioning ELSE would be nice here
Great vid, i would use the statement of finance id as first statement and then add the 2 consequtive when end
Hello Alex, your positive impact on lives is evident, and I've been following your journey. Your work is commendable. I'm eager to collaborate with you to make a difference in the lives of struggling youth who are losing hope due to unemployment, turning to substances. Together, we can bring positive change."
My man said “my parents gonna love me for this one” after the brutal KO, the on death’s door. 😭😂😂😂
Btw this series is amazing till now❤
Loved it!
Ron's age/birthday data isn't there 😂😂😂
The man is an enigma
Alex can you please provide a discount code for your website? Can you also suggest/recommend what course should I begin with. Please respond 😇
I don’t mean to spam your comment section. Just hoping to grab your attention.
In case of finance, Isn't it the salary should be as per 5 or 7 % as per the bracket and Bonus should be 10%? Bcoz bonus is one time only.
I was wondering the same thing. My assumption would be it's a 7% increase with a 10% bonus. However, in the real world I think Alex is just going over the stakeholder's condition(Which is what the bonus is for a finance dept).
I understood where you are coming from and thought the same, however could be like the below poster mentioned. That the finance dept does not get a pay increase and solely bonuses?
It blows my mind how fantastic, useful and entertaining this series has been. Your delivery is absolutely on point. Thank you for putting out all this invaluable content!
Hello Alex, I have about 15 years of software engineering experience in java ecosystem.
Been a hard-core programmer throughout my career.
Lately been thinking of adding any worthy skill set to boost my career.
Do you think something like a data analyst would be apt for me?
My solution for the exercise:
SELECT ed.first_name, ed.last_name, pd.department_name, es.salary,
CASE
WHEN es.salary < 50000 THEN (es.salary * 1.05)
WHEN es.salary > 50000 THEN (es.salary * 1.07)
END as new_salary,
CASE
WHEN pd.department_name like 'finance' THEN (es.salary * .1)
ELSE 0
END as bonus
FROM employee_demographics ed
left join employee_salary es on ed.employee_id = es.employee_id
left join parks_departments pd on es.dept_id = pd.department_id
ORDER BY new_salary DESC;
And one more, a little more complex, to continue learning new concepts:
SET @LowSalaryIncrease = 1.05;
SET @HighSalaryIncrease = 1.07;
SET @SalaryThreshold = 50000;
SET @FinanceBonusRate = 0.1;
SELECT
ed.first_name,
ed.last_name,
pd.department_name,
es.salary,
CASE
WHEN es.salary < @SalaryThreshold THEN (es.salary * @LowSalaryIncrease)
WHEN es.salary >= @SalaryThreshold THEN (es.salary * @HighSalaryIncrease)
END as new_salary,
CASE
WHEN pd.department_name = 'finance' THEN (es.salary * @FinanceBonusRate)
ELSE 0
END as bonus
FROM
employee_demographics ed
LEFT JOIN employee_salary es ON ed.employee_id = es.employee_id
LEFT JOIN parks_departments pd ON es.dept_id = pd.department_id
ORDER BY
new_salary DESC;
by the way...I fell into the range of 'On death's door' 🤣
Thank you. if wanna get rid of NULLs and decimals, look at this as well:
SELECT ed.first_name, ed.last_name, pd.department_name, es.salary,
CASE
WHEN es.salary < 50000 THEN ROUND(es.salary * 1.05)
WHEN es.salary > 50000 THEN ROUND(es.salary * 1.07)
ELSE es.salary
END AS new_salary,
CASE
WHEN pd.department_name like 'finance' THEN ROUND(es.salary * .1)
ELSE 0
END AS bonus
FROM employee_demographics ed
INNER JOIN employee_salary es on ed.employee_id = es.employee_id
INNER JOIN parks_departments pd on es.dept_id = pd.department_id
ORDER BY new_salary DESC;
quick question, you pulled the dept_id column from a different table without identifying the table how is that possible ?
I think it's because each dept_id is unique to each department and can also be found in the parks_department table as department_id, and we know from the said table that 6 is unique to the finance department.
quick question -- shouldn't it be bonus of new salary i.e 10% of 74900
thank you
Hello can you do a video into how to download a csv file faster into mysql. I was able to prep the csv file and create table and the datatypes for it but i ran into the problem of error code 1265
Hi Alex, this is so interesting and pretty fascinating.
I would like to ask, which do you think is pretty simple not to get confused with when writing the "New_Salary" equation? Is it writing the full equation as "Salary + (Salary * 0.05) for 5% increase or writing it as "Salary * 1.05"
The second solution
salary*1.05
because the first is longer and awful
except if you explain it to one who didn't know anything about math
2nd one of course but since this is a tutorial and expect that not all viewers are good at numbers it is good to use the first one to make beginners easily catch up
Wouldn't 3rd CASE statement be >50 since second one includes age 50 already?
may I know how to download these tables?
What do you think about rapidly increasing adoption of Databricks?
Having trouble with the maths and percentages lol
On death's door lol
This is similar to if Statement in Python.
31 - 50 is old :(
Poor 50,000 salary people no increase HAHAHA
unfair increase rate. especially for tom and jerry. plus the imbalance increase rate resulting larger salary gap. boohoo
on death's door
excuse me i'm still not understand with salary * 1.05 and salary * .10 why use 1? and in 10% for bonus is why use .10 and not 1.10?
WHEN age >= 50 'good night'
Between 31 and 50 old??
So, am 31, and you really dissappointed me :(
poor Tom and Jerry, earning 50k doesnt grant them an increase 😂😂
thank you thank you thank you
On death's door 💀
Hi Alex, thank you for these videos.
How can i use the case statement as an input data?
example:
Case end as Salary_increase,
salary + salary_increase as New_salary
SQL is not recognizing salary_increase as a new column that i can use.
What was your loss if you also uploaded numeric functions in this series?
I understand everything he studied us but can't practice because I don't have data
Man just cannot believe finance did an outstanding job
Hey Alex, your MySQL lessons are fantastic! Could you please upload them a bit faster? I have an upcoming interview and I'd love to practice more before then. Thanks so much!
I post only one video per week because otherwise I would post way too much and have to constantly be creating more videos. I do have a full MySQL course and a platform to practice MySQL on AnalystBuilder.com - hope that helps!
@@AlexTheAnalystCan you please provide a discount code? I would really appreciate it. Any suggestions/recommendations of what course to begin with (on your website) for a complete beginner.
Thank You
Question: What distinguishes MySQL from Firebird, and does it have strengths over other databases?
MySQL is a highly popular and widely used database, especially for web applications, due to its large community, ease of use, and excellent integration with various programming languages and platforms. Firebird, on the other hand, is known for its performance, efficiency, and lightweight nature, making it suitable for smaller systems and applications requiring high concurrency and low resource usage. The choice between the two depends on the specific needs of the project, with MySQL being ideal for broader applications and web development, and Firebird excelling in environments needing efficient resource management and high user concurrency.
Where can I find this dataset?