Beruflich Dokumente
Kultur Dokumente
--Query to find the Second Maximun Salary from the Employee table
--Query to find the Third Maximun Salary from the Employee table
select EmployeeID,EmployeeName,Department,Salary
from
( select EmployeeID,EmployeeName,Department,max(Salary) over (partition
by Department) max_sal_dept,Salary from Employee) as part_depid
where salary=max_sal_dept
--Deposit the sum of the deposits of Sunil and Vijay in the account of
Anil
Update Deposit
Set Amount=(Select Sum(Amount) From Deposit Where CustomerName in
('Sunil','Vijay'))
Where CustomerName='Anil'
Update Deposit
Set Amount= Amount-1000 where CustomerName='Anil'
Update Deposit
Set Amount=Amount + 1000 where CustomerName='Sunil'
Update Deposit
Set Amount=Amount*1.1