Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

1.

Write a SQL Query to find out the first Sunday after the date of joining of each
employee from Employees Table.

2.
Write a SQL Query to get a list of Employees who have joined on the First Monday of
any month.

3.Write a SQL Query to get a list of Employees who belong to Chicago.

4.Write a SQL Query to get the count of Employees who are employed in the
same department as the employee Smith.

5.
Display the details of those Employees for whom Departments are Assigned.
Use EXISTS Operator

6.
Display the details of those Departments for which Employees have been assigned and
employees have not been assigned.
Display the text as 'Not Assigned' for unassigned departments.

7.
Write an SQL Query to get the employee details
and department wise total salary from EMP Table.

8.
Create a Table to capture Student Details.
student_id NUMBER,
student_name VARCHAR2(150)
Assign STUDENT_ID with PRIMARY KEY and name that constraint.

9.
Create a Table to capture Student Mark Details.
marks_id NUMBER,
student_id,
subject VARCHAR2(50),
marks NUMBER(3)
Assign STUDENT_ID with Foreign Key to Students Table STUDENT_ID and name that
constraint.Apply the rule to Marks Column in such a way that it should not accept
value of 0.

10.
Create a Table to capture Friend Details.
fr_code NUMBER
fr_name VARCHAR2(50)
date_of_birth DATE
gender CHAR(1)
Apply the rule to Gender Column in such a way that it should not accept any value
other than M/F.

11.
Create a Table called emp_history based on the existing employee table,picking up
data for all the employees belonging to DALLAS Location.

You might also like