Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select avg(N.number) as Average
- from (
- select t.team_name, count(tt.team_id) as 'Number'
- from teams as t
- left join (
- select t.team_id, t.TEAM_NAME
- from teams as t
- join employees as e on e.TEAM_ID= t.TEAM_ID
- where e.gender = 'F'
- ) as tt on t.TEAM_ID = tt.team_id
- group by t.team_name
- ) as N
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement