sql语句集合

1、查询该字段出现一次的

select count(MACHINE_ID) ,MACHINE_ID from t_ratio  group by MACHINE_ID having count(MACHINE_ID)=1

2、查询

SELECT COALESCE(SUM(TOTAL_FEE),0) as dateMoney,count(*) as orderNum,COALESCE(SUM(TOTAL_PLAY_NO),0) as openNum FROM t_order where PAY_TIME>=1493136000 AND
PAY_TIME<=1493222400 AND ORDER_STATE = 1 AND MACHINE_ID='MA0041'

原文地址:https://www.cnblogs.com/coriander/p/6767265.html