I need a query that tells me how many invoices were created from a single Sales Order. I would like to be able to type in the Sales Order number and have the query tell me there were 1 or 4 AR Invoices created for that Sales Order. I want a number of Invoices that the Relationship Map shows you graphically. The invoice numbers are not needed, I just need the count.
If the SO has one Invoice tell me 1
If the SO has four Invoices tell me 4