0% found this document useful (0 votes)
5 views5 pages

Assignment

Uploaded by

DEE SAR DSN
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)
5 views5 pages

Assignment

Uploaded by

DEE SAR DSN
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

Assignment

Assignment 1
Use already created tables: department and employee table.
1. Find the maximum salary of employees.
2. Find the minimum salary of employees.
3. Count all employee whose registration date is greater than or equal '2013-02-
12'.
4. List the different address names in the employee table.
5. Sum the values in the salary column for all employees.
6. Find the highest salary of employee in each city.
7. Find the average salary of department 4.
8. Calculate the current minimum, maximum and average values of the salary in
each department.
9. Find the date of birth of the oldest employee in each department.
10. Find how many employees have the same salary.
11. How many employees have been on the same department?
12. List those employees, whose name contains the letters 'hy', anywhere in their
name. Sort the report by name.
13. For all employees, display their name and address together with their
department. Sort the report by employee name.
Assignment 2
Use already created tables: salespeople, customers and orders table.
1. Write a query that counts all orders served by salesperson 1001 and ordering
amount is greater than 1500.
2. Write a query that counts the number of Customers who stay in London.
3. Write a query that selects order which makes smallest ordering amount.
4. Write a query that selects customers whose name begins with G and displays
the result in alphabetical order based on customer name.
5. Write a query that selects the highest ordering amount on each day.
6. Write a query on the Orders table that will find the highest ordering amount for
each customer.
7. Write a query that lists customers in descending order of rating. Output the
rating field first, followed by the customer’s name and number.
8. Write a query that calculates total ordering amount for each day and displays
the results in descending order.

You might also like