Data and Decision


  • you will enter the following information in MySQL Workbench when connecting to the “Instructor’s Online Server” :
    • hostname: hult-mysql.cmsi20r5frst.us-west-1.rds.amazonaws.com
    • port: 3306You will be given access (read-only) to an existing database – the schema is called “accounting” in the Instructor’s Online Server. You can take a look at the EER diagram here: Accounting ER.mwb  Download Accounting ER.mwb (Just don’t use the EER diagram to create your tables – it won’t work – all data is in the Instructor’s Online Server)

You will need to build queries and insert results into tmp views to create the Profit and Loss (P&L) and Balance Sheet (B/S) statements

Your queries must achieve the following:

  • Receive the year in which the user wants to produce the P&L and the B/S for.
  • Do the necessary calculations to obtain the net profit or loss for that year.
  • Use that value, to produce the B/S. 
  • Demonstrarte that A = L + E
  • Print both the P&L and B/S as clear as possible on the Result Grids
  • Show the % change vs. the previous year for every major line item on the P&L and B/S
  • Give some headings to each major account line item. And to each section of the P&L and B/S
  • Add any additional financial metrics and ratios that could be useful to analyze this start-up. 
    • Wanna ensure an “A”? Produce a cash flow statement  as an added challenge

Students will submit the following:

  1. (60 points) SQL script (if you save it as txt, be sure to keep the adequate indentations – you will receive points for correct syntax, following best practices, comments in the code, correctness, efficiency ):
    • While there are multiple ways to approach the building of their P&L and B/S statements, most likely you will need need analytical queries
    •  be sure to include the comprehensive list of queries in ONE single .sql script that if the instructor runs on their computer, they will be able to obtain exactly the same results as per your P&L and B/S screenshots from #2.
  2. (20 points) Screenshot of their resulting P&L and B/S outputs. You will receive points for correct results, 10 points for correct B/S and 10 points for correct P&L. 

https://docs.google.com/spreadsheets/d/1r9CCEYd_KipVA6hhD_-LSe1hAL8KYxkeHas9NFDLU-E/edit?usp=sharing