Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- [Employee Gender] = Gender,
- [Sales Representative],
- [Buyer],
- [Janitor]
- FROM
- (
- SELECT
- JobTitle,
- VacationHours,
- Gender
- FROM HumanResources.Employee
- ) AS A
- PIVOT(
- AVG(VacationHours)
- FOR JobTitle IN([Sales Representative], [Buyer], [Janitor])
- ) AS B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement