DB Practice
DB Practice
Em
EmpName Department ContactNo EmailId EmpHeadId
pid
123456789
101 Isha E-101 [email protected] 105
0
123456789
102 Priya E-104 [email protected] 103
0
123456789
103 Neha E-101 [email protected] 101
0
123456789
104 Rahul E-102 [email protected] 105
0
123456789
105 Abhishek E-101 [email protected] 102
0
Table : EmpDept
DeptId DeptName Dept_off DeptHead
E-101 HR Monday 105
E-102 Development Tuesday 101
E-103 Hous Keeping Saturday 103
E-104 Sales Sunday 104
E-105 Purchage Tuesday 104
Table :- EmpSalary
EmpId Salary IsPermanent
101 2000 Yes
102 10000 Yes
103 5000 No
104 1900 Yes
105 2300 Yes
Table :- Project
PId Duration
p-1 23
p-2 15
p-3 45
p-4 2
p-5 30
Table : Country
cid cname
c-1 India
c-2 USA
c-3 China
c-4 Pakistan
c-5 Russia
Table : ClientTable
Table : EmpProject
Queries:
1. Select the detail of the employee whose name start with P.
2. How many permanent candidates take salary more than
5000.
3. Select the detail of employee whose emailId is in gmail.
4. Select the details of the employee who work either for
department E-104 or E-102.
5. Select the details of the employee who work either for
department E-104 or E-102.
6. What is total salary that is paid to permanent employees?
7. How many project started in year 2010.
8. How many project started in year 2010.