Link to home
Start Free TrialLog in
Avatar of dan_stan
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.

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

Open in new window


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
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dan_stan
dan_stan

ASKER

Hi,

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
Post your expected result.
Hi,

I figured it out.

i needed to do a union. however i did not explain the question very well, sorry about that.