0% found this document useful (0 votes)
2 views2 pages

SQL Assignment

The document outlines an SQL assignment involving an Employee Table with various attributes such as EmpID, FirstName, LastName, Department, Salary, and HireDate. It includes a series of queries to be executed on the table, such as displaying all employee data, filtering by department, salary ranges, and counting employees in each department. The assignment aims to practice SQL skills by solving ten specific problems related to the employee data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

SQL Assignment

The document outlines an SQL assignment involving an Employee Table with various attributes such as EmpID, FirstName, LastName, Department, Salary, and HireDate. It includes a series of queries to be executed on the table, such as displaying all employee data, filtering by department, salary ranges, and counting employees in each department. The assignment aims to practice SQL skills by solving ten specific problems related to the employee data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL (Assignment)

ranishaw5002@[Link]
Employee Table
EmpID FirstName LastName Department Salary HireDate

101 Alice Johnson IT 6500 2020-03-15

102 Mark Rivera HR 4800 2019-07-22

103 Sophia Lee Finance 7200 2021-01-10

104 Daniel Kim IT 5800 2018-11-05

105 Emma Brown Marketing 5300 2022-04-18

106 Liam Patel Finance 6900 2020-09-29

107 Olivia Garcia HR 4600 2017-06-30

108 Noah Thompson IT 7500 2023-02-12

109 Ava Martinez Marketing 5100 2019-12-02

110 Ethan Davis Finance 8000 2016-05-14

Create the above Table in MySQL and solve the following problems based on it.

Assignment Problems
Q1. Write a query to display every employee and all their data.

Q2. List only the FirstName, LastName, and Salary of every employee.

Q3. Show all employees who work in the 'IT' department.

Q4. Retrieve employees with a salary greater than 6000.

Q5. List all employees ordered by HireDate from newest to oldest.

Q6. Show a list of all unique departments present in the table.

Q7. Find employees whose first name starts with ‘A’.

Q8. Show employees whose salaries are between 4000 and 7000.

Q9. Find the average salary of all employees.

SQL (Assignment) 1
Q10. List each department along with the number of employees, but only include departments
with more than 3 employees.

ranishaw5002@[Link]

SQL (Assignment) 2

You might also like