the subject line does not explain it well. I have a table of sales numbers that cover multiple companies, products and quarters. I looks like this.
Code:
company|product|quarter|revenue
acme|apple|3Q09|$4
acme|banana|2Q09|$5
bobo|apple|2Q09|$4
campy|banana|3Q09|$5
I would like a query that produces the following table.
Code:
apple sales|1Q09|2Q09|3Q09|4Q09
acme|$45|$35|$40|$50
bobo|$45|$35|$40|$50
campy|$45|$35|$40|$50
I am not sure how to spread quarter field over multiple columns to sum the revenue.
Any suggestions?