Sales by product by customer

Sales By Product By Customer

Reports shows customers who bought a particular product during a particular period.

SELECT salhead_0.Customer, salhead_0.transcode,salhead_0.transnum,salhead_0.thedate,salline_0.Product, (salline_0.qtysupplied), (salline_0.TheValue)
FROM prodsite prodsite_0, salhead salhead_0, salline salline_0
WHERE salline_0.TransNum = salhead_0.TransNum AND prodsite_0.Product = salline_0.Product AND prodsite_0.Site = salhead_0.Site AND prodsite_0.Site = salline_0.Site AND salhead_0.TransCode<>'SALLAY' and salhead_0.updatedfl = 1 and salhead_0.transcode <> 'salstk' AND salhead_0.datefinalised >= [G:DATE1,Enter Start Date] and salhead_0.datefinalised <= [G:DATE2,Enter End date] and salline_0.product = "[G:STRING2,Enter Product]" order by salhead_0.customer,salhead_0.thedate