Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
SELECT v.rep, Sum(v.[Gross Rev]) as GrossRev, DATENAME(month, v.Funded) as Mth Into #temp FROM CRMPROD_01.dbo.v_P_Reporting v WHERE v.Funded is not null and v.Status <> 'Closed' and (YEAR(v.Funded) = YEAR(getdate())) and (MONTH(v.Funded) > MONTH(getdate())-3) Group by rep, v.Funded ORDER BY v.rep, DATENAME(month, v.Funded) SELECT Rep,June,July FROM ( SELECT Rep,Mth,Grossrev FROM #temp)P PIVOT (SUM(Grossrev) FOR Mth IN (June,July))As Pvt order by rep
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.