Hi,
I have 3 tables

BATCHES(pk batch_id)
INVOICES(pk invoice_id, fk batch_id)
INVOICES_LINES(fk invoice_id)

Consider we have batch and it has 6 invoices and each invoice has 10 lines. We need to count the invoice under the batch and also count the lines of all invoices.

The out put I am looking is
Batch Invoice lines
----- ------- -----
INV 6 60

What query I can write to get the above result.

Thanks in advance.