select top_countries and for each country, select top_cities in that country, in 1 query - Mailing list pgsql-general

From Dorian Hoxha
Subject select top_countries and for each country, select top_cities in that country, in 1 query
Date
Msg-id CANsFX05f5xTNvqvs47j8qathmXB28Xsfq5MbETZfF6krcaWZtA@mail.gmail.com
Whole thread Raw
Responses Re: select top_countries and for each country, select top_cities in that country, in 1 query  (John McKown <john.archie.mckown@gmail.com>)
List pgsql-general
I have CREATE TABLE t (country text, city text);

I want to get with 1 query,

select count(country),country GROUP BY country ORDER BY count(country) DESC


And for each country, to get the same for cities.

Is it possible ?

Thanks

pgsql-general by date:

Previous
From:
Date:
Subject: Re: logfile character encoding
Next
From: Redoute
Date:
Subject: Re: logfile character encoding