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 correct SQL query to display total customers under each trainer in the Gym.
Select TId, TName, Count(*) from Customer
Where Trainer. TId = Customer. TId;
Select TName, count(*) from Customer
group by TId;
Select TId, count(*) from Customer
group by TId;
Select TId, count(CID) from Customer
Where Trainer.TId = Customer. TId;