Update sql cheatsheet parentheses

This commit is contained in:
Matthias 2020-08-22 09:33:35 +02:00
parent 3d93236709
commit 637147f89c

View File

@ -110,7 +110,7 @@ SET is_open=0,
close_date=<close_date>,
close_rate=<close_rate>,
close_profit = close_rate / open_rate - 1,
close_profit_abs = (amount * <close_rate> * (1 - fee_close) - (amount * (open_rate * 1 - fee_open))),
close_profit_abs = (amount * <close_rate> * (1 - fee_close) - (amount * (open_rate * (1 - fee_open)))),
sell_reason=<sell_reason>
WHERE id=<trade_ID_to_update>;
```
@ -123,7 +123,7 @@ SET is_open=0,
close_date='2020-06-20 03:08:45.103418',
close_rate=0.19638016,
close_profit=0.0496,
close_profit_abs = (amount * 0.19638016 * (1 - fee_close) - (amount * open_rate * (1 - fee_open))),
close_profit_abs = (amount * 0.19638016 * (1 - fee_close) - (amount * (open_rate * (1 - fee_open)))),
sell_reason='force_sell'
WHERE id=31;
```