Answering business questions at SmallBank
(graded individual assignment #2)

GOAL: Learning SQL
TASK: Create an ADS notebook containing the text of the questions listed below and the SQL queries that produce the corresponding answers when run. Post the notebook by the beginning of the Wed class in your BOX folder.
Filename for the notebook is YourLastname_YourFirstName_SQL1
Make sure that all result columns have an easy-to-understand name.
CRITERIA: SQL must produce the correct answer.
BUSINESS QUESTIONS AT SMALLBANK
1. Produce an alphabetic list of our customers who live in Richmond. First name, last name, and city
2. Produce a list of the loans above 100K, full info. Order by principal, descending.
3. How many are they?
4. What are our ten smallest loans?
5. What is our total exposure by rate? Order by rate.
6. What is the average loan size at the 8% rate?
7. What is the average loan by rate?
8. How many customers do we have in each city?
9. Do we have a customer who has for initials MG?
10. What are our average rates and average principals by year of maturity? Order by year. Format the principals so that they print nicely.
Note: Q10 is a bit more changing than the others. You will need to figure out on your own how to extract year information from a
column.