You are on page 1of 1

Guys be ready with SQL codes on different topics.

You have to learn 5 major tasks which is given


below.

1. Create a database POA. Add one table in it. Now add 6 different variables which
should have different data type. One variable should be of string with 15 size and one
variable should have only binary values. Show the different way to add data in the
above table.
2. Insert table EmpFname and EmployeeInfo into SQL. Change the datatype accordingly
for writing quarries.
3. Code the SQL queries based on the given scenarios for EmployeeInfo and EmpFname
Table
a. Write a query to fetch the EmpFname from the EmployeeInfo table in upper
case and use the ALIAS name as EmpName.
b. Write a query to fetch the number of employees working in the department
‘HR’.
c. Write a query to find the names of employees that begin with ‘S’
d. Write a query to find the names of employees that end with ‘S’
e. Write a query to find the surnames of employees that begin with ‘S’
4. Code the SQL queries based on the given scenarios for EmployeeInfo and EmpFname
Table
a. Write q query to find all the employees whose salary is between 50000 to
100000.
b. Write a query find number of employees whose DOB is between 02/05/1970
to 31/12/1975 and are grouped according to gender
c. Write a query to fetch all the records from the EmployeeInfo table ordered by
EmpLname in descending order and Department in the ascending order.
d. Write a query to fetch details of employees whose EmpLname ends with an
alphabet ‘A’ and contains five alphabets.
e. Write a query to fetch details of all employees excluding the employees with
first names, “Sanjay” and “Sonia” from the EmployeeInfo table.
5. Code the SQL queries based on the given scenarios for EmployeeInfo and EmpFname
Table
a. Write a query to fetch all employees who also hold the managerial position.
b. Write a query to fetch the department-wise count of employees sorted by
department’s count in ascending order.
6. You should have proper information about Data Modelling and E-R Diagram.

You might also like