<<< Order with two criteria >>>
Scenario world
f35f7fece0cf0019765619c477c900ddd8131dbc27b32e9261f4ab7cdc49773c
See details on the model
In this scenario, we have a single table world in which each row describes a country. The table contains the following attributes:
- name of type VARCHAR(50) NOT NULL, the name of the country (e.g. France)
- continent of type VARCHAR(60), in which continent is the country in (e.g. Europe)
- area of time DECIMAL(10) the area of the country in square kilometer
- population of type DECIMAL(11) the number of inhabitants
- gdp of type DECIMAL(14) the Gross Domestic Product
- capital of type VARCHAR(60) the name of the capital city
- tld of type VARCHAR(5) the Top Level Domain of the country (the last part of the domain names of the country, e.g. .fr for France)
- flag of type VARCHAR(255) an url of the flag of the country
Question
List all countries in the database with their continent, name, population and area and order the result by continent, for each continent, order by population decreasing.
{"rows":[["Africa","Côte d'Ivoire",null,null],["Africa","Sao Tomé and Príncipe",null,null],["Africa","Nigeria","178517000","923768"],["Africa","Ethiopia","87952991","1104300"],["Africa","Congo, Democratic Republic of","69360000",null],["Africa","South Africa","52981991","1221037"],["Africa","Kenya","45546000","580367"],["Africa","Tanzania","44928923","945087"],["Africa","Algeria","38700000","2381741"],["Africa","Sudan","37289406","1886068"],["Africa","Uganda","35357000","241550"],["Africa","Morocco","33307500","446550"],["Africa","Ghana","27043093","238533"],["Africa","Mozambique","23700715","801590"],["Africa","Madagascar","21263403","587041"],["Africa","Cameroon","20386799","475442"],["Africa","Angola","19183590","1246700"],["Africa","Burkina Faso","17322796","272967"],["Africa","Niger","17138707","1267000"],["Africa","Malawi","16829000","118484"],["Africa","Mali","15768000","1240192"],["Africa","Zambia","15023315","752612"],["Africa","Chad","13211000","1284000"],["Africa","Zimbabwe","13061239","390757"],["Africa","Senegal","12873601","196722"],["Africa","South Sudan","11739000","619745"],["Africa","Tunisia","10886500","163610"],["Africa","Guinea","10824200","245857"],["Africa","Somalia","10806000","637657"],["Africa","Rwanda","10537222","26338"],["Africa","Benin","9988068","112622"],["Africa","Burundi","9420248","27834"],["Africa","Togo","6993000","56785"],["Africa","Eritrea","6536000","117600"],["Africa","Libya","6253000","1759540"],["Africa","Sierra Leone","6190280","71740"],["Africa","Central African Republic","4709000","622984"],["Africa","Congo, Republic of","4559000","342000"],["Africa","Liberia","4397000","111369"],["Africa","Mauritania","3461041","1030700"],["Africa","Namibia","2113077","825615"],["Africa","Lesotho","2098000","30355"],["Africa","Botswana","2024904","582000"],["Africa","Gambia","1882450","11295"],["Africa","Guinea-Bissau","1746000","36125"],["Africa","Gabon","1711000","267668"],["Africa","Equatorial Guinea","1622000","28051"],["Africa","Swaziland","1268000","17364"],["Africa","Mauritius","1257900","2040"],["Africa","Djibouti","886000","23200"],["Africa","Comoros","743798","1862"],["Africa","Cape Verde","491875","4033"],["Africa","Seychelles","90945","452"],["Asia","China","1365370000","9596961"],["Asia","India","1246160000","3166414"],["Asia","Indonesia","252164800","1904569"],["Asia","Pakistan","188020000","881912"],["Asia","Bangladesh","156557000","147570"],["Asia","Japan","127090000","377930"],["Asia","Philippines","99804200","342353"],["Asia","Vietnam","89708900","331212"],["Asia","Egypt","86736900","1002450"],["Asia","Iran","77552000","1648195"],["Asia","Turkey","76667864","783562"],["Asia","Thailand","64456700","513120"],["Asia","Myanmar","61120000","676578"],["Asia","South Korea","50423955","100210"],["Asia","Iraq","36004552","438317"],["Asia","Uzbekistan","30492800","447400"],["Asia","Malaysia","30177000","330803"],["Asia","Saudi Arabia","29994272","2149690"],["Asia","Nepal","26494504","147181"],["Asia","Afghanistan","25500100","652230"],["Asia","Yemen","25235000","527968"],["Asia","North Korea","25027000","120538"],["Asia","Taiwan","23386883","36193"],["Asia","Syria","21987000","185180"],["Asia","Sri Lanka","20277597","65610"],["Asia","Cambodia","15184116","181035"],["Asia","Azerbaijan","9477100","86600"],["Asia","United Arab Emirates","9446000","83600"],["Asia","Israel","8193900","20770"],["Asia","Tajikistan","8160000","143100"],["Asia","Jordan","6602190","89342"],["Asia","Laos","6580800","236800"],["Asia","Kyrgyzstan","5776570","199951"],["Asia","Singapore","5399200","710"],["Asia","Turkmenistan","5307000","488100"],["Asia","Lebanon","4966000","10452"],["Asia","Georgia","4490500","69700"],["Asia","Oman","4020000","309500"],["Asia","Kuwait","3065850","17818"],["Asia","Mongolia","2931300","1564110"],["Asia","Qatar","2174035","11586"],["Asia","Bahrain","1234571","765"],["Asia","Timor-Leste","1212107","14874"],["Asia","Cyprus","865878","9251"],["Asia","Bhutan","749090","38394"],["Asia","Brunei","393162","5765"],["Asia","Maldives","317280","300"],["Caribbean","Cuba","11167325","109884"],["Caribbean","Haiti","10413211","27750"],["Caribbean","Dominican Republic","9445281","48671"],["Caribbean","Jamaica","2717991","10991"],["Caribbean","Trinidad and Tobago","1328019","5130"],["Caribbean","Bahamas","351461",null],["Caribbean","Barbados","285000","430"],["Caribbean","Saint Lucia","180000","616"],["Caribbean","Grenada","103328","344"],["Caribbean","Antigua and Barbuda","86295","442"],["Caribbean","Dominica","71293","751"],["Eurasia","Russia","146000000","17125242"],["Eurasia","Armenia","3017400","29743"],["Europe","Germany","80716000","357114"],["Europe","France","65906000","640679"],["Europe","United Kingdom","64105700","242900"],["Europe","Italy","60782668","301336"],["Europe","Spain","46609700","505992"],["Europe","Ukraine","43009258","603500"],["Europe","Poland","38496000","312679"],["Europe","Romania","19942642","238391"],["Europe","Kazakhstan","17244000","2724900"],["Europe","Netherlands","16857500","41543"],["Europe","Belgium","11198638","30528"],["Europe","Greece","11123034","131990"],["Europe","Czech Republic","10517400","78865"],["Europe","Portugal","10477800","92090"],["Europe","Hungary","9879000","93028"],["Europe","Sweden","9675885","450295"],["Europe","Belarus","9467000","207600"],["Europe","Austria","8504850","83871"],["Europe","Switzerland","8160900","41284"],["Europe","Bulgaria","7245677","110879"],["Europe","Serbia","7181505","88361"],["Europe","Denmark","5634437","43094"],["Europe","Finland","5458038","338424"],["Europe","Slovakia","5415949","49037"],["Europe","Norway","5124383","323802"],["Europe","Ireland","4593100","70273"],["Europe","Croatia","4290612","56594"],["Europe","Bosnia and Herzegovina","3791622","51209"],["Europe","Moldova","3557600","33846"],["Europe","Lithuania","2939431","65300"],["Europe","Albania","2821977","28748"],["Europe","Slovenia","2063151","20273"],["Europe","Macedonia","2062294","25713"],["Europe","Latvia","1996500","64559"],["Europe","Estonia","1315819","45227"],["Europe","Montenegro","620029","13812"],["Europe","Luxembourg","549700","2586"],["Europe","Malta","416055","316"],["Europe","Iceland","326340","103000"],["Europe","Andorra","76098","468"],["Europe","Liechtenstein","37132","160"],["Europe","Monaco","36950","2"],["Europe","San Marino","32637","61"],["Europe","Vatican City","839","0"],["North America","United States","318320000","9826675"],["North America","Mexico","119713203","1964375"],["North America","Canada","35427524","9984670"],["North America","Guatemala","15806675","108889"],["North America","Honduras","8555072","112492"],["North America","El Salvador","6384000","21041"],["North America","Nicaragua","6071045","130373"],["North America","Costa Rica","4667096","51100"],["North America","Panama","3405813","75417"],["North America","Belize","349728","22966"],["North America","Saint Kitts and Nevis","55000","261"],["Oceania","Australia","23545500","7692024"],["Oceania","Papua New Guinea","7398500","462840"],["Oceania","New Zealand","4538520","270467"],["Oceania","Fiji","858038","18272"],["Oceania","Solomon Islands","581344","28896"],["Oceania","Vanuatu","264652","12189"],["Oceania","Samoa","187820","2842"],["Oceania","Kiribati","106461","811"],["Oceania","Tonga","103036","747"],["Oceania","Micronesia, Federated States of","101351",null],["Oceania","Marshall Islands","56086","181"],["Oceania","Palau","20901","459"],["Oceania","Tuvalu","11323","26"],["Oceania","Nauru","9945","21"],["South America","Brazil","202794000","8515767"],["South America","Colombia","47662000","1141748"],["South America","Argentina","42669500","2780400"],["South America","Peru","30475144","1285216"],["South America","Venezuela","28946101","916445"],["South America","Chile","17773000","756102"],["South America","Ecuador","15774200","276841"],["South America","Bolivia","10027254","1098581"],["South America","Paraguay","6783374","406752"],["South America","Uruguay","3286314","181034"],["South America","Guyana","784894","214969"],["South America","Suriname","534189","163820"],["South America","Saint Vincent and the Grenadines","109000","389"]],"fields":[{"name":"continent","dataTypeID":1043},{"name":"name","dataTypeID":1043},{"name":"population","dataTypeID":1700},{"name":"area","dataTypeID":1700}],"affectedRows":0}
True
True