I'm trying to perform a query where I transpose cell values from a table
into column names with totals.  For example, I have the following table and
I'd like to produce the view at the bottom:

Site                Part                Quantity
Site A            Part 1                5
Site A            Part 2                3
Site A            Part 3                1
Site B            Part 1                7
Site B            Part 3                10
Site C            Part 2                2
Site C            Part 4                5

I would like to take said view and produce a view as follows

Site            Part 1            Part 2        Part 3        Part 4
Site A        5                    3                1
Site B        7                                      10
Site C                              2                                5

As you can see, all Sites have been grouped and part names have been created
as columns.  Then part quantities are aggregated.

Can anyone offer any guidance?

Thanks,

Jeff



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to