-- Database schema
| routes : rid [ INT ] primary_key , dst_apid [ INT ] routes.dst_apid = airports.apid , dst_ap [ TEXT ] , src_apid [ INT ] routes.src_apid = airports.apid , src_ap [ TEXT ] , alid [ INT ] routes.alid = airlines.alid , airline [ TEXT ] , codeshare [ TEXT ] | airports : apid [ INT ] primary_key , name [ TEXT ] , city [ TEXT ] , country [ TEXT ] , x [ INT ] , y [ INT ] , elevation [ INT ] , iata [ TEXT ] , icao [ TEXT ] | airlines : alid [ INT ] primary_key , name [ TEXT ] , iata [ TEXT ] , icao [ TEXT ] , callsign [ TEXT ] , country [ TEXT ] , active [ TEXT ] |
-- -- List all countries and their number of airlines in the descending order of number of airlines.

SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC;