1: 2: 3: 4: 5:
SELECT Rep,June,July FROM ( SELECT Rep,Mnth,Grossrev FROM TablName)P PIVOT (SUM(Grossrev) FOR Mnth IN (June,July))As Pvt