Advertisement
Artur123ff2

Untitled

Mar 25th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.25 KB | None | 0 0
  1. select t.team_name, count(tt.team_id) as 'Number'
  2. from teams as t
  3. left join (
  4.     select t.team_id, t.TEAM_NAME
  5.     from teams as t
  6.     join employees as e on e.TEAM_ID= t.TEAM_ID
  7.     where e.gender = 'F'
  8. ) as tt on t.TEAM_ID = tt.team_id
  9. group by t.team_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement