Today, i found this gem video. Awesome explanation of each questions. Please keep on making the videos. Btw I am also from Bihar and worked in ZS Associates for around 2 yrs 😊
Q3. Ans SELECT emp.* FROM ( SELECT d.dept_id, AVG(e2.salary) as averageSalary FROM Employee e2 JOIN Department d ON e2.dept_id = d.dept_id Group BY d.dept_id ) As dataTable JOIN Employee emp ON dataTable.dept_id = emp.dept_id WHERE emp.salary > dataTable.averageSalary
query = spark.sql('''with cte as(select Employee.EmpId,EmpName,Salary,ManagerId,EmployeeDept.DeptId from employee inner join EmployeeDept on Employee.EmpId = EmployeeDept.EmpId), result1 as(select empid,empname,salary,avg(salary) over(partition by DeptId) as avg_salary,deptId from cte) select * from result1 where salary > avg_salary''') query.show()
ek number bhai please dont stop making video one day u will be shining.
thankyou so much manish bhai for the playlist. we are preparing for the interview by watching your videos. keep up the good work.
Today, i found this gem video. Awesome explanation of each questions. Please keep on making the videos. Btw I am also from Bihar and worked in ZS Associates for around 2 yrs 😊
Such a honest man!
I ❤ your spirit sir!
In Q3, we can use AVG() window funtion directly and can save steps
yes exactly
If you can put the script for creating tables for the SQL questions. That will be great.
Dsa ka question nahi puchha tha?
bhai interview me spar.sql kaha pe execute karke dikhaya
Execute nhi karna tha. Bas notepad me dikha dena
Directly connect with me on:- topmate.io/manish_kumar25
why you did not use group by in highest designation salary ques. no 5?
There are multiple ways to solve the same question. I used one of those. Aap koi aur v tarike se solve kar sakte hai
Hi, thanks for sharing your experience! This interview was for which level in amazon?
3 yoe
Thanks
Spark sql me broadcast laga sakte hai?
Haan
Hi Manish informative video, How much was Amazon offering.
Just one round of interview happened. We didn't had any discussion related to salary.
Select hua bahi ??
Joined _df not understand
Kya nahi samjha
@@manish_kumar_1 pura query likh ke dete to easy hota
Some queries are wrong bro..please check example country query
Ok let me check
why sound is not good ?
Haan sound Kam hai. Aap headphones use kijiye
Aap ragni ke bhi h na
Haan
Q3. Ans
SELECT emp.*
FROM
(
SELECT d.dept_id, AVG(e2.salary) as averageSalary
FROM Employee e2 JOIN Department d ON e2.dept_id = d.dept_id
Group BY d.dept_id
) As dataTable JOIN Employee emp ON dataTable.dept_id = emp.dept_id
WHERE
emp.salary > dataTable.averageSalary
query = spark.sql('''with cte as(select Employee.EmpId,EmpName,Salary,ManagerId,EmployeeDept.DeptId from employee inner join
EmployeeDept on Employee.EmpId = EmployeeDept.EmpId),
result1 as(select empid,empname,salary,avg(salary) over(partition by DeptId) as avg_salary,deptId
from cte)
select * from result1
where salary > avg_salary''')
query.show()