(15 points) SQL Queries Consider the following relational schema:
- StockPrice (symbol, date, price)
- StockHolding (SSN, symbol, numberOfShares)
Each person holds a certain number of shares of each company. This information is
stored in the StockHolding relation. You may assume that the holdings of a person
are permanent (never changed/changes). Write the following queries in SQL.
- For each person, find the total portfolio value on 12/12/2003.
Total portfolio value of a person on 12/12/2003 is defined as
the sum of "((number of shares held) times (stock price on 12/12/2003))"
over all symbols held in one's portfolio.
- Find all people who had a total portfolio value of greater than
$1 million on 12/12/2003, but whose ortfolio value on 6/12/2003 was
half of their portfolio value on 12/12/2003.