我有三张桌子 数据,股份,公司
**companies**
-------------------------
ticker | Company_name
**Shares**
------------------------------------------
share| company | buy_price |value | year
**data**
------------------------------------------
month| year| share_price|value| company
以下是我正在使用的查询
SELECT d.data_id, s.share, c.ticker, c.company_name, s.buy_price, d.value, d.share_price FROM companies c LEFT join shares s ON s.company=c.companyid left JOIN data d on c.companyid=d.company where d.month='31-Dec' and s.year='2005'
问题是它是从公司的股票表中选择已修复的数据