Merge pull request #3476 from tehnuge/develop

fix SQL cheatsheet query (#3475)
This commit is contained in:
hroff-1902 2020-06-13 11:25:01 +03:00 committed by GitHub
commit e5363185a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ SET is_open=0,
close_date=<close_date>, close_date=<close_date>,
close_rate=<close_rate>, close_rate=<close_rate>,
close_profit=close_rate/open_rate-1, 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> sell_reason=<sell_reason>
WHERE id=<trade_ID_to_update>; WHERE id=<trade_ID_to_update>;
``` ```
@ -114,7 +114,7 @@ SET is_open=0,
close_date='2017-12-20 03:08:45.103418', close_date='2017-12-20 03:08:45.103418',
close_rate=0.19638016, close_rate=0.19638016,
close_profit=0.0496, 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' sell_reason='force_sell'
WHERE id=31; WHERE id=31;
``` ```