what are the by products produced by metals through mining