ABC fitness centre has computerized their Gym by keeping details of their Trainees in Trainer table and clients in Customer table which are as follows:
Table : Trainer
|
TId |
TName |
Activity |
Salary |
Dt_Appoint |
|
G101 |
Manish |
Kick Boxing |
18000 |
2020-10-12 |
|
G102 |
Sachin |
Core |
22000 |
2021-06-09 |
|
G103 |
Aahan |
Core |
25000 |
2020-05-30 |
|
G104 |
Aparna |
Zumba |
15000 |
2021-11-12 |
|
G105 |
Nitin |
Yoga |
20000 |
2022-02-15 |
Table : Customer
|
CId |
Cust_Name |
Gender |
TId |
Fee |
Membership |
|
C1 |
Sabina |
F |
G101 |
10000 |
12 |
|
C2 |
Rohit |
M |
G101 |
9000 |
10 |
|
C3 |
Asad |
M |
G102 |
12000 |
15 |
|
C4 |
John |
M |
G103 |
6000 |
6 |
|
C5 |
Aastha |
F |
G104 |
8000 |
8 |
|
C6 |
Neha |
F |
G102 |
9000 |
10 |
|
C7 |
Zubain |
M |
G102 |
10000 |
12 |
|
C8 |
Deljeet |
F |
G104 |
6000 |
6 |
Choose the correct SQL query to display a report showing Trainer name, Salary, Customer name and Fee for all Trainers having salary between 20000 to 25000.
A. Select TName, Salary, Cust Name, Fee
From Customer C, Trainer T
Where T.TId = C.TId and Salary>=20000 and Salary<=25000;
B. Select TName, Salary, Cust_Name, Fee
From Customer, Trainer
Where Customer.TId = Trainer. TId and Salary between 20000 and 25000;
C. Select TName, Salary, C_Name, Fee
From Customer C, Trainer T
Where C.TId = T.TId and Salary between 20000 and 25000;
D. Select TName, Salary, C_Name, Fee
From Customer, Trainer
Where C.TI d = T.TId and 20000<=Salary<=25000;
E. Select TName, Salary, Cust_Name, Fee
From Customer C, Trainer T
Where T.TId = C.TId and Salary between 20000 and 25000;
Choose the most appropriate answer from the options given below: