Hi Everyone,
I would really appreciate help with this one I can't seem to work it out.
I have these example tables - for arguments sake I can't do anything about the structure of the tables as these come from the client and the real tables have a lot more data in.
tbl_fruit_sales
id_fruit_sale
sale_date
staff_id
staff_name
amount_of_sales
tbl_new_customer_memberships
id_memberships
report_date
staff_id
customer_name
tbl_complaints
id_complaint
report_date
staff_id
complaint
tbl_staff
staff_id
staff_name
staff_status
Ideal output:
Date staff_id staff_name Sum of Sales Count of new memberships Count of complaints 17/05/2019 46445 David Smith 1 2 0 18/05/2019 46445 David Smith 4 2 7
What I can't seem to understand is how to link the tables to get this output. For example on the 18/05/2019 I need to know what David did but if I tried to join the rest of the tables to say sales if he had no sales on the 18th I wouldnt be able to bring back memberships and complaints, its the same issue what ever table I use.
Would appreciate any help.
Thanks