It took him 10 races to do it, but Lewis Hamilton finally claimed his first win for Mercedes after dominating the Hungarian Grand Prix.