Question

Assume you have a table with the following information for all countries. CCODE   CNAME           CONTINENT   LANGUAGE    POPULATION  &nbsp

Assume you have a table with the following information for all countries.

CCODE   CNAME           CONTINENT   LANGUAGE    POPULATION      LAND        WATER

1       Afghanistan     AS          fa          30419928.00     652230      NULL

2       Albania         EU          sq          3002859.00      27398       1350

3       Algeria         AF          ar          35406303.00     2381741     NULL

��  ��  ��  ��  ��  ��  ��

Use this table to answer Q1-Q10 (1 Point Each).

Answer each question as best as possible.  

Show your work if you need to take multiple steps to answer a problem.

Partial answers will count.

A. Write a SQL query to answer: What is the average population of countries who speak English ('en') and whose name start and end with 'a'.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A.answer)
SELECT AVG(POPULATION) FROM countries WHERE CNAME LIKE a%a AND LANGUAGE="en";

here AVG is a aggrigate function used to find the average population

Like operation used to string comparision. a%a meas starts with a and end with a in between anything come.

counties is a table name

Add a comment
Know the answer?
Add Answer to:
Assume you have a table with the following information for all countries. CCODE   CNAME           CONTINENT   LANGUAGE    POPULATION  &nbsp
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT