Skip to content

Commit

Permalink
improve/refactor-kline-table: order by for only 1 symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
andycheng123 committed Jan 25, 2024
1 parent 3ebdca5 commit aa0fc1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/service/backtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (s *BacktestService) QueryKLinesCh(

var query string
if len(queries) == 1 {
query = queries[0]
query = queries[0] + " ORDER BY end_time ASC, start_time DESC"
} else {
query = "(" + strings.Join(queries, ") UNION (") + ") ORDER BY end_time ASC, start_time DESC"
}
Expand Down

0 comments on commit aa0fc1b

Please sign in to comment.