如图两组数据。(都在同一个表里)。。。【data表】现在想查询Reuters ----openprice的数据  与 CMB(web)-----openPrice的数据之差 (Reuters与CMB(web)时间相同)。。该怎么查询啊???数据多,这只是其中4条时间相同的数据。。。Reuters - CMB(web)             time_start1.04645 - 1.0467            (2016-12-19 15:30:00)1.04655 - 1.0467           (2016-12-19 15:30:01)1.0465 - 1.0467            (2016-12-19 15:30:02)1.04655- 1.0467            (2016-12-19 15:30:03)
                    
                    
                1 回答
 
                    
                    
                            月关宝盒
                            
                                
                            
                        
                        
                                                
                    TA贡献1772条经验 获得超5个赞
select time_start,(sum(if(type = 'CMB(web)', openprice, 0)) - sum(if(type = 'Reuters', openprice, 0))) from data group by time_start
- 1 回答
- 0 关注
- 506 浏览
添加回答
举报
0/150
	提交
		取消
	