Historical Item Sales by customer - using SQL

Good morning, 

I am using the below SQL statement to get a sales per item number from my Sales History tables (OESHHD and OESHDT) as well as item cost in my Sales Posting Journal tables (OEAUDH and OEAUDD). However, when I compare my sql output my Sage300 "Item Sales Analysis by Customer" report:

  • onsome days I match perfectly (same number of items, same total Sales values)
  • on some says I have more items in my sql output than my Sage300 report
  • For some customers I have days where I sold items appearing in my sql script which is not in my Sage300 report at all

So, this makes me think perhaps my Sales History tables don't include returns... or something along those lines

Question 1:
Am I correct in assuming that my Sales History tables only show what I have sold to my customers, and not, any returns back from my customer? Or, is there perhaps another logical reason my sql script is pushign out unmatching numbers?

Question 2: 
If the answer to Question 1 above is, "thats correct - the Sales History table does not include returns etc", then where may I go to find this information so I can "subtract it out" of my history

Question 3:
Am I even in fact going about this the correct way? Is Sales History "the place" to ummm.... the place to go? I want to go get the true numbers. For exmaple, if a sold 20 pink elephants to my customer, and he returned 15. Then on my sales report I actually only want to show "we sold 5"  (sorry this question is repeating a little of what I asked in Q2 above)

Question 4:
I'm surely making this more complex than what it ought to be. I'm all open to suggestion from those who have treaded this path many times before me :) Anyone got any other tables to point me toward?

select 
 h.TRANSTYPE 
,DOCNUM 'Document Number' 
,CUSTOMER 'Customer Number' 
,ORDNUMBER 'Order Number' 
,ORDDATE 'Order Date' 
,INVNUMBER 'Invoice Number' 
,INVDATE 'Invoice Date' 
,TERRITORY 'Territory' 
,SALESPER1 'Salesperson 1' 
,CUSACCTSET 'Customer Account Set' 
,DATEBUS 'Posting Date' 
,LINETYPE 
,ITEM 'Item Number' 
,MISCCHARGE 'Miscellaneous Charge Code' 
,PRICELIST 'Price List' 
,CATEGORY 'Category' 
,LOCATION Location 
,QTYSHIPPED 'Quantity Shipped' 
,INVUNIT 'Unit of Measure' 
,UNITPRICE 'Unit Price' 
,UNITCOST 'Unit Cost' 
,EXTCOSTH ' ,COSTVARH' 
,EXTINVMISC 'Extended Amount' 
,REVAMTH 'Revenue' 
FROM [OEAUDH] h 
left join [OEAUDD] d on h.TRANSTYPE=d.TRANSTYPE and h.DAYENDNUM=d.DAYENDNUM and h.ENTRYNUM=d.ENTRYNUM

As always,
Thank you.