I am hoping someone can help me with an SQL query i am trying to construct in order to return how many properties each sales advisor has sold and in which month.
I need the query to display the following in a table
employee_id First name Last name Total Sales TimeofSale
1 John doe 2 02/12
2 MArie Claire 1 09/11
The tables i have are the following
1) sales_advisor (which contains 'sales_advisor_id' and 'TotalSales')
2) employee (which contains 'employee_id', 'f_name' and 'l_name')
3) sales_record (which contains 'TimeofSale')
Yes this is part of some University work, therefore i cant ask for it to be done for scratch just more of some advice. So, until now this is what i have put, however i am not getting the right outcome.
SELECT sales_advisor.employee_id, f_name, s_name, SUM(TotalSales) AS TotalSales
INNER JOIN sales_advisor = sales_advisor INNER JOIN
employee ON f_name = s_name
Please if someone can be generous enough to throw me some knowledge, will ve very appreciated, Thanks