San Francisco has been ranked the No. 1 city for career prospects and median income for career-oriented professionals, according to a new study conducted by human resource firm Robert Half.

Robert Half partnered with the Economist Intelligence Unit to rank the top 25 U.S. cities to live in for career-oriented professionals, polling over a 1,000 professionals using 25 diverse indicators separated into four categories: career prospects, quality of life, cost of living and cultural diversity.

Using those metrics, they found San Francisco ranked No. 3 overall in all four categories and second for highly educated professionals in the workforce – but was first when it came to the potential for a longtime career that paid well.