即使Quantity
列为decimal(10,4)
而price
列为decimal(8,2)
,此语句是否正常?
"(SELECT `price` FROM `"
.$this->symbol."Trades` ORDER BY `TS` DESC LIMIT 1) UNION (SELECT "
."`price` FROM `".$this->symbol."Trades` WHERE `TS` >="
." DATE_SUB(NOW(), INTERVAL 1 DAY) ORDER BY `TS` ASC LIMIT 1) UNION"
." (SELECT SUM(`Quantity`) AS volume FROM `".
$this->symbol."Trades` WHERE `TS` >= DATE_SUB(NOW(), INTERVAL 1 DAY))"