SQL Server CLEAN & EASY
\n/* Write your T-SQL query statement below */\nselect stock_name,sum(iif(operation=\'Buy\',price*-1,price)) as capital_gain_loss\nfrom Stocks\ngroup by stock_n
```\n/* Write your T-SQL query statement below */\nselect stock_name,sum(iif(operation=\'Buy\',price*-1,price)) as capital_gain_loss\nfrom Stocks\ngroup by stock_name\n```
[]