0% found this document useful (0 votes)
2 views1 page

Chapter4 Worksheet AggregateFunctions 3

This document is a worksheet for Grade XII students at The Emirates National School, focusing on MySQL database queries related to aggregate functions and the 'GROUP BY' clause. It includes a sample database table for teachers and lists various SQL commands to extract specific information such as teacher categories, gender, hiring dates, salary statistics, and department counts. The exercises aim to enhance students' understanding of database querying techniques using MySQL.
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 views1 page

Chapter4 Worksheet AggregateFunctions 3

This document is a worksheet for Grade XII students at The Emirates National School, focusing on MySQL database queries related to aggregate functions and the 'GROUP BY' clause. It includes a sample database table for teachers and lists various SQL commands to extract specific information such as teacher categories, gender, hiring dates, salary statistics, and department counts. The exercises aim to enhance students' understanding of database querying techniques using MySQL.
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
You are on page 1/ 1

THE EMIRATES NATIONAL SCHOOL – SHARJAH

INFORMATICS PRACTICES
Grade XII (2025 – ‘26)
CHAPTER 4 – Database Query Using MySQL
Worksheet - 3
Topic – Aggregate Functions / Group By
Consider the database SCHOOL with the following table TEACHER

ID NAME DEPARTMENT HIREDATE CATEGORY GENDER SALARY


1 Tanya Nanda Social Studies 1994-03-17 TGT F 25000
2 Saurabh Sharma Art 1990-02-12 PRT M 20000
3 Nandita Arora English 1980-05-16 PGT F 30000
4 James Jacob English 1989-10-16 TGT M 25000
5 Jaspreet Kaur Hindi 1990-08-01 PRT F 22000
6 Disha Sehgal Math 1980-03-17 PRT F 21000
7 Sonali Mukherjee Math 1980-11-17 TGT F 24500

Write SQL commands for the following:

1. To display all information about the teachers of PGT category.


2. To list the female teachers of Hindi department.
3. To list the name, department and date of hiring of all teachers in the ascending order of
date of joining.
4. To count the number of PGT teachers in English department.
5. To display the department and hire date of all female teachers whose salary is more than
25000
6. To count the different departments in the above table.
7. To find the maximum and minimum salary of a teacher.
8. To find the average salary of a teacher in Math department.
9. To find the total salary of all male teachers.
10. To count the number of male and female teachers.
11. To find the maximum and minimum salary of each department.
12. To calculate the number of teachers in each department.
13. To find the total salary of teachers category wise.
14. To find the total number of teachers.
15. To display the departments having more than two teachers.

You might also like