compound table calculation

compound table calculation

i have two tables..

produtcttype      Name         Quantity   CustomerName
GA                     pencil           5             Pat              
GA                     Pen               4             Charles           
RZ                      Ruler              3           Charles     


producttype          Name         Quantity       CustomerName                                         
GA                        Tablet            6               Charles                                               
RZ                         Iphone           7               Pat

Main Table
CustomerName            TotalQuantity     ProductType
Charles                               x                       GA

so guys how can i automatically derive the sum of the total quantity of items for charles across both tables for producttype  GA for example.Thanks .
Hi Tmlewin,

With an Aggregate, you can compute automatically the total quantity of items for Charles in Table A.
I would say the easiest solution is to use two aggregates, one for Table A and another for B.

To really do it in one go, you would need an Advanced Query with an Union SQL statement.

yeap thanks. i have solved it with an advanced query.