SQL Query
SQL Query
SELECT d.DeptName from DEPARTMENT d where (select count(*) from FACULTY f where
d.DeptCode=f.DeptCode)>1;
SELECT d.DeptName from DEPARTMENT d where (select count(*) from FACULTY f where
d.DeptCode=f.DeptCode)>1;
select FacultyName,DeptCode from FACULTY where Salary > 8000.00 and Salary <
12000.00;
ASSIGNMENT - 2
ASSIGNMENT - 1
ASSIGNMENT - 5
select Name from STUDENT where Name like 'S%' union select FacultyName from
FACULTY where FacultyName like 'S%';
select FacultyName from FACULTY group by FacultyName having avg(Salary) > (select
avg(salary) from FACULTY);
select FacultyName from FACULTY group by FacultyName having avg(Salary) > (select
avg(Salary) from FACULTY where DeptCode = 'CSE');
select FacultyName from FACULTY where FacultyCode Not in(select HOD from
DEPARTMENT);
select SubjectName from SUBJECT where Department = 'CSE' and year = '3';
ASSIGNMENT - 6
//V_STD part:
//V_STD_2 part:
SET SQL_MODE = ''; insert into V_STD_2 values (5353, 'Kami', 2, 'CSE');
ASSIGNMENT - 7
//In Question 4 there's no attribute named Manager name in the given table(s). only
manager id// select manager_id from employees where emp_name = 'SCARLET';
select emp_name from employees where salary = (select Max(salary) from employees);