AnsweredAssumed Answered

need help with item distribution calculation

Question asked by khasim686 on May 25, 2015
Latest reply on May 27, 2015 by khasim686

Title

need help with item distribution calculation

Post

dear all 

i have 3 tables 1.employees 2.items 3.distribution and each table have couple of records

i wanna distribute sum items to the employees 

for example

table1.employess

id        name  

001     employee1

002     employee2

003     employee3 

table2.items

id       name    desciption   quantity

101    item1                         50

102    item2                         35

103    item3                         90

104    item4                         75

table3.distribution

employee_id_fk      item_id_fk     quantity

001                           101                2

001                           102                1

002                           102                2

003                           103                1

001                           101                1

002                           103                3

 

i would like to know the total no of items distributed and items available in stock

please help me how to do that

 

Outcomes