Wednesday, March 16, 2016

[google-cloud-sql-discuss] Pivoting result set

Hello Everyone,

I was asked to do a report and wanted to pivot the result set to mirror the destination format below. I don't think i need to use an aggregate function, and I am having a hard time navigating through existing reference material online. The goal is to have the first two columns of the second table be unique, and the third column broken down into individual columns. Any help would be appreciated, thank you!


Orignal Company Person NameMember of Board
     
Company DJohn Doe Company A
Company DJohn Doe Company B
Company DJohn Doe Company C
Orignal CompanyPerson Name Board 1 Board 2Board 3
     
Company DJohn Doe Company ACompany B Company C 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/04ef8d50-c802-481c-b3a6-d9a4d4621a12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment