贸易——数据 表1
代表行动价格
1 P-4, 3 P-3, 4 FS
2 SELL, 325
3 出售45 75
3支
表1
姓名
1 RCC
2 REG
SELECT SUM( IF( trade_data.action = BUY , price, 0 ) ) AS BUYSUM ,
SUM( IF( trade_data.action = SELL , price, 0 ) ) AS BUYSELL ,
AVG( trade_data.percent ) AS peravg, symbol. *
FROM `trade_data`
INNER JOIN `symbol` ON trade_data.symbol = symbol.id
This Query Gives me One Row But there Are Two Row are available at this Condition. But When I change the query As
SELECT trade_data.* , symbol. *
FROM `trade_data`
INNER JOIN `symbol` ON trade_data.symbol = symbol.id
Then this Query Gives me Exact 2 Rows.