You are on page 1of 2

XI: Informatics Practices: Practical file assignment(SQL)

Q1. Consider the given table and answer the following questions

FACULTY

F_ID FNAME LNAME HIREDATE SALARY DEPT

102 MANOJ SHAMRMA 12-10-2012 12000 SENIOR


103 PARVEEN ARORA 15-12-2014 9000 SENIOR
104 SANJEEV SHARMA 01-01-2016 14000 MIDDLE
105 RASHMI MALHOTRA 02-04-2000 20000 SENIOR
106 NITIN GUPTA 12-12-2013 10000 MIDDLE

i)Display the details of faculty members teaching Boolean algebra

ii)Display the maximum and minimum salary offered to faculty

iii)Display the details of faculty whose salary is greater than 12000 in descending order
of their hiredate

iv) Display the faculty details whose salary is in the range 20000 to 30000

v) Display the average salary department wise

vi) WAQ to insert a new row in the faculty table

vii) WAQ to increase the salary of middle dept faculty by 10%

viii)Delete the rows of faculty hired after 12-Dec-2001

ix) Display the number of faculty members in senior department


x) Display details of faculty members whose name begin with R

Q2 Consider the given table and answer the following questions

COURSES

C_ID F_ID CNAME FEES


C21 102 BOOLEAN 14000
ALGEBRA
C22 106 NETWORKS 20000
C23 104 C++ 18000
C24 106 AI 25000
C25 102 COMPUTER 40000
TECH
i)Display the number of different courses offered.

ii)Display the details of courses taught by PARVEEN

iii) What will be the degree and cardinality of Faculty X courses

iv) WAQ to create the table courses

v) Display details of AI, networks and C++ course

Give the output of the following

i) Select count(*) from courses;


ii) Select distinct department from faculty;
iii) Select sum(sal) from faculty where hiredate>’2012-01-01’;
iv) Select faculty.* from faculty ,courses where faculty.F_ID and
couses.F_ID;

You might also like