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

SQL Assignment

The document outlines an SQL assignment involving an Employee Table with various employee details. It includes a series of queries to be executed, such as displaying all employee data, filtering by department, salary, and hire date, as well as calculating averages and counts. The assignment requires creating the table in MySQL and solving specific problems based on the data provided.

Uploaded by

dhalid423
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)
4 views2 pages

SQL Assignment

The document outlines an SQL assignment involving an Employee Table with various employee details. It includes a series of queries to be executed, such as displaying all employee data, filtering by department, salary, and hire date, as well as calculating averages and counts. The assignment requires creating the table in MySQL and solving specific problems based on the data provided.

Uploaded by

dhalid423
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)

dhalid423@[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.

dhalid423@[Link]

SQL (Assignment) 2

You might also like