I managed to squeeze some time earlier today during my lunch break to tackle today's coding challenge.
Today's challenge was an interesting one and definitely something that made me scratch my head. I am enjoying the process of dissecting a problem and learning to accept that I will make several mistakes before I find the solution. I think of myself as a creative person and there is no better outlet for my creativity than trying to find solutions to a problem.
This quote stuck with me as I was working through the coding challenge today: "The greatest glory in living lies not in never falling, but in rising every time we fall." ~Nelson Mandela
Today's #leetcode problem (https://bit.ly/3lFYvWh) : Write a SQL query to find employees who have the highest salary in each of the departments. For the above tables, your SQL query should return the following rows (order of rows does not matter).
+------------+----------+--------+
| Department | Employee | Salary |
+------------+----------+--------+
| IT | Max | 90000 |
| IT | Jim | 90000 |
| Sales | Henry | 80000 |
+------------+----------+--------+
![](https://static.wixstatic.com/media/2d9ab2_e485bdc56c324866881c514ea2261bad~mv2.jpeg/v1/fill/w_600,h_328,al_c,q_80,enc_auto/2d9ab2_e485bdc56c324866881c514ea2261bad~mv2.jpeg)
Comments