No no no, you CAN, but in the query you just posted, you have no join statement linking table3 to anything. Or now that I look at it again....table one, or no, table three...
from table1 as a,
table2 as b
left join table3 as c
on a.code=b.code
Okay, so your join statment links table3 to table2, but your on statement links table1 to table2....
Try this:
SELECT a.code,
a.name,
sum(b.qty),
sum(c.pay)
FROM table1 a
LEFT JOIN table2 b, table3 c
ON a.code=b.code
AND a.code=c.code
GROUP BY a.code