posted 17 years ago
Hi guys,
I believe this is a left join question (though I�m not 100% sure)
I have a table with the info below. Some data is not included in the second table but I still want the user to know about it. Can anyone tell what is the sql command for that?
Thanks
Table Target: ID, date, startDate, endDate, growth
Example:
101, 2006-01-01, 2006-12-31, 30
102 2006-01-01, 2006-12-31, 15
Table Production: ID, amount, date
101, 800, 2006-01-02
101, 900, 2006-02-03
101, 150, 2006-03-15
//no info on 102
I would like to get the following data:
ID, total_production
101, 1850, 30
102, null, 15