Computer Science, asked by hukamchandabh, 6 months ago

IP
1)Consider the table TEACHER given below. Write commands in SQL for (1) to (3) and output
for (4)
ID
1
Category
TGT
2
PRT
PGT
3
Name
Department
Tanya Nanda Social Studies
Saurabh Sharma Art
Nandita Arora English
James Jacob English
Jaspreet Kaur Hindi
Disha Sehgal
Siddharth Kapoor Science
Sona Mukherjee Math
Hiredate
1994-03-17
1990-02-12
1980-05-16
1989-10-16
1990-08-01
1980-03-17
1994-09-02
1980-11-17
TGT
PRT
Gender | Salary
F
25000
M 20000
F
30000
M
25000
F
22000
F
21000
M 27000
F
24500
5
7
PRT
TGT
TGT
8
1. To display all information about teachers of PGT category.
1. To list the names of female teachers of Hindi department.
ini. To list names, departments and date of hiring of all the teachers in ascending order of
date of joining
W. SELECT DISTINCT(category) FROM teacher,​

Answers

Answered by poojan
14

Queries:

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

SELECT *

FROM TEACHER

WHERE Grade = 'PGT';

2. To list the names of female teachers of Hindi department.

SELECT Name

FROM TEACHER

WHERE (Department = 'Hindi') AND (Gender = 'F');

3. To list names, departments and date of hiring of all the teachers in ascending order of  date of joining.

SELECT Name, Department, Hiredate

FROM TEACHER

ORDER BY Hiredate;

Learn more:

1. Write the commands in MySQL for the following : [5]  1. To list name, department and date of hiring of all the teachers in ascending order of Hiredate...

https://brainly.in/question/24821552

2. Write a query to create a table with the following structure table product field data type P name whatcha description watches price decimal.

https://brainly.in/question/15451124

Answered by agarwalaashita21
0

Answer:

(a) Select * from Teacher where category= “PGT” ;

(b) Select Name from Teacher where gender = “F” and department = “Hindi” ;

(c) Select name, department, hiredate from Teacher order by hiredate ;

(d) Select count(*) from Teacher where Department = “English” ;

(e) Select Department , hiredate from Techer where gender = “F” and salary > 25000 ;

(f) Select * from Teacher name like “J%” ;

Similar questions