here's my code;
SELECT b.alert_id,cur.stock_code, current_name,d.board_name,cur.year_id, cur.period_id,cur.fixed_assets,
prev.year_id AS prev_year_id,prev.period_id AS prev_period_id, prev.fixed_assets AS prev_fixed_assets,
(cur.fixed_assets*100/prev.fixed_assets) AS "total1", c.para1
FROM company_financial AS cur
LEFT JOIN company_info a ON (a.stock_code=cur.stock_code)
LEFT JOIN company_alert b ON (b.year_id=cur.year_id)
LEFT JOIN ref_alert_parameter c ON (c.alert_id=b.alert_id)
LEFT JOIN ref_board d ON (d.board_code=a.board_code)
LEFT JOIN ref_sector e ON (e.sector_code=a.sector_code)
LEFT JOIN ref_sub_sector f ON (f.sub_sector_code=a.sub_sector_code)
LEFT OUTER JOIN company_financial AS PREV ON cur.year_id = prev.year_id + 1
ORDER BY year_id
after joining all the required tables, the output display redundant data. few data are repeated. can anyone tell me why and how can i fix it. thanks.