I m having problem in creating a query for counting Articles of a same FAmily in an Invoice:
I have two Tables Invoice, InvoiceDetails that are related through InvoiceId.
In Invoice Table I keep the Salesman Code. In InvoiceDetails I keep the Articles that they Sell ( Marlboro Family). The Marlboro Family is defines as three GRoups (Marlboro Light, Marlboro Ultra Light and Marlboro Full Flavour) . Their Code is like:
PMM1112, PMM1212, PMM1313 (MArlboro Light)
PMM2111, PMM2112, PMM2112 (Marlboro Full Flavour)
PMM3111 (Marlboro Ultra Light)
Now I have to count the Invoices for Each Salesman that have an Invoice that Include all Three of them in one Invoice
E.c InvoiceId 00001 (PMM1112, PMM1212, PMM2111, PMM3111).
Thanks in Advance