常用mysql

搜索差价

select count(*) from gate_okex_cj;
select 
	*
from 
	(select count(*) as a_cj,coin from gate_okex_cj where a_cj>0.006 group by coin) a
left join 
	(select count(*) as b_cj,coin from gate_okex_cj where b_cj>0.006 group by coin) b
on
	a.coin=b.coin;
原文地址:https://www.cnblogs.com/xielisen/p/8481767.html