At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.
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.