Assignment 12: General SQL Recap
Use the data from the sqlite online emulation (brokerage.db). Solve the tasks, programming all the statements in one query (which will return a table for every SELECT statement). Export the query as an .sql file (name it according to the requirements fak_number_name_assign_12.sql). Submit the .sql file and input the answers in the corresponding field number in the form: https://forms.gle/A3EtdSCNzaYw4oYa8
1) In which customer class the average age is the lowest?
2) How many days have passed since the latest (newest) Moran's (account manager) customer registered till today?
3) How many customers have 'active' positions? (note: active position is if the customer has allocated any amount on it)
4) How many customers have invested in FPO stocks?
5) How many customers from Canada have invested in these 3 stocks: Yahoo, Apple Systems and Google?
6) In which stock have all customers from this brokerage agency invested the least amount of funds? (note: but at least some)
7) Which account manager has a portfolio of customers who have the highest amount in Cash Remaining positions?