Consider a voting procedure where countries, states, or districts comprising a union each elect representatives who then participate in later votes at the union level on their behalf. The countries, provinces, and states may vary in their populations and composition. If we wish to maximize the total expected utility of all agents in the union, how to weight the votes of the representatives of the different countries, states or districts at the union level? We provide a simple characterization of the efficient voting rule in terms of the weights assigned to different districts and the voting threshold (how large a qualified majority is needed to induce change versus the status quo). Next, in the context of a model of the correlation structure of agents preferences, we analyze how voting weights relate to the population size of a country. We then analyze the voting weights in Council of the European Union under the Nice Treaty and the recent constitution, and contrast them under different versions of our model.