118. Databricks | PySpark| SQL Coding Interview: Employees Earning More than Managers

preview_player
Показать описание
Azure Databricks Learning: Coding Interview Exercise: Pyspark and Spark SQL

=================================================================================

Coding exercises are very common in most of the Bigdata interviews. It is important to develop coding skills before appearing for Spark/Databricks interviews.

In this video, I have explained a coding scenario to find the employees who are earning more than their managers. This is Leet Code SQL Exercise number 1783. This is also one of common coding exercise asked in MAANG/FAANG/GAMAM companies such as Google,Apple, Microsoft, Amazon, Meta etc.,

+----+-------+--------+-----------+
| Id | Name | Salary | ManagerId |
+----+-------+--------+-----------+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
| 4 | Max | 90000 | NULL |
+----+-------+--------+-----------+

Given the Employee table, write a SQL query to find employees who earn more than their managers. In the above table, Joe is the only employee who earns more than his manager.

Your query should return the following result:
+-------+
| Name |
+-------+
| Joe |
+-------+

To get more understanding, watch this video

#EmployeesEarningMoreThanManager, #LeetCodeEmployeeManager, #LeetCodeSQL-181, #LeetCodeSQL, #HackerRankSQL,#MAANG/FAANG/GAMAM,#FAANGCodingQuestion, #SQLCoding, #PysparkCoding, #CodingInterviewQuestion, #ApacheSparkInterview, #SparkCodingExercise, #DatabricksCodingInterview,#SparkWindowFunctions,#SparkDevelopment,#DatabricksDevelopment, #DatabricksPyspark,#PysparkTips, #DatabricksTutorial, #AzureDatabricks, #Databricks, #Databricksforbeginners,#datascientists, #datasciencecommunity,#bigdataengineers,#machinelearningengineers
Рекомендации по теме
Комментарии
Автор

Thanks Raja! you made pyspark learning very easy.

anupbhimineni
Автор

Please share more videos like this Raja, it's very Thanks for your time.

ranjansrivastava
Автор

Hi Raja,
I had one doubt. Can we get trigger runtimestate or status whether is started/stopped/disabled through rest API (web activity in ADF) or through python SDK library on databricks.

I was trying to get response of json but couldn't find runtimestate if u have any ideas pls let me know.

Thank you in advance.

hritiksharma
Автор

Nice explanation Raja, very informative 👍 👏 👌, can you please start Azure synapse analytics as well .

sravankumar
Автор

emp_df.alias("employee").join(emp_df.alias("manager"), col('employee.managerid')==col('manager.id'), "inner")\

aaravkumarsingh