Link to home
Start Free TrialLog in
Avatar of Mark_Co
Mark_CoFlag for United States of America

asked on

Request for help to use PIVOT and UNPIVOT

I've never used pivot before and I'm trying to learn how to use it. i'm not finding any helpful beginner examples that are easy for me to understand on the web. Can anyone show me any cool tips and tricks and just how I can use PIVOT and UNPIVOT?

I attached a picture of a sample table in my schema for you to give me some cool example SQL code I can mess with for using pivot and unpivot. Thanks

I was trying this for example but it's not right:
select  
*
from EMPLOYEES a
PIVOT
(SUM(salary))

Open in new window

tem.png
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark_Co

ASKER

Thank you. That did help me understand it a lot better.