troubleshooting Question

Display Data like Pivot Table with a SQL scrip

Avatar of BenjaminWong
BenjaminWong asked on
Microsoft SQL Server
4 Comments1 Solution234 ViewsLast Modified:
I have been using query analyser to extract raw data from MS SQL database and export the data to Excel, and re-arrange the data into meaningful monthly statistic report using Excel Pivot table funtion.  The objective is to obtain the following information for Management Information and decison making :
                           Monthly Enrolment Statustic
                             (Col 1)           (Col 2)
                              Course A     course B
(Row 1) Jan               40                45
(Row 2) Feb                    35              47
(Row 3) Mar               50               21      

Would someone pleae advise how to use sql scrip to obtain the statistic and display them as shown above?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros