How Many Sells
Return one row with one column, n: the number of trades whose side is sell.
Example 1
trades
| id | symbol | side | qty | price |
|---|---|---|---|---|
| 1 | KO | buy | 10 | 49.5 |
| 2 | KO | sell | 5 | 40.0 |
| 3 | XOM | sell | 7 | 50.0 |
returns
| n |
|---|
| 2 |
Constraints
- Up to 14 trades
sideisbuyorsell
Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.
More SQL problems
- No ManagerBeginner
- One SymbolBeginner
- One of SeveralBeginner
- Only the Big OnesBeginner
- Starts With ABeginner
- Three LargestBeginner
- Trade ValueBeginner
- Two ColumnsBeginner