Smart    Lucky

Smart Lucky

  • NA
  • 555
  • 626.4k

Query For Matrix Report

Apr 15 2015 1:46 AM
Hi dude
 
I have write q query in mysql which returning the following format result but i want this result in following format  means column wise can any one help me how can i write this query ..
 
 
  Month Amount Qty ProductName SaleDate                
  January 6385 20 Krustika 1/31/2013                
  February 0 0 Pain Rustique 2/28/2013                
  March 0 0 Pane Luciane 3/31/2013                
  April 6400 23 Pane Capricciosa 4/30/2013                
  May 0 0 well33 5/31/2013                
                           
  I want in this format how can I write query please can any one help me please.              
                           
  ProductName Month Qty Amount Total Month Qty Amount Total Month Qty Amount Total
  Krustika January 20 6385 qty*amount February 0 0 qty*amount March 0 0 qty*amount
  Pain Rustique February 0 0 qty*amount February 0 0 qty*amount March 0 0 qty*amount
  …. …. …. …. …. …. …. …. …. …. …. …. ….
  …. …. …. …. …. …. …. …. …. …. …. …. ….
 

Answers (4)