Question: Code in MySQL please Write the SOL statement to all countries in the world.country table that contain the word and in the name. The and

Code in MySQL please

Code in MySQL please Write the SOL statement to all countries in

the world.country table that contain the word "and" in the name. The

"and" must appear as a conjunction of two names, it must notappear within the country name. Do not use a regular expression. Alsodisplay the Region, Population, and LifeExpectancy 1. The result set should look

Write the SOL statement to all countries in the world.country table that contain the word "and" in the name. The "and" must appear as a conjunction of two names, it must not appear within the country name. Do not use a regular expression. Also display the Region, Population, and LifeExpectancy 1. The result set should look like the below figure Name Antigua and Barbuda Bosnia and Herzegovina Heard Island and McDonald Islands Saint Kitts and Nevis Saint Pierre and Miquelon Saint Vincent and the Grenadines Sao Tome and Principe South Georgia and the South Sandwich Islands Antarctica Svalbard and Jan Mayen Trinidad and Tobago Turks and Caicos Islands Wallis and Futuna Region Caribbean Southern Europe Antarctica Caribbean North America Caribbean Central Africa Population LifeExpectancy 680e 3972000 70.5 71.5 38000 7000 114880 147800 70.7 77.6 72.3 65.3 Nordic Countries 3200 Caribbean Caribbean Polynesia 1295000 17000 15e00 68.0 73.3 2. In the world.country table, the SurfaceArea is given in square kilometers. Write an SQL SELECT statement to return the country name, region, surface area in square kilometers as SurfaceAreaSK, and surface area in square miles as SurfaceAreaSM. Return the data in order by descending SurfaceAreaSM For reference, 1 sq. kilometer 0.38610216 sq. mile Formula: SurfaceArea 38610216 The result set should look like the below figure Name Russian Federation Antarctica Canada China United States Brazil Australia India Argentina Region Eastern Europe Antarctica North America Eastern Asia North America South America Australia and New Zealand 7741220.00 Southern and Central Asia 3287263.00 South America SurfaceAreaSK SurfaceAreaSM 17075400.00 13120000.00 5065660.33920000 9970610.00 9572900.00 9363520.00 8547403.00 6592848.82286400 3849674.05751760 3696117.36746400 3615275.29720328 3300170.76069048 2988901.76303520 1269219.34478808 1073518.44566400 2780400.00 4. In the "world" schema, the "city" table contains data about cities around the world. Write an SQL SELECT statement that will return the following: city.CountryCode, city.Name, city.District, city.Population Include only those cities where the population density per square mile of the country is greater than 750 and the life expectancy is less than 60 Sort in order by descending population The result set should look like the below figure CountryCode Name HTI RWA HTI HTI MYT Port-au-Prince Carrefour Kigali Delmas Le-Cap-HaA tien Mamoutzou District Ouest Ouest Kigali Ouest Nord Mamoutzou Population 884472 290204 286000 240429 102233 12000 5. Write an SQL SELECT statement that will return the following from the country table: Name, Region, Population, LifeExpectancy. Include only those countries where English is the official language and the population is greater than 1 million Hint: You are displaying the results for the 'country' table, based on a condition from the 'countryLanguage' table. You will need to use an embedded SELECT (see video Session 6 Part 3) The result set should look like the below figure Region Australia and New Zealand 18886000 North America Eastern Asia British Islands Southern Africa Australia and New Zealand 386200e Southern Africa British Islands North America Eastern Africa Population LifeExpectancy Name Australia Canada Hong Kong Ireland Lesotho New Zealand South Africa United Kingdorm United States Zimbabwe 79.8 79.4 79.5 76.8 50.8 77.8 40377000 51.1 59623480 77.7 278357000 77.1 1166980 37.8 311470 6782006e 3775100 2153006

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!