I should have a brain fart or something like that, but I just can't find a solution to this.
If you have a list, for example:
%country(country, population, capital) country(sweden, 8823, stockholm). country(usa, 221000, washington). country(france, 56000, paris). country(denmark, 3400, copenhagen). %city(city, country, population) city(lund, sweden, 88). city(new_york, usa, 5000). city(paris, usa, 1). city(copenhagen, denmark, 1200). city(aarhus, denmark, 330). city(odense, denmark, 120). city(stockholm, sweden, 350). city(washington, usa, 3400). city(paris, france, 2000). city(marseilles, france, 1000).
I want to find the second largest populated city, which in this case will be Washington, USA - 3400 people. How could you do this?
Thanks.