Hello to all!
I'm trying to make a very difficult report. I want to present sales of some products within an year but month-to-month.
lets say that the table would be like this...
customer|specie|quantityJAN|quantityFEB|quantityMAR...
But the problem is I need to make all these columns by hand and the query is like this...
This query is REALLY slow. And finally I get an error of overpassing the limit of 256 tables...
Can you please help me?
I'm trying to make a very difficult report. I want to present sales of some products within an year but month-to-month.
lets say that the table would be like this...
customer|specie|quantityJAN|quantityFEB|quantityMAR...
But the problem is I need to make all these columns by hand and the query is like this...
Code:
select customer.name, product.descr, (select sum(amount) from sales where... and month=JAN), (select sum(amount) from sales where... and month=FEB), (select sum(amount) from sales where... and month=MAR)... etc, etc...
Can you please help me?
Comment