You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(stock_name, operation_day) is the primary key (combination of columns with unique values) for this table.
16
+
The operation column is an ENUM (category) of type ('Sell', 'Buy')
17
+
Each row of this table indicates that the stock which has stock_name had an operation on the day operation_day with the price.
18
+
It is guaranteed that each 'Sell' operation for a stock has a corresponding 'Buy' operation in a previous day. It is also guaranteed that each 'Buy' operation for a stock has a corresponding 'Sell' operation in an upcoming day.
19
+
20
+
21
+
Write a solution to report the Capital gain/loss for each stock.
22
+
23
+
The Capital gain/loss of a stock is the total gain or loss after buying and selling the stock one or many times.
0 commit comments