(i) To show all information about the teacher of the History department, the WHERE clause followed by the condition ie., DEPARTMENT=’History’ should be used in the query.
QUERY: SELECT * FROM TEACHER WHERE DEPARTMENT='History';
(ii) To list the names of female teachers who are in the Mathematics department, the WHERE clause followed by the condition ie., GENDER=’F’ AND DEPARTMENT=’Mathematics’ should be used in the query.
QUERY: SELECT NAME FROM TEACHER WHERE GENDER='F' AND DEPARTMENT='Mathematics';
(iii) To list the names of all teachers with their date of joining in ascending order, the ORDER BY clause followed by the column name ie., DATE_OF_JOIN should be used in the query.
QUERY: SELECT NAME FROM TEACHER ORDER BY DATE_OF_JOIN;
(iv) To display teacher’s name, salary, age for male teachers only, the WHERE clause followed by the condition ie., GENDER=’M’ should be used in the query.
QUERY: SELECT NAME,SALARY,AGE FROM TEACHER WHERE GENDER='M';
(v) To display name, bonus for each teacher where bonus is 10% of salary, the statement salary*0.1 AS BONUS should be used in the query.
QUERY: SELECT NAME,SALARY*0.1 AS BONUS FROM TEACHER;