RUDRA IP Practical File XII
RUDRA IP Practical File XII
SQL Queries
21. With reference to the following relations (tables)
EMPLOYEE and JOB complete all the queries in your
practical file, Create following tables EMPLOYEE and JOB
Empno and Sno are not null and unique, name is never
blank, Area and Native place is valid, hobby, dept is not
empty.
TABLE: EMPLOYEE
TABLE : JOB
RUDRA
XII-F
RUDRA
XII-F
1. Show empno, name and salary of those who have Sports as
hobby.
OUTPUT :
RUDRA
XII-F
4. Show youngest employees from each Native place.
OUTPUT :
RUDRA
XII-F
7. Show the appointment date and native place of those whose
name starts with ‘A’ or ends in ‘d’.
OUTPUT :
11. Show how many employee shall retire today if maximum length
of service is 20 years.
OUTPUT :
12. Show those employee name and date of birth who have served
more than 17 years as on date.
OUTPUT :
RUDRA
XII-F
13. Show names of those who earn more than all of the employees
of Sales dept.
OUTPUT :
14. Show names of those who earn more than at least one of the
employees of Marketing dept.
OUTPUT :
RUDRA
XII-F
15. Increase salary of the employees by 5 % of their present salary
with hobby as Music or they have completed atleast 3 years of
service.
OUTPUT :
RUDRA
XII-F
17. Count the number of employees in each department.
OUTPUT :
RUDRA
XII-F
21. Add a new tuple(row) in the table essentially with hobby as
Music.
OUTPUT :
23. Create a table with values of columns empno, name, and hobby.
OUTPUT :
RUDRA
XII-F
24. Erase the records of employee from job table whose hobby is
not Sports.
OUTPUT :
RUDRA
XII-F