dan_stan
asked on
Join help
Hi,
I have two tables.
table 1 : ref_forecast_won
This table has the total number of actual sales from year to date, grouped by country and month.
Table 2 ref_forecast_amount
This table has the total number of opportunities being worked on from now to the end of year, grouped by country and month.
I want to join both tables together. So I have the following columns
Month
Country
Total Won
Total Worked on.
My query shows me all data up until month 9 (September) , Where it should me all of the opportunities worked on beyond this date.
Can someone please help?
I have two tables.
table 1 : ref_forecast_won
This table has the total number of actual sales from year to date, grouped by country and month.
Table 2 ref_forecast_amount
This table has the total number of opportunities being worked on from now to the end of year, grouped by country and month.
I want to join both tables together. So I have the following columns
Month
Country
Total Won
Total Worked on.
select
w.total_won
,w.month
,a.total_opportunity
from ref_forecast_won w
left join ref_forecast_amount a on a.month = w.month and a.market = w.market
My query shows me all data up until month 9 (September) , Where it should me all of the opportunities worked on beyond this date.
Can someone please help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Post your expected result.
ASKER
Hi,
I figured it out.
i needed to do a union. however i did not explain the question very well, sorry about that.
I figured it out.
i needed to do a union. however i did not explain the question very well, sorry about that.
ASKER
Unfortunately I cannot use that function, as it's restricted within Zoho Reports.
I have taken some screen shots so you can get an idea of the data structure.
I have hidden the figures.
total-won.png
total-opportunity.png