diff --git a/exercises/2-sql/README.md b/exercises/2-sql/README.md new file mode 100644 index 0000000..92226b5 --- /dev/null +++ b/exercises/2-sql/README.md @@ -0,0 +1,17 @@ +Loan or No Loan? +================ + +Here is some people's last month bank statements. Query the database to answer the questions. Write methods to return all of the information to you. Don't do this manually. + +* How many people are there in the database? +* What is each persons salary (return their name and salary)? +* What is each persons net income? +* How about their highest expense? +* What percent of their salary did they spend? +* What was the average price of their expenses (don't include salary)? +* How many expenses did each person have? +* How many things did each person buy in the first week of the month? How much money did they spend? +* How about in the last week? +* Print everything bought between $40 and $60. +* Using the mortgage calculator you built before (some adjustments will need to be made), how large of a house could each person afford on a 15 year mortgage at 4%, if they plan on saving $200 a month (assuming they keep their jobs and spend the same amount). +* Write the database to a csv. diff --git a/exercises/2-sql/balance-sheets.sqlite3 b/exercises/2-sql/balance-sheets.sqlite3 new file mode 100644 index 0000000..c48c33b Binary files /dev/null and b/exercises/2-sql/balance-sheets.sqlite3 differ diff --git a/exercises/2-sql/loan.py b/exercises/2-sql/loan.py new file mode 100644 index 0000000..e69de29