CMS results on flavour physics