RE: Number of Invoice of an customer! what are the table involved
Hasib,
In addition to SOP30200 table, you need to refer below tables,
select CUSTNMBR , Count(DISTINCT SOPNUMBE ) from SOP30200 where SOPTYPE=3 GROUP BY CUSTNMBR
UNION
select CUSTNMBR , Count(DISTINCT SOPNUMBE ) from SOP10100 where SOPTYPE IN (2,3) GROUP BY CUSTNMBR
SELECT * FROM RM10101 WHERE CUSTNMBR = 'AARONFIT0001' AND RMDTYPAL = 1
SELECT * FROM RM20101 WHERE CUSTNMBR = 'AARONFIT0001' AND RMDTYPAL = 1
SELECT * FROM RM30101 WHERE CUSTNMBR = 'AARONFIT0001' AND RMDTYPAL = 1
In the snapshop of Smartlist you are showing Total number of Invoice, YTD, which includes information from RM Tables as well.
Please make use of above tables and check if you can get the exact count as Smartlist.
If you are still facing difficulty to arrive at the exact result, please feel free to reach me,
I am happy to help you with SQL Query.
Thanks,
Praveen